{
  "openapi": "3.1.0",
  "info": {
    "title": "AMLOK API",
    "version": "1.4.2",
    "description": "API reference for AMLOK 1.4.2, with example requests and responses. Configure your institution-issued environment URL before making requests.",
    "x-source-workbook": "https://docs.google.com/spreadsheets/d/14pU2PLv9JDda8gAa1367hipa2oJQB260fIJthevrp10/edit"
  },
  "servers": [
    {
      "url": "https://api.example.com",
      "description": "Set the server URL to your institution-issued AMLOK environment URL."
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1/connections": {
      "get": {
        "operationId": "EP001",
        "summary": "List connections",
        "description": "List authorized connection records.\n\nRequired scope: `connections:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_connection_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/connections?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/connections?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/connections?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized connection records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConnectionRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list connections",
                    "value": {
                      "data": [
                        {
                          "id": "connection_example",
                          "object": "connection",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "provider_id": "BANK-02",
                          "provider_tenant_id": "item_example",
                          "status": "active",
                          "institution_id": "ins_example",
                          "institution_name": "Example Bank",
                          "country": "CA",
                          "products": [
                            "transactions",
                            "balance"
                          ],
                          "scopes": [
                            "banking:read"
                          ],
                          "consent_id": "con_01JAMLOK",
                          "last_successful_sync_at": null,
                          "next_refresh_at": null,
                          "history_available_from": "2025-10-22",
                          "reauth_required_at": null,
                          "error_code": null,
                          "sync_cursor": "cur_example"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "connection_example",
                          "object": "connection",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP139",
        "summary": "Create connection",
        "description": "Start an authorized source-connection flow.\n\nRequired scope: `connections:write`. Return a short-lived authorization action; no provider secret in response. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Browser return parameters are connection_id, state and result (completed, cancelled or failed); failed returns a sanitized error_code. Verify the saved state and expected connection, then retrieve the connection server-side. The callback never proves consent or connection activation. No credentials or source data appear in return parameters. The state must be unpredictable, bound to the initiating browser session and accepted only once. Renew an expired link or reauthorization-required connection through POST /v1/connections/{id}/authorization. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/connections\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"subject_id\": \"biz_example\",\n  \"provider_id\": \"BANK-02\",\n  \"products\": [\n    \"transactions\"\n  ],\n  \"consent_id\": \"con_example\",\n  \"redirect_uri\": \"https://client.example.com/connected\",\n  \"state\": \"synthetic-random-state-at-least-32-characters\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/connections\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'subject_id': 'biz_example',\n 'provider_id': 'BANK-02',\n 'products': ['transactions'],\n 'consent_id': 'con_example',\n 'redirect_uri': 'https://client.example.com/connected',\n 'state': 'synthetic-random-state-at-least-32-characters'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/connections\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"subject_id\": \"biz_example\",\n  \"provider_id\": \"BANK-02\",\n  \"products\": [\n    \"transactions\"\n  ],\n  \"consent_id\": \"con_example\",\n  \"redirect_uri\": \"https://client.example.com/connected\",\n  \"state\": \"synthetic-random-state-at-least-32-characters\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "201": {
            "description": "Start an authorized source-connection flow.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    },
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "action"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create connection",
                    "value": {
                      "data": {
                        "id": "cnn_example",
                        "object": "connection",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "provider_id": "BANK-02",
                        "provider_tenant_id": null,
                        "status": "pending",
                        "institution_id": null,
                        "institution_name": null,
                        "country": "CA",
                        "products": [
                          "transactions"
                        ],
                        "scopes": [
                          "banking:read"
                        ],
                        "consent_id": "con_example",
                        "last_successful_sync_at": null,
                        "next_refresh_at": null,
                        "history_available_from": null,
                        "reauth_required_at": null,
                        "error_code": null,
                        "sync_cursor": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      },
                      "action": {
                        "type": "authorize_connection",
                        "url": "https://connect.example.com/session",
                        "expires_at": "2026-10-23T14:15:00Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP139Request"
              },
              "example": {
                "subject_id": "biz_example",
                "provider_id": "BANK-02",
                "products": [
                  "transactions"
                ],
                "consent_id": "con_example",
                "redirect_uri": "https://client.example.com/connected",
                "state": "synthetic-random-state-at-least-32-characters"
              }
            }
          }
        }
      }
    },
    "/v1/connections/{id}": {
      "get": {
        "operationId": "EP002",
        "summary": "Retrieve connection",
        "description": "Retrieve one connection with provenance.\n\nRequired scope: `connections:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/connections/cnn_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/connections/cnn_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/connections/cnn_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one connection with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConnectionRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve connection",
                    "value": {
                      "data": {
                        "id": "cnn_example",
                        "object": "connection",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "provider_id": "BANK-02",
                        "provider_tenant_id": "item_example",
                        "status": "active",
                        "institution_id": "ins_example",
                        "institution_name": "Example Bank",
                        "country": "CA",
                        "products": [
                          "transactions",
                          "balance"
                        ],
                        "scopes": [
                          "banking:read"
                        ],
                        "consent_id": "con_01JAMLOK",
                        "last_successful_sync_at": null,
                        "next_refresh_at": null,
                        "history_available_from": "2025-10-22",
                        "reauth_required_at": null,
                        "error_code": "reauth_required",
                        "sync_cursor": "cur_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "cnn_example",
                        "object": "connection",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/consents": {
      "get": {
        "operationId": "EP003",
        "summary": "List consents",
        "description": "List authorized consent records.\n\nRequired scope: `consent:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_consent_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "consent:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/consents?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/consents?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/consents?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized consent records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ConsentRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list consents",
                    "value": {
                      "data": [
                        {
                          "id": "consent_example",
                          "object": "consent",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "subject_type": "business",
                          "status": "granted",
                          "purposes": [
                            "credit_assessment"
                          ],
                          "scopes": [
                            "banking:read"
                          ],
                          "granted_at": null,
                          "expires_at": null,
                          "revoked_at": null,
                          "policy_version": "consent-v1",
                          "evidence_document_id": "doc_consent",
                          "authorized_by": "per_authorizer"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "consent_example",
                          "object": "consent",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP137",
        "summary": "Create consent",
        "description": "Record authorization and evidence.\n\nRequired scope: `consent:write`. Caller must have authority; recording consent does not manufacture user authorization. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "consent:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/consents\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"subject_id\": \"biz_example\",\n  \"subject_type\": \"business\",\n  \"purposes\": [\n    \"credit_assessment\"\n  ],\n  \"scopes\": [\n    \"banking:read\"\n  ],\n  \"policy_version\": \"consent-v1\",\n  \"evidence_document_id\": \"doc_consent\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/consents\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'subject_id': 'biz_example',\n 'subject_type': 'business',\n 'purposes': ['credit_assessment'],\n 'scopes': ['banking:read'],\n 'policy_version': 'consent-v1',\n 'evidence_document_id': 'doc_consent'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/consents\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"subject_id\": \"biz_example\",\n  \"subject_type\": \"business\",\n  \"purposes\": [\n    \"credit_assessment\"\n  ],\n  \"scopes\": [\n    \"banking:read\"\n  ],\n  \"policy_version\": \"consent-v1\",\n  \"evidence_document_id\": \"doc_consent\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "201": {
            "description": "Record authorization and evidence.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Consent"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create consent",
                    "value": {
                      "data": {
                        "id": "con_example",
                        "object": "consent",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "subject_type": "business",
                        "status": "granted",
                        "purposes": [
                          "credit_assessment"
                        ],
                        "scopes": [
                          "banking:read"
                        ],
                        "granted_at": null,
                        "expires_at": null,
                        "revoked_at": null,
                        "policy_version": "consent-v1",
                        "evidence_document_id": "doc_consent",
                        "authorized_by": "per_authorizer"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP137Request"
              },
              "example": {
                "subject_id": "biz_example",
                "subject_type": "business",
                "purposes": [
                  "credit_assessment"
                ],
                "scopes": [
                  "banking:read"
                ],
                "policy_version": "consent-v1",
                "evidence_document_id": "doc_consent"
              }
            }
          }
        }
      }
    },
    "/v1/consents/{id}": {
      "get": {
        "operationId": "EP004",
        "summary": "Retrieve consent",
        "description": "Retrieve one consent with provenance.\n\nRequired scope: `consent:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "con_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "consent:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/consents/con_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/consents/con_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/consents/con_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one consent with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ConsentRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve consent",
                    "value": {
                      "data": {
                        "id": "con_example",
                        "object": "consent",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "subject_type": "business",
                        "status": "granted",
                        "purposes": [
                          "credit_assessment"
                        ],
                        "scopes": [
                          "banking:read"
                        ],
                        "granted_at": null,
                        "expires_at": null,
                        "revoked_at": null,
                        "policy_version": "consent-v1",
                        "evidence_document_id": "doc_consent",
                        "authorized_by": "per_authorizer"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "con_example",
                        "object": "consent",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/sync-jobs": {
      "get": {
        "operationId": "EP005",
        "summary": "List sync jobs",
        "description": "List authorized sync job records.\n\nRequired scope: `connections:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_sync_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/sync-jobs?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/sync-jobs?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/sync-jobs?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized sync job records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SyncJobRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list sync jobs",
                    "value": {
                      "data": [
                        {
                          "id": "sync_job_example",
                          "object": "sync_job",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "connection_id": "cnn_01JAMLOK",
                          "resources": [
                            "bank_account",
                            "bank_transaction"
                          ],
                          "status": "partial",
                          "started_at": null,
                          "completed_at": null,
                          "requested_from": "2026-09-01",
                          "requested_to": "2026-10-01",
                          "records_added": 150,
                          "records_updated": 2,
                          "records_removed": 1,
                          "coverage_start": "2026-09-01",
                          "coverage_end": "2026-10-01",
                          "errors": []
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "sync_job_example",
                          "object": "sync_job",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/sync-jobs/{id}": {
      "get": {
        "operationId": "EP006",
        "summary": "Retrieve sync job",
        "description": "Retrieve one sync job with provenance.\n\nRequired scope: `connections:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "syn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/sync-jobs/syn_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/sync-jobs/syn_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/sync-jobs/syn_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one sync job with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SyncJobRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve sync job",
                    "value": {
                      "data": {
                        "id": "syn_example",
                        "object": "sync_job",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "connection_id": "cnn_01JAMLOK",
                        "resources": [
                          "bank_account",
                          "bank_transaction"
                        ],
                        "status": "partial",
                        "started_at": null,
                        "completed_at": null,
                        "requested_from": "2026-09-01",
                        "requested_to": "2026-10-01",
                        "records_added": 150,
                        "records_updated": 2,
                        "records_removed": 1,
                        "coverage_start": "2026-09-01",
                        "coverage_end": "2026-10-01",
                        "errors": []
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "syn_example",
                        "object": "sync_job",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/businesses": {
      "get": {
        "operationId": "EP007",
        "summary": "List businesses",
        "description": "List authorized business records.\n\nRequired scope: `identity:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/businesses?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/businesses?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/businesses?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized business records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BusinessRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list businesses",
                    "value": {
                      "data": [
                        {
                          "id": "business_example",
                          "object": "business",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "legal_name": "Example Manufacturing Inc.",
                          "trade_names": [
                            "Example Works"
                          ],
                          "former_names": [],
                          "registration_number": "REG-EXAMPLE",
                          "registration_jurisdiction": "CA-ON",
                          "incorporation_country": "CA",
                          "incorporation_date": "2018-04-09",
                          "legal_form": "corporation",
                          "legal_status": "active",
                          "raw_legal_status": "Active",
                          "tax_identifiers": [],
                          "lei": null,
                          "registered_address": {
                            "city": "Toronto",
                            "country": "CA"
                          },
                          "operating_addresses": [],
                          "website": "https://example.com",
                          "email": "contact@example.com",
                          "phone": "+14165550100",
                          "industry_codes": [],
                          "business_description": "Industrial component fabrication",
                          "employee_count": 35,
                          "fiscal_year_end": "12-31",
                          "reporting_currency": "CAD",
                          "is_registry_sourced": true,
                          "registry_retrieved_at": null,
                          "last_annual_return_date": "2026-04-01",
                          "ownership_complete": false
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "business_example",
                          "object": "business",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP135",
        "summary": "Create business",
        "description": "Create a client-asserted business profile.\n\nRequired scope: `identity:write`. Does not represent successful registry verification. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/businesses\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"legal_name\": \"Example Manufacturing Inc.\",\n  \"client_reference\": \"app-1029\",\n  \"incorporation_country\": \"CA\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/businesses\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'legal_name': 'Example Manufacturing Inc.',\n 'client_reference': 'app-1029',\n 'incorporation_country': 'CA'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/businesses\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"legal_name\": \"Example Manufacturing Inc.\",\n  \"client_reference\": \"app-1029\",\n  \"incorporation_country\": \"CA\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "201": {
            "description": "Create a client-asserted business profile.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Business"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create business",
                    "value": {
                      "data": {
                        "id": "biz_example",
                        "object": "business",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [
                          {
                            "provider_id": "CLIENT",
                            "retrieved_at": "2026-10-23T14:00:00Z"
                          }
                        ],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "legal_name": "Example Manufacturing Inc.",
                        "trade_names": [
                          "Example Works"
                        ],
                        "former_names": [],
                        "registration_number": "REG-EXAMPLE",
                        "registration_jurisdiction": "CA-ON",
                        "incorporation_country": "CA",
                        "incorporation_date": "2018-04-09",
                        "legal_form": "corporation",
                        "legal_status": null,
                        "raw_legal_status": "Active",
                        "tax_identifiers": [],
                        "lei": null,
                        "registered_address": {
                          "city": "Toronto",
                          "country": "CA"
                        },
                        "operating_addresses": [],
                        "website": "https://example.com",
                        "email": "contact@example.com",
                        "phone": "+14165550100",
                        "industry_codes": [],
                        "business_description": "Industrial component fabrication",
                        "employee_count": 35,
                        "fiscal_year_end": "12-31",
                        "reporting_currency": "CAD",
                        "is_registry_sourced": false,
                        "registry_retrieved_at": null,
                        "last_annual_return_date": "2026-04-01",
                        "ownership_complete": false
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP135Request"
              },
              "example": {
                "legal_name": "Example Manufacturing Inc.",
                "client_reference": "app-1029",
                "incorporation_country": "CA"
              }
            }
          }
        }
      }
    },
    "/v1/businesses/{id}": {
      "get": {
        "operationId": "EP008",
        "summary": "Retrieve business",
        "description": "Retrieve one business with provenance.\n\nRequired scope: `identity:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/businesses/biz_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/businesses/biz_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/businesses/biz_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one business with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BusinessRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve business",
                    "value": {
                      "data": {
                        "id": "biz_example",
                        "object": "business",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "legal_name": "Example Manufacturing Inc.",
                        "trade_names": [
                          "Example Works"
                        ],
                        "former_names": [],
                        "registration_number": "REG-EXAMPLE",
                        "registration_jurisdiction": "CA-ON",
                        "incorporation_country": "CA",
                        "incorporation_date": "2018-04-09",
                        "legal_form": "corporation",
                        "legal_status": "active",
                        "raw_legal_status": "Active",
                        "tax_identifiers": [],
                        "lei": null,
                        "registered_address": {
                          "city": "Toronto",
                          "country": "CA"
                        },
                        "operating_addresses": [],
                        "website": "https://example.com",
                        "email": "contact@example.com",
                        "phone": "+14165550100",
                        "industry_codes": [],
                        "business_description": "Industrial component fabrication",
                        "employee_count": 35,
                        "fiscal_year_end": "12-31",
                        "reporting_currency": "CAD",
                        "is_registry_sourced": true,
                        "registry_retrieved_at": null,
                        "last_annual_return_date": "2026-04-01",
                        "ownership_complete": false
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "biz_example",
                        "object": "business",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/people": {
      "get": {
        "operationId": "EP009",
        "summary": "List people",
        "description": "List authorized person records.\n\nRequired scope: `identity:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/people?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/people?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/people?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized person records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PersonRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list people",
                    "value": {
                      "data": [
                        {
                          "id": "person_example",
                          "object": "person",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "given_name": "Alex",
                          "middle_names": "Morgan",
                          "family_name": "Example",
                          "full_name": "Alex Example",
                          "date_of_birth": "1985-02-14",
                          "nationalities": [
                            "CA"
                          ],
                          "residence_country": "CA",
                          "addresses": [],
                          "email": "alex@example.com",
                          "phone": "+14165550101",
                          "tax_identifier_token": "tok_example",
                          "occupation": "Business owner",
                          "verification_id": "ver_01JAMLOK"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "person_example",
                          "object": "person",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP136",
        "summary": "Create person",
        "description": "Create an authorized client-asserted person profile.\n\nRequired scope: `identity:write`. Restricted fields require identity scope and documented purpose. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/people\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"given_name\": \"Alex\",\n  \"family_name\": \"Example\",\n  \"email\": \"alex@example.com\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/people\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'given_name': 'Alex',\n 'family_name': 'Example',\n 'email': 'alex@example.com'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/people\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"given_name\": \"Alex\",\n  \"family_name\": \"Example\",\n  \"email\": \"alex@example.com\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "201": {
            "description": "Create an authorized client-asserted person profile.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Person"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create person",
                    "value": {
                      "data": {
                        "id": "per_example",
                        "object": "person",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [
                          {
                            "provider_id": "CLIENT",
                            "retrieved_at": "2026-10-23T14:00:00Z"
                          }
                        ],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "given_name": "Alex",
                        "middle_names": "Morgan",
                        "family_name": "Example",
                        "full_name": "Alex Example",
                        "date_of_birth": "1985-02-14",
                        "nationalities": [
                          "CA"
                        ],
                        "residence_country": "CA",
                        "addresses": [],
                        "email": "alex@example.com",
                        "phone": "+14165550101",
                        "tax_identifier_token": "tok_example",
                        "occupation": "Business owner",
                        "verification_id": "ver_01JAMLOK"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP136Request"
              },
              "example": {
                "given_name": "Alex",
                "family_name": "Example",
                "email": "alex@example.com"
              }
            }
          }
        }
      }
    },
    "/v1/people/{id}": {
      "get": {
        "operationId": "EP010",
        "summary": "Retrieve person",
        "description": "Retrieve one person with provenance.\n\nRequired scope: `identity:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "per_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/people/per_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/people/per_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/people/per_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one person with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PersonRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve person",
                    "value": {
                      "data": {
                        "id": "per_example",
                        "object": "person",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "given_name": "Alex",
                        "middle_names": "Morgan",
                        "family_name": "Example",
                        "full_name": "Alex Example",
                        "date_of_birth": "1985-02-14",
                        "nationalities": [
                          "CA"
                        ],
                        "residence_country": "CA",
                        "addresses": [],
                        "email": "alex@example.com",
                        "phone": "+14165550101",
                        "tax_identifier_token": "tok_example",
                        "occupation": "Business owner",
                        "verification_id": "ver_01JAMLOK"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "per_example",
                        "object": "person",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/relationships": {
      "get": {
        "operationId": "EP011",
        "summary": "List relationships",
        "description": "List authorized relationship records.\n\nRequired scope: `identity:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/relationships?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/relationships?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/relationships?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized relationship records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RelationshipRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list relationships",
                    "value": {
                      "data": [
                        {
                          "id": "relationship_example",
                          "object": "relationship",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "from_entity_id": "per_owner",
                          "to_entity_id": "biz_borrower",
                          "relationship_type": "beneficial_owner",
                          "ownership_ratio": "0.25",
                          "ownership_band_min": "0.25",
                          "ownership_band_max": "0.50",
                          "voting_ratio": "0.30",
                          "is_ultimate_owner": true,
                          "control_description": "Appointment rights",
                          "valid_from": "2020-01-01",
                          "valid_to": null,
                          "evidence_document_ids": [],
                          "confidence": null,
                          "review_status": "not_reviewed"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "relationship_example",
                          "object": "relationship",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/relationships/{id}": {
      "get": {
        "operationId": "EP012",
        "summary": "Retrieve relationship",
        "description": "Retrieve one relationship with provenance.\n\nRequired scope: `identity:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "relationship_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/relationships/relationship_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/relationships/relationship_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/relationships/relationship_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one relationship with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RelationshipRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve relationship",
                    "value": {
                      "data": {
                        "id": "relationship_example",
                        "object": "relationship",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "from_entity_id": "per_owner",
                        "to_entity_id": "biz_borrower",
                        "relationship_type": "beneficial_owner",
                        "ownership_ratio": "0.25",
                        "ownership_band_min": "0.25",
                        "ownership_band_max": "0.50",
                        "voting_ratio": "0.30",
                        "is_ultimate_owner": true,
                        "control_description": "Appointment rights",
                        "valid_from": "2020-01-01",
                        "valid_to": null,
                        "evidence_document_ids": [],
                        "confidence": null,
                        "review_status": "not_reviewed"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "relationship_example",
                        "object": "relationship",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/verifications": {
      "get": {
        "operationId": "EP013",
        "summary": "List verifications",
        "description": "List authorized verification records.\n\nRequired scope: `identity:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_verification_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/verifications?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/verifications?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/verifications?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized verification records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VerificationRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list verifications",
                    "value": {
                      "data": [
                        {
                          "id": "ver_example",
                          "object": "verification",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "verification_type": "kyb",
                          "status": "not_started",
                          "hosted_url": "https://verify.example.com/session",
                          "stop_reason": null,
                          "processing_context": {
                            "product": "insights",
                            "workflow_run_id": "wfr_example"
                          },
                          "workflow_version": "kyb-ca-v1",
                          "subject_association_version": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "ver_example",
                          "object": "verification",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP142",
        "summary": "Start verification",
        "description": "Start a KYC or KYB session.\n\nRequired scope: `identity:verify`. Return hosted_url when applicable; poll verification ID for result. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. This is a stage of an authorized Insights or Signal workflow. processing_context is required; unrelated, completed, unpaid, cancelled or unentitled contexts return 409 invalid_state. It creates no separate AMLOK charge. The orchestrator deduplicates equivalent stage work within the parent. Person KYC within a business assessment requires processing_context.subject_association_id. Its person_id must match the verification subject; its business_id must match the parent subject. Store the association ID and validated record version on the verification for audit. Pending, rejected, revoked, mismatched or cross-workspace associations cannot authorize a stage. Revocation stops unfinished related-person work. Do not create a second product merely to verify its owner. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:verify"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/verifications\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"subject_id\": \"biz_example\",\n  \"verification_type\": \"kyb\",\n  \"workflow_version\": \"kyb-ca-v1\",\n  \"return_url\": \"https://client.example.com/verified\",\n  \"processing_context\": {\n    \"product\": \"insights\",\n    \"workflow_run_id\": \"wfr_example\"\n  }\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/verifications\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'subject_id': 'biz_example',\n 'verification_type': 'kyb',\n 'workflow_version': 'kyb-ca-v1',\n 'return_url': 'https://client.example.com/verified',\n 'processing_context': {'product': 'insights',\n                        'workflow_run_id': 'wfr_example'}},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/verifications\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"subject_id\": \"biz_example\",\n  \"verification_type\": \"kyb\",\n  \"workflow_version\": \"kyb-ca-v1\",\n  \"return_url\": \"https://client.example.com/verified\",\n  \"processing_context\": {\n    \"product\": \"insights\",\n    \"workflow_run_id\": \"wfr_example\"\n  }\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "201": {
            "description": "Start a KYC or KYB session. Accepted work is not yet complete.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Verification"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic start verification",
                    "value": {
                      "data": {
                        "id": "ver_example",
                        "object": "verification",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "verification_type": "kyb",
                        "status": "not_started",
                        "hosted_url": "https://verify.example.com/session",
                        "workflow_version": "kyb-ca-v1",
                        "stop_reason": null,
                        "processing_context": {
                          "product": "insights",
                          "workflow_run_id": "wfr_example"
                        },
                        "subject_association_version": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP142Request"
              },
              "example": {
                "subject_id": "biz_example",
                "verification_type": "kyb",
                "workflow_version": "kyb-ca-v1",
                "return_url": "https://client.example.com/verified",
                "processing_context": {
                  "product": "insights",
                  "workflow_run_id": "wfr_example"
                }
              }
            }
          }
        }
      }
    },
    "/v1/verifications/{id}": {
      "get": {
        "operationId": "EP014",
        "summary": "Retrieve verification",
        "description": "Retrieve one verification with provenance.\n\nRequired scope: `identity:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "ver_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/verifications/ver_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/verifications/ver_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/verifications/ver_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one verification with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VerificationRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve verification",
                    "value": {
                      "data": {
                        "id": "ver_example",
                        "object": "verification",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "verification_type": "kyb",
                        "status": "not_started",
                        "hosted_url": "https://verify.example.com/session",
                        "stop_reason": null,
                        "processing_context": {
                          "product": "insights",
                          "workflow_run_id": "wfr_example"
                        },
                        "workflow_version": "kyb-ca-v1",
                        "subject_association_version": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "ver_example",
                        "object": "verification",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/verification-checks": {
      "get": {
        "operationId": "EP015",
        "summary": "List verification checks",
        "description": "List authorized verification check records.\n\nRequired scope: `identity:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_check_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/verification-checks?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/verification-checks?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/verification-checks?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized verification check records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/VerificationCheckRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list verification checks",
                    "value": {
                      "data": [
                        {
                          "id": "verification_check_example",
                          "object": "verification_check",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "verification_id": "ver_01JAMLOK",
                          "check_type": "document_authenticity",
                          "status": "passed",
                          "raw_status": "Approved",
                          "method": "document",
                          "document_id": "doc_identity",
                          "document_type": "passport",
                          "document_number_token": "tok_document",
                          "document_number_masked": "****1234",
                          "issuing_country": "CA",
                          "issue_date": "2020-01-01",
                          "expiry_date": "2030-01-01",
                          "name_match": true,
                          "date_of_birth_match": true,
                          "address_match": null,
                          "liveness_result": "passed",
                          "face_match_score": null,
                          "score_scale": "provider_defined",
                          "warnings": [],
                          "checked_at": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "verification_check_example",
                          "object": "verification_check",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/verification-checks/{id}": {
      "get": {
        "operationId": "EP016",
        "summary": "Retrieve verification check",
        "description": "Retrieve one verification check with provenance.\n\nRequired scope: `identity:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "verification_check_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/verification-checks/verification_check_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/verification-checks/verification_check_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/verification-checks/verification_check_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one verification check with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/VerificationCheckRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve verification check",
                    "value": {
                      "data": {
                        "id": "verification_check_example",
                        "object": "verification_check",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "verification_id": "ver_01JAMLOK",
                        "check_type": "document_authenticity",
                        "status": "passed",
                        "raw_status": "Approved",
                        "method": "document",
                        "document_id": "doc_identity",
                        "document_type": "passport",
                        "document_number_token": "tok_document",
                        "document_number_masked": "****1234",
                        "issuing_country": "CA",
                        "issue_date": "2020-01-01",
                        "expiry_date": "2030-01-01",
                        "name_match": true,
                        "date_of_birth_match": true,
                        "address_match": null,
                        "liveness_result": "passed",
                        "face_match_score": null,
                        "score_scale": "provider_defined",
                        "warnings": [],
                        "checked_at": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "verification_check_example",
                        "object": "verification_check",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/screening-matches": {
      "get": {
        "operationId": "EP017",
        "summary": "List screening matches",
        "description": "List authorized screening match records.\n\nRequired scope: `identity:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/screening-matches?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/screening-matches?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/screening-matches?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized screening match records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ScreeningMatchRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list screening matches",
                    "value": {
                      "data": [
                        {
                          "id": "screening_match_example",
                          "object": "screening_match",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "verification_id": "ver_01JAMLOK",
                          "screening_type": "sanctions",
                          "list_name": "Example sanctions list",
                          "list_record_id": "entry_example",
                          "matched_name": "Alex Example",
                          "aliases": [],
                          "countries": [
                            "CA"
                          ],
                          "match_score": null,
                          "score_scale": "provider_defined",
                          "disposition": "unreviewed",
                          "reason_codes": [
                            "name_similarity"
                          ],
                          "source_url": "https://example.com/record",
                          "listed_on": "2026-01-10",
                          "screened_at": null,
                          "reviewed_at": null,
                          "reviewer_id": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "screening_match_example",
                          "object": "screening_match",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/screening-matches/{id}": {
      "get": {
        "operationId": "EP018",
        "summary": "Retrieve screening match",
        "description": "Retrieve one screening match with provenance.\n\nRequired scope: `identity:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "screening_match_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/screening-matches/screening_match_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/screening-matches/screening_match_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/screening-matches/screening_match_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one screening match with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ScreeningMatchRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve screening match",
                    "value": {
                      "data": {
                        "id": "screening_match_example",
                        "object": "screening_match",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "verification_id": "ver_01JAMLOK",
                        "screening_type": "sanctions",
                        "list_name": "Example sanctions list",
                        "list_record_id": "entry_example",
                        "matched_name": "Alex Example",
                        "aliases": [],
                        "countries": [
                          "CA"
                        ],
                        "match_score": null,
                        "score_scale": "provider_defined",
                        "disposition": "unreviewed",
                        "reason_codes": [
                          "name_similarity"
                        ],
                        "source_url": "https://example.com/record",
                        "listed_on": "2026-01-10",
                        "screened_at": null,
                        "reviewed_at": null,
                        "reviewer_id": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "screening_match_example",
                        "object": "screening_match",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/documents": {
      "get": {
        "operationId": "EP019",
        "summary": "List documents",
        "description": "List authorized document records.\n\nRequired scope: `documents:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "documents:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/documents?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/documents?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/documents?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized document records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DocumentRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list documents",
                    "value": {
                      "data": [
                        {
                          "id": "document_example",
                          "object": "document",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "document_type": "bank_statement",
                          "file_name": "statement-2026-09.pdf",
                          "mime_type": "application/pdf",
                          "byte_size": 123456,
                          "sha256": "sha256_example",
                          "storage_reference": "evidence_example",
                          "period_start": "2026-09-01",
                          "period_end": "2026-09-30",
                          "issued_on": "2026-10-01",
                          "issuer": "Example Bank",
                          "page_count": 5,
                          "extraction_status": "completed",
                          "extraction_model_version": "statement-parser-v1",
                          "extraction_confidence": null,
                          "review_status": "not_reviewed",
                          "retention_policy_id": "evidence-policy-v1",
                          "stop_reason": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "document_example",
                          "object": "document",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP144",
        "summary": "Upload document",
        "description": "Upload permitted evidence.\n\nRequired scope: `documents:write`. Validate file content; poll document extraction state. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "documents:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/documents\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --form 'file=@statement-2026-09.pdf' \\\n  --form 'subject_id=biz_example' \\\n  --form 'document_type=bank_statement' \\\n  --form 'period_start=2026-09-01' \\\n  --form 'period_end=2026-09-30'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nwith open(\"statement-2026-09.pdf\", \"rb\") as file:\n    response = requests.post(\n        base_url + \"/v1/documents\", headers=headers,\n        files={\"file\": (\"statement-2026-09.pdf\", file, \"application/pdf\")},\n        data={'subject_id': 'biz_example',\n 'document_type': 'bank_statement',\n 'period_start': '2026-09-01',\n 'period_end': '2026-09-30'},\n        timeout=30, allow_redirects=False,\n    )\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "import { readFile } from \"node:fs/promises\";\n\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst body = new FormData();\nbody.set(\"file\", new Blob([await readFile(\"statement-2026-09.pdf\")], { type: \"application/pdf\" }), \"statement-2026-09.pdf\");\nbody.set(\"subject_id\", \"biz_example\");\nbody.set(\"document_type\", \"bank_statement\");\nbody.set(\"period_start\", \"2026-09-01\");\nbody.set(\"period_end\", \"2026-09-30\");\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/documents\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body,\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "202": {
            "description": "Upload permitted evidence. Accepted work is not yet complete.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Document"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic upload document",
                    "value": {
                      "data": {
                        "id": "doc_upload_example",
                        "object": "document",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "document_type": "bank_statement",
                        "file_name": "statement-2026-09.pdf",
                        "mime_type": "application/pdf",
                        "byte_size": 123456,
                        "sha256": "sha256_example",
                        "storage_reference": "evidence_example",
                        "period_start": "2026-09-01",
                        "period_end": "2026-09-30",
                        "issued_on": "2026-10-01",
                        "issuer": "Example Bank",
                        "page_count": 5,
                        "extraction_status": "pending",
                        "extraction_model_version": "statement-parser-v1",
                        "extraction_confidence": null,
                        "review_status": "not_reviewed",
                        "retention_policy_id": "evidence-policy-v1",
                        "stop_reason": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/EP144Request"
              },
              "example": {
                "file": "statement-2026-09.pdf",
                "subject_id": "biz_example",
                "document_type": "bank_statement",
                "period_start": "2026-09-01",
                "period_end": "2026-09-30"
              }
            }
          }
        }
      }
    },
    "/v1/documents/{id}": {
      "get": {
        "operationId": "EP020",
        "summary": "Retrieve document",
        "description": "Retrieve one document with provenance.\n\nRequired scope: `documents:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "doc_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "documents:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/documents/doc_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/documents/doc_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/documents/doc_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one document with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DocumentRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve document",
                    "value": {
                      "data": {
                        "id": "doc_example",
                        "object": "document",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "document_type": "bank_statement",
                        "file_name": "statement-2026-09.pdf",
                        "mime_type": "application/pdf",
                        "byte_size": 123456,
                        "sha256": "sha256_example",
                        "storage_reference": "evidence_example",
                        "period_start": "2026-09-01",
                        "period_end": "2026-09-30",
                        "issued_on": "2026-10-01",
                        "issuer": "Example Bank",
                        "page_count": 5,
                        "extraction_status": "completed",
                        "extraction_model_version": "statement-parser-v1",
                        "extraction_confidence": null,
                        "review_status": "not_reviewed",
                        "retention_policy_id": "evidence-policy-v1",
                        "stop_reason": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "doc_example",
                        "object": "document",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/bank-accounts": {
      "get": {
        "operationId": "EP021",
        "summary": "List bank accounts",
        "description": "List authorized bank account records.\n\nRequired scope: `banking:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/bank-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/bank-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/bank-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized bank account records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankAccountRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list bank accounts",
                    "value": {
                      "data": [
                        {
                          "id": "bank_account_example",
                          "object": "bank_account",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "connection_id": "cnn_01JAMLOK",
                          "source_account_id": "account_example",
                          "name": "Operating account",
                          "official_name": "Business chequing",
                          "account_type": "depository",
                          "account_subtype": "checking",
                          "ownership_type": "business",
                          "institution_name": "Example Bank",
                          "country": "CA",
                          "mask": "1234",
                          "currency": "CAD",
                          "holder_names": [],
                          "holder_entity_ids": [],
                          "is_closed": false,
                          "opened_on": null,
                          "closed_on": null,
                          "bank_identifier": "000",
                          "branch_identifier": "00000",
                          "account_number_token": "tok_account"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "bank_account_example",
                          "object": "bank_account",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/bank-accounts/{id}": {
      "get": {
        "operationId": "EP022",
        "summary": "Retrieve bank account",
        "description": "Retrieve one bank account with provenance.\n\nRequired scope: `banking:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "bka_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/bank-accounts/bka_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/bank-accounts/bka_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/bank-accounts/bka_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one bank account with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BankAccountRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve bank account",
                    "value": {
                      "data": {
                        "id": "bka_example",
                        "object": "bank_account",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "connection_id": "cnn_01JAMLOK",
                        "source_account_id": "account_example",
                        "name": "Operating account",
                        "official_name": "Business chequing",
                        "account_type": "depository",
                        "account_subtype": "checking",
                        "ownership_type": "business",
                        "institution_name": "Example Bank",
                        "country": "CA",
                        "mask": "1234",
                        "currency": "CAD",
                        "holder_names": [],
                        "holder_entity_ids": [],
                        "is_closed": false,
                        "opened_on": null,
                        "closed_on": null,
                        "bank_identifier": "000",
                        "branch_identifier": "00000",
                        "account_number_token": "tok_account"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "bka_example",
                        "object": "bank_account",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/account-balances": {
      "get": {
        "operationId": "EP023",
        "summary": "List account balances",
        "description": "List authorized account balance records.\n\nRequired scope: `banking:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/account-balances?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/account-balances?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/account-balances?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized account balance records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AccountBalanceRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list account balances",
                    "value": {
                      "data": [
                        {
                          "id": "bal_example",
                          "object": "account_balance",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [
                            {
                              "field_path": "available.amount",
                              "reason": "not_provided"
                            },
                            {
                              "field_path": "as_of",
                              "reason": "not_provided"
                            }
                          ],
                          "schema_version": "1.4.2",
                          "account_id": "bka_example",
                          "balance_basis": "asset",
                          "current": {
                            "amount": "12500.25",
                            "currency": "CAD"
                          },
                          "available": {
                            "amount": null,
                            "currency": "CAD"
                          },
                          "as_of": null,
                          "retrieved_at": "2026-10-22T14:00:00Z",
                          "is_realtime": false,
                          "date_basis": "unknown"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "bal_example",
                          "object": "account_balance",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [
                            {
                              "field_path": "available.amount",
                              "reason": "not_provided"
                            },
                            {
                              "field_path": "as_of",
                              "reason": "not_provided"
                            }
                          ],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/account-balances/{id}": {
      "get": {
        "operationId": "EP024",
        "summary": "Retrieve account balance",
        "description": "Retrieve one account balance with provenance.\n\nRequired scope: `banking:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "account_balance_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/account-balances/account_balance_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/account-balances/account_balance_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/account-balances/account_balance_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one account balance with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AccountBalanceRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve account balance",
                    "value": {
                      "data": {
                        "id": "account_balance_example",
                        "object": "account_balance",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [
                          {
                            "field_path": "available.amount",
                            "reason": "not_provided"
                          },
                          {
                            "field_path": "as_of",
                            "reason": "not_provided"
                          }
                        ],
                        "schema_version": "1.4.2",
                        "account_id": "bka_example",
                        "balance_basis": "asset",
                        "current": {
                          "amount": "12500.25",
                          "currency": "CAD"
                        },
                        "available": {
                          "amount": null,
                          "currency": "CAD"
                        },
                        "as_of": null,
                        "retrieved_at": "2026-10-22T14:00:00Z",
                        "is_realtime": false,
                        "date_basis": "unknown"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "account_balance_example",
                        "object": "account_balance",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [
                          {
                            "field_path": "available.amount",
                            "reason": "not_provided"
                          },
                          {
                            "field_path": "as_of",
                            "reason": "not_provided"
                          }
                        ],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/bank-transactions": {
      "get": {
        "operationId": "EP025",
        "summary": "List bank transactions",
        "description": "List authorized bank transaction records.\n\nRequired scope: `banking:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_transaction_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "account_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized financial account.",
            "schema": {
              "type": "string"
            },
            "example": "bka_example"
          },
          {
            "name": "posted_from",
            "in": "query",
            "required": false,
            "description": "Inclusive posting date; only known posted dates qualify.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-09-01"
          },
          {
            "name": "posted_to",
            "in": "query",
            "required": false,
            "description": "Exclusive posting date.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-10-01"
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "description": "Filter known movement direction.",
            "schema": {
              "$ref": "#/components/schemas/Enum_direction"
            },
            "example": "inflow"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/bank-transactions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&account_id=bka_example&posted_from=2026-09-01&posted_to=2026-10-01&direction=inflow\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/bank-transactions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&account_id=bka_example&posted_from=2026-09-01&posted_to=2026-10-01&direction=inflow\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/bank-transactions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&account_id=bka_example&posted_from=2026-09-01&posted_to=2026-10-01&direction=inflow\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized bank transaction records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BankTransactionRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list bank transactions",
                    "value": {
                      "data": [
                        {
                          "id": "btx_example",
                          "object": "bank_transaction",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [
                            {
                              "provider_id": "BANK-02",
                              "connection_id": "cnn_example",
                              "source_record_id": "source_txn",
                              "source_record_type": "transaction",
                              "retrieved_at": "2026-10-22T14:00:00Z"
                            }
                          ],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "account_id": "bka_example",
                          "amount": {
                            "amount": "1250.00",
                            "currency": "CAD"
                          },
                          "direction": "inflow",
                          "status": "posted",
                          "posted_on": "2026-10-21",
                          "field_provenance": [
                            {
                              "field_path": "direction",
                              "source_ref_index": 0,
                              "source_field_path": "added[].amount",
                              "transformation_id": "plaid_transactions_direction_v1",
                              "evidence_level": "source_record"
                            }
                          ]
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "btx_example",
                          "object": "bank_transaction",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [
                            {
                              "provider_id": "BANK-02",
                              "connection_id": "cnn_example",
                              "source_record_id": "source_txn",
                              "source_record_type": "transaction",
                              "retrieved_at": "2026-10-22T14:00:00Z"
                            }
                          ],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/bank-transactions/{id}": {
      "get": {
        "operationId": "EP026",
        "summary": "Retrieve bank transaction",
        "description": "Retrieve one bank transaction with provenance.\n\nRequired scope: `banking:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "btx_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/bank-transactions/btx_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/bank-transactions/btx_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/bank-transactions/btx_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one bank transaction with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BankTransactionRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve bank transaction",
                    "value": {
                      "data": {
                        "id": "btx_example",
                        "object": "bank_transaction",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [
                          {
                            "provider_id": "BANK-02",
                            "connection_id": "cnn_example",
                            "source_record_id": "source_txn",
                            "source_record_type": "transaction",
                            "retrieved_at": "2026-10-22T14:00:00Z"
                          }
                        ],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "account_id": "bka_example",
                        "amount": {
                          "amount": "1250.00",
                          "currency": "CAD"
                        },
                        "direction": "inflow",
                        "status": "posted",
                        "posted_on": "2026-10-21",
                        "field_provenance": [
                          {
                            "field_path": "direction",
                            "source_ref_index": 0,
                            "source_field_path": "added[].amount",
                            "transformation_id": "plaid_transactions_direction_v1",
                            "evidence_level": "source_record"
                          }
                        ]
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "btx_example",
                        "object": "bank_transaction",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [
                          {
                            "provider_id": "BANK-02",
                            "connection_id": "cnn_example",
                            "source_record_id": "source_txn",
                            "source_record_type": "transaction",
                            "retrieved_at": "2026-10-22T14:00:00Z"
                          }
                        ],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/recurring-streams": {
      "get": {
        "operationId": "EP027",
        "summary": "List recurring streams",
        "description": "List authorized recurring stream records.\n\nRequired scope: `banking:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/recurring-streams?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/recurring-streams?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/recurring-streams?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized recurring stream records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RecurringStreamRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list recurring streams",
                    "value": {
                      "data": [
                        {
                          "id": "recurring_stream_example",
                          "object": "recurring_stream",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "account_id": "bka_01JAMLOK",
                          "direction": "outflow",
                          "description": "Monthly equipment payment",
                          "counterparty_id": "pty_lender",
                          "frequency": "monthly",
                          "average_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "last_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "first_seen_on": "2026-01-15",
                          "last_seen_on": "2026-10-15",
                          "next_expected_on": "2026-11-15",
                          "transaction_ids": [
                            "btx_a",
                            "btx_b"
                          ],
                          "is_active": true,
                          "method_version": "recurrence-v1"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "recurring_stream_example",
                          "object": "recurring_stream",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/recurring-streams/{id}": {
      "get": {
        "operationId": "EP028",
        "summary": "Retrieve recurring stream",
        "description": "Retrieve one recurring stream with provenance.\n\nRequired scope: `banking:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "recurring_stream_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/recurring-streams/recurring_stream_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/recurring-streams/recurring_stream_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/recurring-streams/recurring_stream_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one recurring stream with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RecurringStreamRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve recurring stream",
                    "value": {
                      "data": {
                        "id": "recurring_stream_example",
                        "object": "recurring_stream",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "account_id": "bka_01JAMLOK",
                        "direction": "outflow",
                        "description": "Monthly equipment payment",
                        "counterparty_id": "pty_lender",
                        "frequency": "monthly",
                        "average_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "last_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "first_seen_on": "2026-01-15",
                        "last_seen_on": "2026-10-15",
                        "next_expected_on": "2026-11-15",
                        "transaction_ids": [
                          "btx_a",
                          "btx_b"
                        ],
                        "is_active": true,
                        "method_version": "recurrence-v1"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "recurring_stream_example",
                        "object": "recurring_stream",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/income-observations": {
      "get": {
        "operationId": "EP029",
        "summary": "List income observations",
        "description": "List authorized income observation records.\n\nRequired scope: `banking:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/income-observations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/income-observations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/income-observations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized income observation records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/IncomeObservationRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list income observations",
                    "value": {
                      "data": [
                        {
                          "id": "income_observation_example",
                          "object": "income_observation",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "person_id": "per_example",
                          "income_source": "Example Employer",
                          "income_type": "employment",
                          "gross_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "net_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "period_start": "2026-09-01",
                          "period_end": "2026-09-30",
                          "frequency": "monthly",
                          "evidence_level": "source_record",
                          "transaction_ids": [],
                          "document_ids": [],
                          "verified_at": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "income_observation_example",
                          "object": "income_observation",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/income-observations/{id}": {
      "get": {
        "operationId": "EP030",
        "summary": "Retrieve income observation",
        "description": "Retrieve one income observation with provenance.\n\nRequired scope: `banking:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Banking"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "income_observation_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "banking:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/income-observations/income_observation_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/income-observations/income_observation_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/income-observations/income_observation_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one income observation with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/IncomeObservationRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve income observation",
                    "value": {
                      "data": {
                        "id": "income_observation_example",
                        "object": "income_observation",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "person_id": "per_example",
                        "income_source": "Example Employer",
                        "income_type": "employment",
                        "gross_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "net_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "period_start": "2026-09-01",
                        "period_end": "2026-09-30",
                        "frequency": "monthly",
                        "evidence_level": "source_record",
                        "transaction_ids": [],
                        "document_ids": [],
                        "verified_at": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "income_observation_example",
                        "object": "income_observation",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/merchant-accounts": {
      "get": {
        "operationId": "EP031",
        "summary": "List merchant accounts",
        "description": "List authorized merchant account records.\n\nRequired scope: `payments:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/merchant-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/merchant-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/merchant-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized merchant account records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MerchantAccountRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list merchant accounts",
                    "value": {
                      "data": [
                        {
                          "id": "merchant_account_example",
                          "object": "merchant_account",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "connection_id": "cnn_merchant",
                          "merchant_id": "merchant_example",
                          "display_name": "Example Store",
                          "processor": "Example Processor",
                          "country": "CA",
                          "settlement_currency": "CAD",
                          "status": "active",
                          "settlement_schedule": "daily",
                          "payout_account_id": "bka_example",
                          "reserve_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "reserve_policy": "rolling reserve"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "merchant_account_example",
                          "object": "merchant_account",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/merchant-accounts/{id}": {
      "get": {
        "operationId": "EP032",
        "summary": "Retrieve merchant account",
        "description": "Retrieve one merchant account with provenance.\n\nRequired scope: `payments:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "merchant_account_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/merchant-accounts/merchant_account_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/merchant-accounts/merchant_account_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/merchant-accounts/merchant_account_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one merchant account with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MerchantAccountRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve merchant account",
                    "value": {
                      "data": {
                        "id": "merchant_account_example",
                        "object": "merchant_account",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "connection_id": "cnn_merchant",
                        "merchant_id": "merchant_example",
                        "display_name": "Example Store",
                        "processor": "Example Processor",
                        "country": "CA",
                        "settlement_currency": "CAD",
                        "status": "active",
                        "settlement_schedule": "daily",
                        "payout_account_id": "bka_example",
                        "reserve_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "reserve_policy": "rolling reserve"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "merchant_account_example",
                        "object": "merchant_account",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/payments": {
      "get": {
        "operationId": "EP033",
        "summary": "List payments",
        "description": "List authorized payment records.\n\nRequired scope: `payments:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_payment_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/payments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/payments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/payments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized payment records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list payments",
                    "value": {
                      "data": [
                        {
                          "id": "payment_example",
                          "object": "payment",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "merchant_account_id": "mca_example",
                          "order_id": "ord_example",
                          "customer_id": "pty_example",
                          "source_payment_id": "pay_provider",
                          "status": "captured",
                          "amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "captured_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "refunded_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "fee_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "net_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "method_type": "card",
                          "card_brand": "visa",
                          "card_last4": "1234",
                          "authorized_at": null,
                          "captured_at": null,
                          "settled_at": null,
                          "failure_code": null,
                          "payout_id": "pyo_example"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "payment_example",
                          "object": "payment",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/payments/{id}": {
      "get": {
        "operationId": "EP034",
        "summary": "Retrieve payment",
        "description": "Retrieve one payment with provenance.\n\nRequired scope: `payments:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "payment_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/payments/payment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/payments/payment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/payments/payment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one payment with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PaymentRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve payment",
                    "value": {
                      "data": {
                        "id": "payment_example",
                        "object": "payment",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "merchant_account_id": "mca_example",
                        "order_id": "ord_example",
                        "customer_id": "pty_example",
                        "source_payment_id": "pay_provider",
                        "status": "captured",
                        "amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "captured_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "refunded_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "fee_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "net_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "method_type": "card",
                        "card_brand": "visa",
                        "card_last4": "1234",
                        "authorized_at": null,
                        "captured_at": null,
                        "settled_at": null,
                        "failure_code": null,
                        "payout_id": "pyo_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "payment_example",
                        "object": "payment",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/processor-transactions": {
      "get": {
        "operationId": "EP035",
        "summary": "List processor transactions",
        "description": "List authorized processor transaction records.\n\nRequired scope: `payments:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/processor-transactions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/processor-transactions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/processor-transactions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized processor transaction records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProcessorTransactionRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list processor transactions",
                    "value": {
                      "data": [
                        {
                          "id": "processor_transaction_example",
                          "object": "processor_transaction",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "merchant_account_id": "mca_example",
                          "source_transaction_id": "txn_provider",
                          "event_type": "charge",
                          "gross": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "fee": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "net": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "reporting_category": "charge",
                          "availability_status": "available",
                          "available_on": "2026-10-22",
                          "occurred_at": null,
                          "source_object_id": "ch_example",
                          "payment_id": "pay_example"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "processor_transaction_example",
                          "object": "processor_transaction",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/processor-transactions/{id}": {
      "get": {
        "operationId": "EP036",
        "summary": "Retrieve processor transaction",
        "description": "Retrieve one processor transaction with provenance.\n\nRequired scope: `payments:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "processor_transaction_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/processor-transactions/processor_transaction_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/processor-transactions/processor_transaction_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/processor-transactions/processor_transaction_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one processor transaction with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProcessorTransactionRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve processor transaction",
                    "value": {
                      "data": {
                        "id": "processor_transaction_example",
                        "object": "processor_transaction",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "merchant_account_id": "mca_example",
                        "source_transaction_id": "txn_provider",
                        "event_type": "charge",
                        "gross": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "fee": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "net": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "reporting_category": "charge",
                        "availability_status": "available",
                        "available_on": "2026-10-22",
                        "occurred_at": null,
                        "source_object_id": "ch_example",
                        "payment_id": "pay_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "processor_transaction_example",
                        "object": "processor_transaction",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/payouts": {
      "get": {
        "operationId": "EP037",
        "summary": "List payouts",
        "description": "List authorized payout records.\n\nRequired scope: `payments:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_payout_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/payouts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/payouts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/payouts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized payout records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PayoutRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list payouts",
                    "value": {
                      "data": [
                        {
                          "id": "payout_example",
                          "object": "payout",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "merchant_account_id": "mca_example",
                          "source_payout_id": "po_example",
                          "status": "paid",
                          "gross": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "fees": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "net": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "created_on": "2026-10-21",
                          "expected_arrival_on": "2026-10-22",
                          "paid_at": null,
                          "destination_account_id": "bka_example",
                          "bank_transaction_id": "btx_example",
                          "reconciliation_status": "matched",
                          "failure_code": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "payout_example",
                          "object": "payout",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/payouts/{id}": {
      "get": {
        "operationId": "EP038",
        "summary": "Retrieve payout",
        "description": "Retrieve one payout with provenance.\n\nRequired scope: `payments:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "payout_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/payouts/payout_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/payouts/payout_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/payouts/payout_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one payout with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PayoutRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve payout",
                    "value": {
                      "data": {
                        "id": "payout_example",
                        "object": "payout",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "merchant_account_id": "mca_example",
                        "source_payout_id": "po_example",
                        "status": "paid",
                        "gross": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "fees": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "net": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "created_on": "2026-10-21",
                        "expected_arrival_on": "2026-10-22",
                        "paid_at": null,
                        "destination_account_id": "bka_example",
                        "bank_transaction_id": "btx_example",
                        "reconciliation_status": "matched",
                        "failure_code": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "payout_example",
                        "object": "payout",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/refunds": {
      "get": {
        "operationId": "EP039",
        "summary": "List refunds",
        "description": "List authorized refund records.\n\nRequired scope: `payments:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/refunds?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/refunds?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/refunds?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized refund records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RefundRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list refunds",
                    "value": {
                      "data": [
                        {
                          "id": "refund_example",
                          "object": "refund",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "payment_id": "pay_example",
                          "order_id": "ord_example",
                          "amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "status": "succeeded",
                          "reason": "requested_by_customer",
                          "requested_at": null,
                          "completed_at": null,
                          "processor_transaction_id": "ptx_example"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "refund_example",
                          "object": "refund",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/refunds/{id}": {
      "get": {
        "operationId": "EP040",
        "summary": "Retrieve refund",
        "description": "Retrieve one refund with provenance.\n\nRequired scope: `payments:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "refund_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/refunds/refund_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/refunds/refund_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/refunds/refund_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one refund with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RefundRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve refund",
                    "value": {
                      "data": {
                        "id": "refund_example",
                        "object": "refund",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "payment_id": "pay_example",
                        "order_id": "ord_example",
                        "amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "status": "succeeded",
                        "reason": "requested_by_customer",
                        "requested_at": null,
                        "completed_at": null,
                        "processor_transaction_id": "ptx_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "refund_example",
                        "object": "refund",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/disputes": {
      "get": {
        "operationId": "EP041",
        "summary": "List disputes",
        "description": "List authorized dispute records.\n\nRequired scope: `payments:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_dispute_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/disputes?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/disputes?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/disputes?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized dispute records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DisputeRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list disputes",
                    "value": {
                      "data": [
                        {
                          "id": "dispute_example",
                          "object": "dispute",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "payment_id": "pay_example",
                          "amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "reason_code": "fraudulent",
                          "status": "under_review",
                          "opened_at": null,
                          "response_due_at": null,
                          "closed_at": null,
                          "evidence_submitted": true,
                          "fee_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          }
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "dispute_example",
                          "object": "dispute",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/disputes/{id}": {
      "get": {
        "operationId": "EP042",
        "summary": "Retrieve dispute",
        "description": "Retrieve one dispute with provenance.\n\nRequired scope: `payments:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Payments"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "dispute_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "payments:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/disputes/dispute_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/disputes/dispute_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/disputes/dispute_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one dispute with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DisputeRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve dispute",
                    "value": {
                      "data": {
                        "id": "dispute_example",
                        "object": "dispute",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "payment_id": "pay_example",
                        "amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "reason_code": "fraudulent",
                        "status": "under_review",
                        "opened_at": null,
                        "response_due_at": null,
                        "closed_at": null,
                        "evidence_submitted": true,
                        "fee_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "dispute_example",
                        "object": "dispute",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/counterparties": {
      "get": {
        "operationId": "EP043",
        "summary": "List counterparties",
        "description": "List authorized counterparty records.\n\nRequired scope: `commerce:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Commerce"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "commerce:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/counterparties?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/counterparties?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/counterparties?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized counterparty records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CounterpartyRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list counterparties",
                    "value": {
                      "data": [
                        {
                          "id": "counterparty_example",
                          "object": "counterparty",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "counterparty_type": "customer",
                          "display_name": "Example Customer",
                          "legal_name": "Example Customer Ltd.",
                          "resolved_entity_id": "biz_customer",
                          "email": "customer@example.com",
                          "phone": "+14165550102",
                          "billing_address": {
                            "city": "Ottawa",
                            "country": "CA"
                          },
                          "shipping_address": null,
                          "tax_identifier_token": null,
                          "payment_terms_days": 30,
                          "credit_limit": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "is_active": true
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "counterparty_example",
                          "object": "counterparty",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/counterparties/{id}": {
      "get": {
        "operationId": "EP044",
        "summary": "Retrieve counterparty",
        "description": "Retrieve one counterparty with provenance.\n\nRequired scope: `commerce:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Commerce"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "counterparty_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "commerce:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/counterparties/counterparty_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/counterparties/counterparty_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/counterparties/counterparty_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one counterparty with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CounterpartyRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve counterparty",
                    "value": {
                      "data": {
                        "id": "counterparty_example",
                        "object": "counterparty",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "counterparty_type": "customer",
                        "display_name": "Example Customer",
                        "legal_name": "Example Customer Ltd.",
                        "resolved_entity_id": "biz_customer",
                        "email": "customer@example.com",
                        "phone": "+14165550102",
                        "billing_address": {
                          "city": "Ottawa",
                          "country": "CA"
                        },
                        "shipping_address": null,
                        "tax_identifier_token": null,
                        "payment_terms_days": 30,
                        "credit_limit": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "is_active": true
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "counterparty_example",
                        "object": "counterparty",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/orders": {
      "get": {
        "operationId": "EP045",
        "summary": "List orders",
        "description": "List authorized order records.\n\nRequired scope: `commerce:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Commerce"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_order_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "placed_from",
            "in": "query",
            "required": false,
            "description": "Inclusive order placement timestamp.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "placed_to",
            "in": "query",
            "required": false,
            "description": "Exclusive order placement timestamp.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "commerce:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized order records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrderRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list orders",
                    "value": {
                      "data": [
                        {
                          "id": "order_example",
                          "object": "order",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "order_number": "ORD-1001",
                          "source_order_id": "gid://example/Order/1001",
                          "customer_id": "pty_example",
                          "location_id": "loc_example",
                          "channel": "online",
                          "status": "completed",
                          "payment_status": "paid",
                          "fulfillment_status": "fulfilled",
                          "placed_at": null,
                          "cancelled_at": null,
                          "subtotal": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "discount_total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "tax_total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "shipping_total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "current_total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "refunded_total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "presentment_currency": "USD",
                          "taxes_included": false,
                          "is_test": false,
                          "line_ids": [
                            "oli_example"
                          ]
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "order_example",
                          "object": "order",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/orders/{id}": {
      "get": {
        "operationId": "EP046",
        "summary": "Retrieve order",
        "description": "Retrieve one order with provenance.\n\nRequired scope: `commerce:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Commerce"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "order_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "commerce:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/orders/order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/orders/order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/orders/order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one order with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrderRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve order",
                    "value": {
                      "data": {
                        "id": "order_example",
                        "object": "order",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "order_number": "ORD-1001",
                        "source_order_id": "gid://example/Order/1001",
                        "customer_id": "pty_example",
                        "location_id": "loc_example",
                        "channel": "online",
                        "status": "completed",
                        "payment_status": "paid",
                        "fulfillment_status": "fulfilled",
                        "placed_at": null,
                        "cancelled_at": null,
                        "subtotal": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "discount_total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "tax_total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "shipping_total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "current_total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "refunded_total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "presentment_currency": "USD",
                        "taxes_included": false,
                        "is_test": false,
                        "line_ids": [
                          "oli_example"
                        ]
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "order_example",
                        "object": "order",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/order-lines": {
      "get": {
        "operationId": "EP047",
        "summary": "List order lines",
        "description": "List authorized order line records.\n\nRequired scope: `commerce:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Commerce"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "commerce:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/order-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/order-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/order-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized order line records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OrderLineRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list order lines",
                    "value": {
                      "data": [
                        {
                          "id": "order_line_example",
                          "object": "order_line",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "order_id": "ord_example",
                          "product_id": "prd_example",
                          "sku": "SKU-1001",
                          "description": "Steel component",
                          "quantity": "10",
                          "unit_of_measure": "each",
                          "unit_price": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "discount_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "tax_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "line_total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "quantity_fulfilled": "10",
                          "quantity_refunded": "0"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "order_line_example",
                          "object": "order_line",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/order-lines/{id}": {
      "get": {
        "operationId": "EP048",
        "summary": "Retrieve order line",
        "description": "Retrieve one order line with provenance.\n\nRequired scope: `commerce:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Commerce"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "order_line_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "commerce:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/order-lines/order_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/order-lines/order_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/order-lines/order_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one order line with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/OrderLineRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve order line",
                    "value": {
                      "data": {
                        "id": "order_line_example",
                        "object": "order_line",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "order_id": "ord_example",
                        "product_id": "prd_example",
                        "sku": "SKU-1001",
                        "description": "Steel component",
                        "quantity": "10",
                        "unit_of_measure": "each",
                        "unit_price": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "discount_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "tax_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "line_total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "quantity_fulfilled": "10",
                        "quantity_refunded": "0"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "order_line_example",
                        "object": "order_line",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/subscriptions": {
      "get": {
        "operationId": "EP049",
        "summary": "List subscriptions",
        "description": "List authorized subscription records.\n\nRequired scope: `commerce:read`. Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient.",
        "tags": [
          "Commerce"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "commerce:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/subscriptions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/subscriptions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/subscriptions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized subscription records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubscriptionRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list subscriptions",
                    "value": {
                      "data": [
                        {
                          "id": "subscription_example",
                          "object": "subscription",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "customer_id": "pty_example",
                          "product_id": "prd_example",
                          "status": "active",
                          "frequency": "monthly",
                          "recurring_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "started_on": "2026-01-01",
                          "current_period_start": "2026-10-01",
                          "current_period_end": "2026-11-01",
                          "cancelled_on": null,
                          "next_billing_on": "2026-11-01"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "subscription_example",
                          "object": "subscription",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/subscriptions/{id}": {
      "get": {
        "operationId": "EP050",
        "summary": "Retrieve subscription",
        "description": "Retrieve one subscription with provenance.\n\nRequired scope: `commerce:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Commerce"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "subscription_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "commerce:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/subscriptions/subscription_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/subscriptions/subscription_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/subscriptions/subscription_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one subscription with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubscriptionRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve subscription",
                    "value": {
                      "data": {
                        "id": "subscription_example",
                        "object": "subscription",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "customer_id": "pty_example",
                        "product_id": "prd_example",
                        "status": "active",
                        "frequency": "monthly",
                        "recurring_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "started_on": "2026-01-01",
                        "current_period_start": "2026-10-01",
                        "current_period_end": "2026-11-01",
                        "cancelled_on": null,
                        "next_billing_on": "2026-11-01"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "subscription_example",
                        "object": "subscription",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/ledger-accounts": {
      "get": {
        "operationId": "EP051",
        "summary": "List ledger accounts",
        "description": "List authorized ledger account records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/ledger-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/ledger-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/ledger-accounts?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized ledger account records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LedgerAccountRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list ledger accounts",
                    "value": {
                      "data": [
                        {
                          "id": "ledger_account_example",
                          "object": "ledger_account",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "code": "4000",
                          "name": "Product sales",
                          "account_type": "revenue",
                          "source_account_type": "Income",
                          "parent_account_id": "gla_parent",
                          "normal_balance": "credit",
                          "currency": "CAD",
                          "is_active": true,
                          "is_trust_account": false
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "ledger_account_example",
                          "object": "ledger_account",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/ledger-accounts/{id}": {
      "get": {
        "operationId": "EP052",
        "summary": "Retrieve ledger account",
        "description": "Retrieve one ledger account with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "ledger_account_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/ledger-accounts/ledger_account_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/ledger-accounts/ledger_account_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/ledger-accounts/ledger_account_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one ledger account with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LedgerAccountRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve ledger account",
                    "value": {
                      "data": {
                        "id": "ledger_account_example",
                        "object": "ledger_account",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "code": "4000",
                        "name": "Product sales",
                        "account_type": "revenue",
                        "source_account_type": "Income",
                        "parent_account_id": "gla_parent",
                        "normal_balance": "credit",
                        "currency": "CAD",
                        "is_active": true,
                        "is_trust_account": false
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "ledger_account_example",
                        "object": "ledger_account",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/journals": {
      "get": {
        "operationId": "EP053",
        "summary": "List journals",
        "description": "List authorized journal records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/journals?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/journals?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/journals?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized journal records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JournalRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list journals",
                    "value": {
                      "data": [
                        {
                          "id": "journal_example",
                          "object": "journal",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "journal_number": "JE-1001",
                          "posted_on": "2026-09-30",
                          "description": "Month-end accrual",
                          "status": "posted",
                          "source_document_type": "invoice",
                          "source_document_id": "inv_example",
                          "reverses_journal_id": null,
                          "line_ids": [
                            "jli_debit",
                            "jli_credit"
                          ]
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "journal_example",
                          "object": "journal",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/journals/{id}": {
      "get": {
        "operationId": "EP054",
        "summary": "Retrieve journal",
        "description": "Retrieve one journal with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "journal_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/journals/journal_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/journals/journal_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/journals/journal_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one journal with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/JournalRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve journal",
                    "value": {
                      "data": {
                        "id": "journal_example",
                        "object": "journal",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "journal_number": "JE-1001",
                        "posted_on": "2026-09-30",
                        "description": "Month-end accrual",
                        "status": "posted",
                        "source_document_type": "invoice",
                        "source_document_id": "inv_example",
                        "reverses_journal_id": null,
                        "line_ids": [
                          "jli_debit",
                          "jli_credit"
                        ]
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "journal_example",
                        "object": "journal",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/journal-lines": {
      "get": {
        "operationId": "EP055",
        "summary": "List journal lines",
        "description": "List authorized journal line records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/journal-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/journal-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/journal-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized journal line records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JournalLineRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list journal lines",
                    "value": {
                      "data": [
                        {
                          "id": "journal_line_example",
                          "object": "journal_line",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "journal_id": "jnl_example",
                          "ledger_account_id": "gla_example",
                          "debit": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "credit": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "base_debit": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "base_credit": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "description": "Invoice posting",
                          "department": "Manufacturing",
                          "project_id": "prj_example",
                          "counterparty_id": "pty_example"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "journal_line_example",
                          "object": "journal_line",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/journal-lines/{id}": {
      "get": {
        "operationId": "EP056",
        "summary": "Retrieve journal line",
        "description": "Retrieve one journal line with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "journal_line_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/journal-lines/journal_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/journal-lines/journal_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/journal-lines/journal_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one journal line with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/JournalLineRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve journal line",
                    "value": {
                      "data": {
                        "id": "journal_line_example",
                        "object": "journal_line",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "journal_id": "jnl_example",
                        "ledger_account_id": "gla_example",
                        "debit": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "credit": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "base_debit": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "base_credit": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "description": "Invoice posting",
                        "department": "Manufacturing",
                        "project_id": "prj_example",
                        "counterparty_id": "pty_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "journal_line_example",
                        "object": "journal_line",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/invoices": {
      "get": {
        "operationId": "EP057",
        "summary": "List invoices",
        "description": "List authorized invoice records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_invoice_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "due_before",
            "in": "query",
            "required": false,
            "description": "Exclusive due-date boundary; unknown dates do not match.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-10-22"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/invoices?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&due_before=2026-10-22\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/invoices?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&due_before=2026-10-22\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/invoices?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&due_before=2026-10-22\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized invoice records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InvoiceRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list invoices",
                    "value": {
                      "data": [
                        {
                          "id": "inv_example",
                          "object": "invoice",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "counterparty_id": "pty_example",
                          "number": "INV-1001",
                          "status": "partially_paid",
                          "issued_on": "2026-09-01",
                          "due_on": "2026-10-01",
                          "total": {
                            "amount": "1130.00",
                            "currency": "CAD"
                          },
                          "amount_paid": {
                            "amount": "500.00",
                            "currency": "CAD"
                          },
                          "amount_due": {
                            "amount": "630.00",
                            "currency": "CAD"
                          }
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "inv_example",
                          "object": "invoice",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/invoices/{id}": {
      "get": {
        "operationId": "EP058",
        "summary": "Retrieve invoice",
        "description": "Retrieve one invoice with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "invoice_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/invoices/invoice_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/invoices/invoice_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/invoices/invoice_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one invoice with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InvoiceRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve invoice",
                    "value": {
                      "data": {
                        "id": "invoice_example",
                        "object": "invoice",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "counterparty_id": "pty_example",
                        "number": "INV-1001",
                        "status": "partially_paid",
                        "issued_on": "2026-09-01",
                        "due_on": "2026-10-01",
                        "total": {
                          "amount": "1130.00",
                          "currency": "CAD"
                        },
                        "amount_paid": {
                          "amount": "500.00",
                          "currency": "CAD"
                        },
                        "amount_due": {
                          "amount": "630.00",
                          "currency": "CAD"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "invoice_example",
                        "object": "invoice",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/bills": {
      "get": {
        "operationId": "EP059",
        "summary": "List bills",
        "description": "List authorized bill records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_invoice_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "due_before",
            "in": "query",
            "required": false,
            "description": "Exclusive due-date boundary; unknown dates do not match.",
            "schema": {
              "type": "string",
              "format": "date"
            },
            "example": "2026-10-22"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/bills?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&due_before=2026-10-22\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/bills?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&due_before=2026-10-22\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/bills?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&due_before=2026-10-22\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized bill records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list bills",
                    "value": {
                      "data": [
                        {
                          "id": "bill_example",
                          "object": "bill",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "number": "INV-1001",
                          "counterparty_id": "pty_example",
                          "issued_on": "2026-09-01",
                          "due_on": "2026-10-01",
                          "status": "partially_paid",
                          "subtotal": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "tax_total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "amount_due": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "amount_paid": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "amount_credited": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "fully_paid_on": null,
                          "payment_terms_days": 30,
                          "line_items": [],
                          "document_id": "doc_invoice",
                          "home_total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "exchange_rate": "1.35"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "bill_example",
                          "object": "bill",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/bills/{id}": {
      "get": {
        "operationId": "EP060",
        "summary": "Retrieve bill",
        "description": "Retrieve one bill with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "bill_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/bills/bill_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/bills/bill_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/bills/bill_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one bill with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve bill",
                    "value": {
                      "data": {
                        "id": "bill_example",
                        "object": "bill",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "number": "INV-1001",
                        "counterparty_id": "pty_example",
                        "issued_on": "2026-09-01",
                        "due_on": "2026-10-01",
                        "status": "partially_paid",
                        "subtotal": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "tax_total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "amount_due": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "amount_paid": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "amount_credited": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "fully_paid_on": null,
                        "payment_terms_days": 30,
                        "line_items": [],
                        "document_id": "doc_invoice",
                        "home_total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "exchange_rate": "1.35"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "bill_example",
                        "object": "bill",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/credit-notes": {
      "get": {
        "operationId": "EP061",
        "summary": "List credit notes",
        "description": "List authorized credit note records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/credit-notes?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/credit-notes?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/credit-notes?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized credit note records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CreditNoteRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list credit notes",
                    "value": {
                      "data": [
                        {
                          "id": "credit_note_example",
                          "object": "credit_note",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "number": "CN-1001",
                          "counterparty_id": "pty_example",
                          "invoice_id": "inv_example",
                          "bill_id": null,
                          "issued_on": "2026-10-01",
                          "status": "authorized",
                          "total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "remaining_credit": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "reason": "Returned goods"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "credit_note_example",
                          "object": "credit_note",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/credit-notes/{id}": {
      "get": {
        "operationId": "EP062",
        "summary": "Retrieve credit note",
        "description": "Retrieve one credit note with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "credit_note_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/credit-notes/credit_note_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/credit-notes/credit_note_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/credit-notes/credit_note_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one credit note with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditNoteRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve credit note",
                    "value": {
                      "data": {
                        "id": "credit_note_example",
                        "object": "credit_note",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "number": "CN-1001",
                        "counterparty_id": "pty_example",
                        "invoice_id": "inv_example",
                        "bill_id": null,
                        "issued_on": "2026-10-01",
                        "status": "authorized",
                        "total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "remaining_credit": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "reason": "Returned goods"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "credit_note_example",
                        "object": "credit_note",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/accounting-payments": {
      "get": {
        "operationId": "EP063",
        "summary": "List accounting payments",
        "description": "List authorized accounting payment records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/accounting-payments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/accounting-payments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/accounting-payments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized accounting payment records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AccountingPaymentRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list accounting payments",
                    "value": {
                      "data": [
                        {
                          "id": "accounting_payment_example",
                          "object": "accounting_payment",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "counterparty_id": "pty_example",
                          "direction": "inflow",
                          "amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "paid_on": "2026-10-01",
                          "bank_account_id": "bka_example",
                          "ledger_account_id": "gla_cash",
                          "allocations": [],
                          "bank_transaction_id": "btx_example",
                          "reconciliation_status": "matched"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "accounting_payment_example",
                          "object": "accounting_payment",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/accounting-payments/{id}": {
      "get": {
        "operationId": "EP064",
        "summary": "Retrieve accounting payment",
        "description": "Retrieve one accounting payment with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "accounting_payment_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/accounting-payments/accounting_payment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/accounting-payments/accounting_payment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/accounting-payments/accounting_payment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one accounting payment with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AccountingPaymentRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve accounting payment",
                    "value": {
                      "data": {
                        "id": "accounting_payment_example",
                        "object": "accounting_payment",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "counterparty_id": "pty_example",
                        "direction": "inflow",
                        "amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "paid_on": "2026-10-01",
                        "bank_account_id": "bka_example",
                        "ledger_account_id": "gla_cash",
                        "allocations": [],
                        "bank_transaction_id": "btx_example",
                        "reconciliation_status": "matched"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "accounting_payment_example",
                        "object": "accounting_payment",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/financial-statements": {
      "get": {
        "operationId": "EP065",
        "summary": "List financial statements",
        "description": "List authorized financial statement records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/financial-statements?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/financial-statements?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/financial-statements?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized financial statement records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FinancialStatementRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list financial statements",
                    "value": {
                      "data": [
                        {
                          "id": "financial_statement_example",
                          "object": "financial_statement",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "statement_type": "income_statement",
                          "period_start": "2026-01-01",
                          "period_end": "2026-09-30",
                          "accounting_basis": "accrual",
                          "currency": "CAD",
                          "is_consolidated": false,
                          "is_audited": false,
                          "source_report_name": "Profit and Loss",
                          "generated_at": null,
                          "document_id": "doc_statement",
                          "line_ids": [
                            "fsl_revenue",
                            "fsl_expense"
                          ]
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "financial_statement_example",
                          "object": "financial_statement",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/financial-statements/{id}": {
      "get": {
        "operationId": "EP066",
        "summary": "Retrieve financial statement",
        "description": "Retrieve one financial statement with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "financial_statement_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/financial-statements/financial_statement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/financial-statements/financial_statement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/financial-statements/financial_statement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one financial statement with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FinancialStatementRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve financial statement",
                    "value": {
                      "data": {
                        "id": "financial_statement_example",
                        "object": "financial_statement",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "statement_type": "income_statement",
                        "period_start": "2026-01-01",
                        "period_end": "2026-09-30",
                        "accounting_basis": "accrual",
                        "currency": "CAD",
                        "is_consolidated": false,
                        "is_audited": false,
                        "source_report_name": "Profit and Loss",
                        "generated_at": null,
                        "document_id": "doc_statement",
                        "line_ids": [
                          "fsl_revenue",
                          "fsl_expense"
                        ]
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "financial_statement_example",
                        "object": "financial_statement",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/statement-lines": {
      "get": {
        "operationId": "EP067",
        "summary": "List statement lines",
        "description": "List authorized statement line records.\n\nRequired scope: `accounting:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/statement-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/statement-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/statement-lines?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized statement line records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/StatementLineRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list statement lines",
                    "value": {
                      "data": [
                        {
                          "id": "statement_line_example",
                          "object": "statement_line",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "statement_id": "fst_example",
                          "line_code": "revenue",
                          "source_label": "Total Income",
                          "parent_line_id": null,
                          "amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "is_total": true,
                          "ledger_account_ids": [],
                          "mapping_method": "reviewed_account_mapping"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "statement_line_example",
                          "object": "statement_line",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/statement-lines/{id}": {
      "get": {
        "operationId": "EP068",
        "summary": "Retrieve statement line",
        "description": "Retrieve one statement line with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "statement_line_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/statement-lines/statement_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/statement-lines/statement_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/statement-lines/statement_line_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one statement line with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/StatementLineRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve statement line",
                    "value": {
                      "data": {
                        "id": "statement_line_example",
                        "object": "statement_line",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "statement_id": "fst_example",
                        "line_code": "revenue",
                        "source_label": "Total Income",
                        "parent_line_id": null,
                        "amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "is_total": true,
                        "ledger_account_ids": [],
                        "mapping_method": "reviewed_account_mapping"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "statement_line_example",
                        "object": "statement_line",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/tax-obligations": {
      "get": {
        "operationId": "EP069",
        "summary": "List tax obligations",
        "description": "List authorized tax obligation records.\n\nRequired scope: `accounting:read`. Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/tax-obligations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/tax-obligations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/tax-obligations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized tax obligation records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TaxObligationRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list tax obligations",
                    "value": {
                      "data": [
                        {
                          "id": "tax_obligation_example",
                          "object": "tax_obligation",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "tax_type": "GST_HST",
                          "jurisdiction": "CA",
                          "period_start": "2026-07-01",
                          "period_end": "2026-09-30",
                          "due_on": "2026-10-31",
                          "amount_due": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "amount_paid": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "filing_status": "filed",
                          "filed_on": "2026-10-20",
                          "document_id": "doc_tax"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "tax_obligation_example",
                          "object": "tax_obligation",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/tax-obligations/{id}": {
      "get": {
        "operationId": "EP070",
        "summary": "Retrieve tax obligation",
        "description": "Retrieve one tax obligation with provenance.\n\nRequired scope: `accounting:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Accounting"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "tax_obligation_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "accounting:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/tax-obligations/tax_obligation_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/tax-obligations/tax_obligation_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/tax-obligations/tax_obligation_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one tax obligation with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TaxObligationRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve tax obligation",
                    "value": {
                      "data": {
                        "id": "tax_obligation_example",
                        "object": "tax_obligation",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "tax_type": "GST_HST",
                        "jurisdiction": "CA",
                        "period_start": "2026-07-01",
                        "period_end": "2026-09-30",
                        "due_on": "2026-10-31",
                        "amount_due": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "amount_paid": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "filing_status": "filed",
                        "filed_on": "2026-10-20",
                        "document_id": "doc_tax"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "tax_obligation_example",
                        "object": "tax_obligation",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/products": {
      "get": {
        "operationId": "EP071",
        "summary": "List products",
        "description": "List authorized product records.\n\nRequired scope: `inventory:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/products?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/products?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/products?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized product records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list products",
                    "value": {
                      "data": [
                        {
                          "id": "product_example",
                          "object": "product",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "sku": "SKU-1001",
                          "name": "Steel component",
                          "description": "Machined steel component",
                          "product_type": "goods",
                          "category": "Components",
                          "unit_of_measure": "each",
                          "is_active": true,
                          "is_inventory_tracked": true,
                          "unit_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "sale_price": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "costing_method": "fifo",
                          "barcode": "0000000000000",
                          "supplier_id": "pty_supplier"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "product_example",
                          "object": "product",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/products/{id}": {
      "get": {
        "operationId": "EP072",
        "summary": "Retrieve product",
        "description": "Retrieve one product with provenance.\n\nRequired scope: `inventory:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "product_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/products/product_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/products/product_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/products/product_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one product with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProductRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve product",
                    "value": {
                      "data": {
                        "id": "product_example",
                        "object": "product",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "sku": "SKU-1001",
                        "name": "Steel component",
                        "description": "Machined steel component",
                        "product_type": "goods",
                        "category": "Components",
                        "unit_of_measure": "each",
                        "is_active": true,
                        "is_inventory_tracked": true,
                        "unit_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "sale_price": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "costing_method": "fifo",
                        "barcode": "0000000000000",
                        "supplier_id": "pty_supplier"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "product_example",
                        "object": "product",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/locations": {
      "get": {
        "operationId": "EP073",
        "summary": "List locations",
        "description": "List authorized location records.\n\nRequired scope: `inventory:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/locations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/locations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/locations?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized location records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LocationRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list locations",
                    "value": {
                      "data": [
                        {
                          "id": "location_example",
                          "object": "location",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "name": "Toronto warehouse",
                          "location_type": "warehouse",
                          "address": {
                            "city": "Toronto",
                            "country": "CA"
                          },
                          "is_active": true,
                          "owner_entity_id": "biz_example",
                          "timezone": "America/Toronto"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "location_example",
                          "object": "location",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/locations/{id}": {
      "get": {
        "operationId": "EP074",
        "summary": "Retrieve location",
        "description": "Retrieve one location with provenance.\n\nRequired scope: `inventory:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "location_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/locations/location_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/locations/location_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/locations/location_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one location with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LocationRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve location",
                    "value": {
                      "data": {
                        "id": "location_example",
                        "object": "location",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "name": "Toronto warehouse",
                        "location_type": "warehouse",
                        "address": {
                          "city": "Toronto",
                          "country": "CA"
                        },
                        "is_active": true,
                        "owner_entity_id": "biz_example",
                        "timezone": "America/Toronto"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "location_example",
                        "object": "location",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/inventory-balances": {
      "get": {
        "operationId": "EP075",
        "summary": "List inventory balances",
        "description": "List authorized inventory balance records.\n\nRequired scope: `inventory:read`. Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/inventory-balances?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/inventory-balances?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/inventory-balances?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized inventory balance records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InventoryBalanceRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list inventory balances",
                    "value": {
                      "data": [
                        {
                          "id": "inventory_balance_example",
                          "object": "inventory_balance",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "product_id": "prd_example",
                          "location_id": "loc_example",
                          "owner_entity_id": "biz_example",
                          "ownership_type": "owned",
                          "quantity_on_hand": "125",
                          "quantity_available": "100",
                          "quantity_reserved": "25",
                          "quantity_on_order": "50",
                          "unit_of_measure": "each",
                          "carrying_value": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "unit_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "costing_method": "fifo",
                          "lot_number": "LOT-1001",
                          "serial_number": null,
                          "expiry_on": null,
                          "as_of": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "inventory_balance_example",
                          "object": "inventory_balance",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/inventory-balances/{id}": {
      "get": {
        "operationId": "EP076",
        "summary": "Retrieve inventory balance",
        "description": "Retrieve one inventory balance with provenance.\n\nRequired scope: `inventory:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "inventory_balance_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/inventory-balances/inventory_balance_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/inventory-balances/inventory_balance_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/inventory-balances/inventory_balance_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one inventory balance with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryBalanceRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve inventory balance",
                    "value": {
                      "data": {
                        "id": "inventory_balance_example",
                        "object": "inventory_balance",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "product_id": "prd_example",
                        "location_id": "loc_example",
                        "owner_entity_id": "biz_example",
                        "ownership_type": "owned",
                        "quantity_on_hand": "125",
                        "quantity_available": "100",
                        "quantity_reserved": "25",
                        "quantity_on_order": "50",
                        "unit_of_measure": "each",
                        "carrying_value": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "unit_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "costing_method": "fifo",
                        "lot_number": "LOT-1001",
                        "serial_number": null,
                        "expiry_on": null,
                        "as_of": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "inventory_balance_example",
                        "object": "inventory_balance",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/inventory-movements": {
      "get": {
        "operationId": "EP077",
        "summary": "List inventory movements",
        "description": "List authorized inventory movement records.\n\nRequired scope: `inventory:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/inventory-movements?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/inventory-movements?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/inventory-movements?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized inventory movement records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InventoryMovementRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list inventory movements",
                    "value": {
                      "data": [
                        {
                          "id": "inventory_movement_example",
                          "object": "inventory_movement",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "product_id": "prd_example",
                          "location_id": "loc_example",
                          "movement_type": "receipt",
                          "quantity_delta": "50",
                          "unit_of_measure": "each",
                          "occurred_at": null,
                          "unit_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "total_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "order_id": null,
                          "purchase_order_id": "por_example",
                          "transfer_pair_id": "transfer_example",
                          "source_document_id": "doc_receipt"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "inventory_movement_example",
                          "object": "inventory_movement",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/inventory-movements/{id}": {
      "get": {
        "operationId": "EP078",
        "summary": "Retrieve inventory movement",
        "description": "Retrieve one inventory movement with provenance.\n\nRequired scope: `inventory:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "inventory_movement_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/inventory-movements/inventory_movement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/inventory-movements/inventory_movement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/inventory-movements/inventory_movement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one inventory movement with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InventoryMovementRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve inventory movement",
                    "value": {
                      "data": {
                        "id": "inventory_movement_example",
                        "object": "inventory_movement",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "product_id": "prd_example",
                        "location_id": "loc_example",
                        "movement_type": "receipt",
                        "quantity_delta": "50",
                        "unit_of_measure": "each",
                        "occurred_at": null,
                        "unit_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "total_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "order_id": null,
                        "purchase_order_id": "por_example",
                        "transfer_pair_id": "transfer_example",
                        "source_document_id": "doc_receipt"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "inventory_movement_example",
                        "object": "inventory_movement",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/purchase-orders": {
      "get": {
        "operationId": "EP079",
        "summary": "List purchase orders",
        "description": "List authorized purchase order records.\n\nRequired scope: `inventory:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_purchase_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/purchase-orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/purchase-orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/purchase-orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized purchase order records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PurchaseOrderRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list purchase orders",
                    "value": {
                      "data": [
                        {
                          "id": "purchase_order_example",
                          "object": "purchase_order",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "number": "PO-1001",
                          "supplier_id": "pty_supplier",
                          "status": "issued",
                          "ordered_on": "2026-10-01",
                          "expected_delivery_on": "2026-11-01",
                          "total": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "amount_received": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "line_items": [],
                          "location_id": "loc_example"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "purchase_order_example",
                          "object": "purchase_order",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/purchase-orders/{id}": {
      "get": {
        "operationId": "EP080",
        "summary": "Retrieve purchase order",
        "description": "Retrieve one purchase order with provenance.\n\nRequired scope: `inventory:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "purchase_order_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/purchase-orders/purchase_order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/purchase-orders/purchase_order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/purchase-orders/purchase_order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one purchase order with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PurchaseOrderRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve purchase order",
                    "value": {
                      "data": {
                        "id": "purchase_order_example",
                        "object": "purchase_order",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "number": "PO-1001",
                        "supplier_id": "pty_supplier",
                        "status": "issued",
                        "ordered_on": "2026-10-01",
                        "expected_delivery_on": "2026-11-01",
                        "total": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "amount_received": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "line_items": [],
                        "location_id": "loc_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "purchase_order_example",
                        "object": "purchase_order",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/shipments": {
      "get": {
        "operationId": "EP081",
        "summary": "List shipments",
        "description": "List authorized shipment records.\n\nRequired scope: `inventory:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/shipments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/shipments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/shipments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized shipment records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ShipmentRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list shipments",
                    "value": {
                      "data": [
                        {
                          "id": "shipment_example",
                          "object": "shipment",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "direction": "outbound",
                          "order_id": "ord_example",
                          "purchase_order_id": null,
                          "location_id": "loc_example",
                          "status": "delivered",
                          "carrier": "Example Carrier",
                          "tracking_number": "TRACK-EXAMPLE",
                          "shipped_at": null,
                          "delivered_at": null,
                          "line_items": []
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "shipment_example",
                          "object": "shipment",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/shipments/{id}": {
      "get": {
        "operationId": "EP082",
        "summary": "Retrieve shipment",
        "description": "Retrieve one shipment with provenance.\n\nRequired scope: `inventory:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "shipment_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/shipments/shipment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/shipments/shipment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/shipments/shipment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one shipment with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ShipmentRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve shipment",
                    "value": {
                      "data": {
                        "id": "shipment_example",
                        "object": "shipment",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "direction": "outbound",
                        "order_id": "ord_example",
                        "purchase_order_id": null,
                        "location_id": "loc_example",
                        "status": "delivered",
                        "carrier": "Example Carrier",
                        "tracking_number": "TRACK-EXAMPLE",
                        "shipped_at": null,
                        "delivered_at": null,
                        "line_items": []
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "shipment_example",
                        "object": "shipment",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/production-orders": {
      "get": {
        "operationId": "EP083",
        "summary": "List production orders",
        "description": "List authorized production order records.\n\nRequired scope: `inventory:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_manufacturing_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/production-orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/production-orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/production-orders?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized production order records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProductionOrderRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list production orders",
                    "value": {
                      "data": [
                        {
                          "id": "production_order_example",
                          "object": "production_order",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "number": "WO-1001",
                          "product_id": "prd_example",
                          "status": "in_progress",
                          "quantity_planned": "100",
                          "quantity_completed": "70",
                          "quantity_scrapped": "5",
                          "unit_of_measure": "each",
                          "planned_start_on": "2026-10-01",
                          "planned_end_on": "2026-10-30",
                          "completed_on": null,
                          "material_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "labor_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "overhead_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "work_in_progress_value": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          }
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "production_order_example",
                          "object": "production_order",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/production-orders/{id}": {
      "get": {
        "operationId": "EP084",
        "summary": "Retrieve production order",
        "description": "Retrieve one production order with provenance.\n\nRequired scope: `inventory:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "production_order_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/production-orders/production_order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/production-orders/production_order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/production-orders/production_order_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one production order with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProductionOrderRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve production order",
                    "value": {
                      "data": {
                        "id": "production_order_example",
                        "object": "production_order",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "number": "WO-1001",
                        "product_id": "prd_example",
                        "status": "in_progress",
                        "quantity_planned": "100",
                        "quantity_completed": "70",
                        "quantity_scrapped": "5",
                        "unit_of_measure": "each",
                        "planned_start_on": "2026-10-01",
                        "planned_end_on": "2026-10-30",
                        "completed_on": null,
                        "material_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "labor_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "overhead_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "work_in_progress_value": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "production_order_example",
                        "object": "production_order",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "EP085",
        "summary": "List projects",
        "description": "List authorized project records.\n\nRequired scope: `inventory:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_project_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/projects?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/projects?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/projects?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized project records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProjectRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list projects",
                    "value": {
                      "data": [
                        {
                          "id": "project_example",
                          "object": "project",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "number": "JOB-1001",
                          "name": "Warehouse fit-out",
                          "customer_id": "pty_example",
                          "status": "active",
                          "started_on": "2026-07-01",
                          "expected_end_on": "2027-01-31",
                          "contract_value": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "budget_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "actual_cost": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "amount_billed": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "retainage_receivable": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "percent_complete": "0.45"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "project_example",
                          "object": "project",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/projects/{id}": {
      "get": {
        "operationId": "EP086",
        "summary": "Retrieve project",
        "description": "Retrieve one project with provenance.\n\nRequired scope: `inventory:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Inventory"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "project_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "inventory:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/projects/project_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/projects/project_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/projects/project_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one project with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ProjectRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve project",
                    "value": {
                      "data": {
                        "id": "project_example",
                        "object": "project",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "number": "JOB-1001",
                        "name": "Warehouse fit-out",
                        "customer_id": "pty_example",
                        "status": "active",
                        "started_on": "2026-07-01",
                        "expected_end_on": "2027-01-31",
                        "contract_value": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "budget_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "actual_cost": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "amount_billed": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "retainage_receivable": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "percent_complete": "0.45"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "project_example",
                        "object": "project",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/applications": {
      "get": {
        "operationId": "EP087",
        "summary": "List applications",
        "description": "List authorized application records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_application_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/applications?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/applications?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/applications?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized application records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ApplicationRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list applications",
                    "value": {
                      "data": [
                        {
                          "id": "application_example",
                          "object": "application",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "applicant_entity_id": "biz_example",
                          "product_type": "term_loan",
                          "status": "in_review",
                          "requested_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "requested_term_months": 36,
                          "purpose": "Equipment purchase",
                          "submitted_at": null,
                          "decision_id": "dec_example",
                          "loan_id": null,
                          "guarantor_entity_ids": [],
                          "collateral_ids": [],
                          "document_ids": [],
                          "channel": "direct",
                          "institution_reference": "APP-1001"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "application_example",
                          "object": "application",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP146",
        "summary": "Create application",
        "description": "Create a credit application.\n\nRequired scope: `lending:write`. Creates application record; does not approve or fund. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/applications\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"applicant_entity_id\": \"biz_example\",\n  \"product_type\": \"term_loan\",\n  \"requested_amount\": {\n    \"amount\": \"100000.00\",\n    \"currency\": \"CAD\"\n  },\n  \"purpose\": \"Equipment purchase\",\n  \"requested_term_months\": 36\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/applications\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'applicant_entity_id': 'biz_example',\n 'product_type': 'term_loan',\n 'requested_amount': {'amount': '100000.00',\n                      'currency': 'CAD'},\n 'purpose': 'Equipment purchase',\n 'requested_term_months': 36},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/applications\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"applicant_entity_id\": \"biz_example\",\n  \"product_type\": \"term_loan\",\n  \"requested_amount\": {\n    \"amount\": \"100000.00\",\n    \"currency\": \"CAD\"\n  },\n  \"purpose\": \"Equipment purchase\",\n  \"requested_term_months\": 36\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "201": {
            "description": "Create a credit application.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Application"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create application",
                    "value": {
                      "data": {
                        "id": "app_example",
                        "object": "application",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "applicant_entity_id": "biz_example",
                        "product_type": "term_loan",
                        "status": "in_review",
                        "requested_amount": {
                          "amount": "100000.00",
                          "currency": "CAD"
                        },
                        "requested_term_months": 36,
                        "purpose": "Equipment purchase",
                        "submitted_at": null,
                        "decision_id": "dec_example",
                        "loan_id": null,
                        "guarantor_entity_ids": [],
                        "collateral_ids": [],
                        "document_ids": [],
                        "channel": "direct",
                        "institution_reference": "APP-1001"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP146Request"
              },
              "example": {
                "applicant_entity_id": "biz_example",
                "product_type": "term_loan",
                "requested_amount": {
                  "amount": "100000.00",
                  "currency": "CAD"
                },
                "purpose": "Equipment purchase",
                "requested_term_months": 36
              }
            }
          }
        }
      }
    },
    "/v1/applications/{id}": {
      "get": {
        "operationId": "EP088",
        "summary": "Retrieve application",
        "description": "Retrieve one application with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "app_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/applications/app_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/applications/app_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/applications/app_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one application with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ApplicationRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve application",
                    "value": {
                      "data": {
                        "id": "app_example",
                        "object": "application",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "applicant_entity_id": "biz_example",
                        "product_type": "term_loan",
                        "status": "in_review",
                        "requested_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "requested_term_months": 36,
                        "purpose": "Equipment purchase",
                        "submitted_at": null,
                        "decision_id": "dec_example",
                        "loan_id": null,
                        "guarantor_entity_ids": [],
                        "collateral_ids": [],
                        "document_ids": [],
                        "channel": "direct",
                        "institution_reference": "APP-1001"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "app_example",
                        "object": "application",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/credit-facilities": {
      "get": {
        "operationId": "EP089",
        "summary": "List credit facilities",
        "description": "List authorized credit facility records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/credit-facilities?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/credit-facilities?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/credit-facilities?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized credit facility records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CreditFacilityRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list credit facilities",
                    "value": {
                      "data": [
                        {
                          "id": "credit_facility_example",
                          "object": "credit_facility",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "borrower_entity_id": "biz_example",
                          "product_type": "line_of_credit",
                          "currency": "CAD",
                          "approved_limit": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "drawn_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "available_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "committed_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "effective_on": "2026-01-01",
                          "maturity_on": "2027-01-01",
                          "review_due_on": "2026-12-01",
                          "status": "active",
                          "loan_ids": [],
                          "covenant_ids": []
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "credit_facility_example",
                          "object": "credit_facility",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/credit-facilities/{id}": {
      "get": {
        "operationId": "EP090",
        "summary": "Retrieve credit facility",
        "description": "Retrieve one credit facility with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "credit_facility_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/credit-facilities/credit_facility_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/credit-facilities/credit_facility_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/credit-facilities/credit_facility_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one credit facility with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreditFacilityRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve credit facility",
                    "value": {
                      "data": {
                        "id": "credit_facility_example",
                        "object": "credit_facility",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "borrower_entity_id": "biz_example",
                        "product_type": "line_of_credit",
                        "currency": "CAD",
                        "approved_limit": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "drawn_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "available_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "committed_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "effective_on": "2026-01-01",
                        "maturity_on": "2027-01-01",
                        "review_due_on": "2026-12-01",
                        "status": "active",
                        "loan_ids": [],
                        "covenant_ids": []
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "credit_facility_example",
                        "object": "credit_facility",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/loans": {
      "get": {
        "operationId": "EP091",
        "summary": "List loans",
        "description": "List authorized loan records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_loan_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "days_past_due_gte",
            "in": "query",
            "required": false,
            "description": "Minimum DPD under the recorded source policy.",
            "schema": {
              "type": "integer"
            },
            "example": 30
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/loans?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&days_past_due_gte=30\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/loans?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&days_past_due_gte=30\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/loans?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&days_past_due_gte=30\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized loan records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LoanRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list loans",
                    "value": {
                      "data": [
                        {
                          "id": "loan_example",
                          "object": "loan",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "borrower_entity_id": "biz_example",
                          "application_id": "app_example",
                          "facility_id": "fac_example",
                          "product_type": "term_loan",
                          "status": "active",
                          "original_principal": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "outstanding_principal": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "accrued_interest": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "fees_due": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "total_payoff": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "annual_interest_rate": "0.095",
                          "apr": null,
                          "rate_type": "fixed",
                          "benchmark": null,
                          "spread": "0.03",
                          "interest_day_count": "actual_365",
                          "payment_frequency": "monthly",
                          "scheduled_payment": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "funded_on": "2026-01-15",
                          "maturity_on": "2029-01-15",
                          "next_payment_on": "2026-11-15",
                          "days_past_due": 0,
                          "past_due_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "charged_off_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "as_of": "2026-10-22",
                          "autopay_enabled": true
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "loan_example",
                          "object": "loan",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/loans/{id}": {
      "get": {
        "operationId": "EP092",
        "summary": "Retrieve loan",
        "description": "Retrieve one loan with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "loan_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/loans/loan_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/loans/loan_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/loans/loan_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one loan with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LoanRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve loan",
                    "value": {
                      "data": {
                        "id": "loan_example",
                        "object": "loan",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "borrower_entity_id": "biz_example",
                        "application_id": "app_example",
                        "facility_id": "fac_example",
                        "product_type": "term_loan",
                        "status": "active",
                        "original_principal": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "outstanding_principal": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "accrued_interest": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "fees_due": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "total_payoff": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "annual_interest_rate": "0.095",
                        "apr": null,
                        "rate_type": "fixed",
                        "benchmark": null,
                        "spread": "0.03",
                        "interest_day_count": "actual_365",
                        "payment_frequency": "monthly",
                        "scheduled_payment": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "funded_on": "2026-01-15",
                        "maturity_on": "2029-01-15",
                        "next_payment_on": "2026-11-15",
                        "days_past_due": 0,
                        "past_due_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "charged_off_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "as_of": "2026-10-22",
                        "autopay_enabled": true
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "loan_example",
                        "object": "loan",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/installments": {
      "get": {
        "operationId": "EP093",
        "summary": "List installments",
        "description": "List authorized installment records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_repayment_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/installments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/installments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/installments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized installment records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InstallmentRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list installments",
                    "value": {
                      "data": [
                        {
                          "id": "installment_example",
                          "object": "installment",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "loan_id": "loa_example",
                          "sequence_number": 10,
                          "due_on": "2026-11-15",
                          "principal_due": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "interest_due": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "fees_due": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "total_due": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "amount_paid": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "remaining_due": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "status": "scheduled"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "installment_example",
                          "object": "installment",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/installments/{id}": {
      "get": {
        "operationId": "EP094",
        "summary": "Retrieve installment",
        "description": "Retrieve one installment with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "installment_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/installments/installment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/installments/installment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/installments/installment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one installment with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InstallmentRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve installment",
                    "value": {
                      "data": {
                        "id": "installment_example",
                        "object": "installment",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "loan_id": "loa_example",
                        "sequence_number": 10,
                        "due_on": "2026-11-15",
                        "principal_due": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "interest_due": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "fees_due": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "total_due": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "amount_paid": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "remaining_due": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "status": "scheduled"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "installment_example",
                        "object": "installment",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/repayments": {
      "get": {
        "operationId": "EP095",
        "summary": "List repayments",
        "description": "List authorized repayment records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_repayment_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/repayments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/repayments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/repayments?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized repayment records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RepaymentRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list repayments",
                    "value": {
                      "data": [
                        {
                          "id": "repayment_example",
                          "object": "repayment",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "loan_id": "loa_example",
                          "installment_id": "ins_example",
                          "status": "completed",
                          "amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "principal_applied": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "interest_applied": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "fees_applied": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "unapplied_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "received_at": null,
                          "effective_on": "2026-10-15",
                          "method": "preauthorized_debit",
                          "failure_code": null,
                          "bank_transaction_id": "btx_example",
                          "reverses_repayment_id": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "repayment_example",
                          "object": "repayment",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/repayments/{id}": {
      "get": {
        "operationId": "EP096",
        "summary": "Retrieve repayment",
        "description": "Retrieve one repayment with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "repayment_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/repayments/repayment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/repayments/repayment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/repayments/repayment_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one repayment with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RepaymentRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve repayment",
                    "value": {
                      "data": {
                        "id": "repayment_example",
                        "object": "repayment",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "loan_id": "loa_example",
                        "installment_id": "ins_example",
                        "status": "completed",
                        "amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "principal_applied": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "interest_applied": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "fees_applied": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "unapplied_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "received_at": null,
                        "effective_on": "2026-10-15",
                        "method": "preauthorized_debit",
                        "failure_code": null,
                        "bank_transaction_id": "btx_example",
                        "reverses_repayment_id": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "repayment_example",
                        "object": "repayment",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/collaterals": {
      "get": {
        "operationId": "EP097",
        "summary": "List collaterals",
        "description": "List authorized collateral records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/collaterals?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/collaterals?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/collaterals?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized collateral records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CollateralRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list collaterals",
                    "value": {
                      "data": [
                        {
                          "id": "collateral_example",
                          "object": "collateral",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "loan_id": "loa_example",
                          "facility_id": "fac_example",
                          "collateral_type": "equipment",
                          "description": "Industrial CNC machine",
                          "owner_entity_id": "biz_example",
                          "serial_number": "SERIAL-EXAMPLE",
                          "vin": null,
                          "property_identifier": null,
                          "address": null,
                          "valuation": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "valuation_date": "2026-09-01",
                          "valuation_method": "independent_appraisal",
                          "appraiser": "Example Appraisals",
                          "lien_ids": [],
                          "advance_rate": "0.70",
                          "insurance_expiry_on": "2027-01-01"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "collateral_example",
                          "object": "collateral",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/collaterals/{id}": {
      "get": {
        "operationId": "EP098",
        "summary": "Retrieve collateral",
        "description": "Retrieve one collateral with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "collateral_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/collaterals/collateral_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/collaterals/collateral_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/collaterals/collateral_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one collateral with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CollateralRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve collateral",
                    "value": {
                      "data": {
                        "id": "collateral_example",
                        "object": "collateral",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "loan_id": "loa_example",
                        "facility_id": "fac_example",
                        "collateral_type": "equipment",
                        "description": "Industrial CNC machine",
                        "owner_entity_id": "biz_example",
                        "serial_number": "SERIAL-EXAMPLE",
                        "vin": null,
                        "property_identifier": null,
                        "address": null,
                        "valuation": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "valuation_date": "2026-09-01",
                        "valuation_method": "independent_appraisal",
                        "appraiser": "Example Appraisals",
                        "lien_ids": [],
                        "advance_rate": "0.70",
                        "insurance_expiry_on": "2027-01-01"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "collateral_example",
                        "object": "collateral",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/guarantees": {
      "get": {
        "operationId": "EP099",
        "summary": "List guarantees",
        "description": "List authorized guarantee records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/guarantees?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/guarantees?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/guarantees?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized guarantee records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/GuaranteeRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list guarantees",
                    "value": {
                      "data": [
                        {
                          "id": "guarantee_example",
                          "object": "guarantee",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "loan_id": "loa_example",
                          "facility_id": "fac_example",
                          "guarantor_entity_id": "per_example",
                          "guarantee_type": "limited",
                          "maximum_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "signed_on": "2026-01-14",
                          "expires_on": null,
                          "document_id": "doc_guarantee"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "guarantee_example",
                          "object": "guarantee",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/guarantees/{id}": {
      "get": {
        "operationId": "EP100",
        "summary": "Retrieve guarantee",
        "description": "Retrieve one guarantee with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "guarantee_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/guarantees/guarantee_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/guarantees/guarantee_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/guarantees/guarantee_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one guarantee with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuaranteeRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve guarantee",
                    "value": {
                      "data": {
                        "id": "guarantee_example",
                        "object": "guarantee",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "loan_id": "loa_example",
                        "facility_id": "fac_example",
                        "guarantor_entity_id": "per_example",
                        "guarantee_type": "limited",
                        "maximum_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "signed_on": "2026-01-14",
                        "expires_on": null,
                        "document_id": "doc_guarantee"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "guarantee_example",
                        "object": "guarantee",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/covenants": {
      "get": {
        "operationId": "EP101",
        "summary": "List covenants",
        "description": "List authorized covenant records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_covenant_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/covenants?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/covenants?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/covenants?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized covenant records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CovenantRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list covenants",
                    "value": {
                      "data": [
                        {
                          "id": "covenant_example",
                          "object": "covenant",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "facility_id": "fac_example",
                          "loan_id": "loa_example",
                          "name": "Minimum debt service coverage",
                          "attribute_key": "dscr",
                          "operator": "gte",
                          "threshold": "1.20",
                          "threshold_unit": "ratio",
                          "observed_value": "1.35",
                          "observed_on": "2026-09-30",
                          "status": "compliant",
                          "waived_until": null,
                          "evidence_document_id": "doc_facility"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "covenant_example",
                          "object": "covenant",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/covenants/{id}": {
      "get": {
        "operationId": "EP102",
        "summary": "Retrieve covenant",
        "description": "Retrieve one covenant with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "covenant_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/covenants/covenant_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/covenants/covenant_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/covenants/covenant_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one covenant with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CovenantRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve covenant",
                    "value": {
                      "data": {
                        "id": "covenant_example",
                        "object": "covenant",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "facility_id": "fac_example",
                        "loan_id": "loa_example",
                        "name": "Minimum debt service coverage",
                        "attribute_key": "dscr",
                        "operator": "gte",
                        "threshold": "1.20",
                        "threshold_unit": "ratio",
                        "observed_value": "1.35",
                        "observed_on": "2026-09-30",
                        "status": "compliant",
                        "waived_until": null,
                        "evidence_document_id": "doc_facility"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "covenant_example",
                        "object": "covenant",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/decisions": {
      "get": {
        "operationId": "EP103",
        "summary": "List decisions",
        "description": "List authorized decision records.\n\nRequired scope: `lending:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/decisions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/decisions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/decisions?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized decision records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/DecisionRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list decisions",
                    "value": {
                      "data": [
                        {
                          "id": "decision_example",
                          "object": "decision",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "application_id": "app_example",
                          "loan_id": "loa_example",
                          "outcome": "refer",
                          "is_recommendation": true,
                          "policy_id": "policy_sme_ca",
                          "policy_version": "1.0.0",
                          "approved_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "approved_term_months": 36,
                          "reason_codes": [
                            "insufficient_history"
                          ],
                          "conditions": [
                            "Obtain updated financials"
                          ],
                          "attribute_snapshot_id": "rsk_example",
                          "actor_id": "usr_example",
                          "decided_at": null,
                          "supersedes_decision_id": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "decision_example",
                          "object": "decision",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/decisions/{id}": {
      "get": {
        "operationId": "EP104",
        "summary": "Retrieve decision",
        "description": "Retrieve one decision with provenance.\n\nRequired scope: `lending:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Lending"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "decision_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "lending:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/decisions/decision_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/decisions/decision_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/decisions/decision_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one decision with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DecisionRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve decision",
                    "value": {
                      "data": {
                        "id": "decision_example",
                        "object": "decision",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "application_id": "app_example",
                        "loan_id": "loa_example",
                        "outcome": "refer",
                        "is_recommendation": true,
                        "policy_id": "policy_sme_ca",
                        "policy_version": "1.0.0",
                        "approved_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "approved_term_months": 36,
                        "reason_codes": [
                          "insufficient_history"
                        ],
                        "conditions": [
                          "Obtain updated financials"
                        ],
                        "attribute_snapshot_id": "rsk_example",
                        "actor_id": "usr_example",
                        "decided_at": null,
                        "supersedes_decision_id": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "decision_example",
                        "object": "decision",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/lien-searches": {
      "get": {
        "operationId": "EP105",
        "summary": "List lien searches",
        "description": "List authorized lien search records.\n\nRequired scope: `liens:read`. US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established.",
        "tags": [
          "Liens"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_search_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "liens:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/lien-searches?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/lien-searches?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/lien-searches?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized lien search records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LienSearchRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list lien searches",
                    "value": {
                      "data": [
                        {
                          "id": "lis_example",
                          "object": "lien_search",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [
                            {
                              "field_path": "jurisdictions_completed",
                              "reason": "source_error",
                              "detail": "US-NY search failed."
                            }
                          ],
                          "schema_version": "1.4.2",
                          "debtor_name": "Example Manufacturing Inc.",
                          "debtor_type": "business",
                          "search_type": "name",
                          "jurisdictions_requested": [
                            "US-DE",
                            "US-NY"
                          ],
                          "jurisdictions_completed": [
                            "US-DE"
                          ],
                          "status": "partial",
                          "result_count": 0,
                          "lien_ids": [],
                          "stop_reason": null,
                          "processing_context": {
                            "product": "insights",
                            "workflow_run_id": "wfr_example"
                          }
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "lis_example",
                          "object": "lien_search",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [
                            {
                              "field_path": "jurisdictions_completed",
                              "reason": "source_error",
                              "detail": "US-NY search failed."
                            }
                          ],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP143",
        "summary": "Start lien search",
        "description": "Run a lien search with explicit jurisdiction and debtor scope.\n\nRequired scope: `liens:search`. Adapter resolves provider business/person context; no filing or perfection action. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. This is a stage of an authorized Insights or Signal workflow. processing_context is required; unrelated, completed, unpaid, cancelled or unentitled contexts return 409 invalid_state. It creates no separate AMLOK charge. The orchestrator deduplicates equivalent stage work within the parent. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Liens"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "liens:search"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/lien-searches\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"subject_id\": \"biz_example\",\n  \"debtor_name\": \"Example Manufacturing Inc.\",\n  \"debtor_type\": \"business\",\n  \"search_type\": \"name\",\n  \"jurisdictions\": [\n    \"US-DE\"\n  ],\n  \"processing_context\": {\n    \"product\": \"insights\",\n    \"workflow_run_id\": \"wfr_example\"\n  }\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/lien-searches\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'subject_id': 'biz_example',\n 'debtor_name': 'Example Manufacturing Inc.',\n 'debtor_type': 'business',\n 'search_type': 'name',\n 'jurisdictions': ['US-DE'],\n 'processing_context': {'product': 'insights',\n                        'workflow_run_id': 'wfr_example'}},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/lien-searches\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"subject_id\": \"biz_example\",\n  \"debtor_name\": \"Example Manufacturing Inc.\",\n  \"debtor_type\": \"business\",\n  \"search_type\": \"name\",\n  \"jurisdictions\": [\n    \"US-DE\"\n  ],\n  \"processing_context\": {\n    \"product\": \"insights\",\n    \"workflow_run_id\": \"wfr_example\"\n  }\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "202": {
            "description": "Run a lien search with explicit jurisdiction and debtor scope. Accepted work is not yet complete.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LienSearch"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic start lien search",
                    "value": {
                      "data": {
                        "id": "lis_example",
                        "object": "lien_search",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "debtor_name": "Example Manufacturing Inc.",
                        "debtor_type": "business",
                        "search_type": "name",
                        "jurisdictions_requested": [
                          "US-DE"
                        ],
                        "jurisdictions_completed": [],
                        "status": "queued",
                        "result_count": 0,
                        "lien_ids": [],
                        "stop_reason": null,
                        "processing_context": {
                          "product": "insights",
                          "workflow_run_id": "wfr_example"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP143Request"
              },
              "example": {
                "subject_id": "biz_example",
                "debtor_name": "Example Manufacturing Inc.",
                "debtor_type": "business",
                "search_type": "name",
                "jurisdictions": [
                  "US-DE"
                ],
                "processing_context": {
                  "product": "insights",
                  "workflow_run_id": "wfr_example"
                }
              }
            }
          }
        }
      }
    },
    "/v1/lien-searches/{id}": {
      "get": {
        "operationId": "EP106",
        "summary": "Retrieve lien search",
        "description": "Retrieve one lien search with provenance.\n\nRequired scope: `liens:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Liens"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "lis_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "liens:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/lien-searches/lis_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/lien-searches/lis_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/lien-searches/lis_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one lien search with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LienSearchRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve lien search",
                    "value": {
                      "data": {
                        "id": "lis_example",
                        "object": "lien_search",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [
                          {
                            "field_path": "jurisdictions_completed",
                            "reason": "source_error",
                            "detail": "US-NY search failed."
                          }
                        ],
                        "schema_version": "1.4.2",
                        "debtor_name": "Example Manufacturing Inc.",
                        "debtor_type": "business",
                        "search_type": "name",
                        "jurisdictions_requested": [
                          "US-DE",
                          "US-NY"
                        ],
                        "jurisdictions_completed": [
                          "US-DE"
                        ],
                        "status": "partial",
                        "result_count": 0,
                        "lien_ids": [],
                        "stop_reason": null,
                        "processing_context": {
                          "product": "insights",
                          "workflow_run_id": "wfr_example"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "lis_example",
                        "object": "lien_search",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [
                          {
                            "field_path": "jurisdictions_completed",
                            "reason": "source_error",
                            "detail": "US-NY search failed."
                          }
                        ],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/liens": {
      "get": {
        "operationId": "EP107",
        "summary": "List liens",
        "description": "List authorized lien records.\n\nRequired scope: `liens:read`. Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage.",
        "tags": [
          "Liens"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_lien_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "search_id",
            "in": "query",
            "required": false,
            "description": "Constrain filings to a completed search context.",
            "schema": {
              "type": "string"
            },
            "example": "lis_example"
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "required": false,
            "description": "Qualified country/subdivision code.",
            "schema": {
              "type": "string"
            },
            "example": "US-DE"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "liens:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/liens?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&search_id=lis_example&jurisdiction=US-DE\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/liens?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&search_id=lis_example&jurisdiction=US-DE\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/liens?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance&search_id=lis_example&jurisdiction=US-DE\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized lien records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LienRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list liens",
                    "value": {
                      "data": [
                        {
                          "id": "lien_example",
                          "object": "lien",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "search_id": "lis_example",
                          "filing_number": "REG-1001",
                          "original_filing_number": "REG-1001",
                          "lien_type": "ucc",
                          "jurisdiction": "US-DE",
                          "registry_name": "Example Secretary of State",
                          "status": "active",
                          "raw_status": "ACTIVE",
                          "filed_on": "2024-04-01",
                          "lapse_on": "2029-04-01",
                          "terminated_on": null,
                          "debtors": [],
                          "secured_parties": [],
                          "collateral_description": "Equipment described in attached schedule",
                          "collateral_categories": [
                            "equipment"
                          ],
                          "is_blanket_lien": null,
                          "registered_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "currency_basis": "registry_reported",
                          "document_ids": [],
                          "match_disposition": "possible_match",
                          "priority_assessment": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "lien_example",
                          "object": "lien",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/liens/{id}": {
      "get": {
        "operationId": "EP108",
        "summary": "Retrieve lien",
        "description": "Retrieve one lien with provenance.\n\nRequired scope: `liens:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Liens"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "lien_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "liens:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/liens/lien_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/liens/lien_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/liens/lien_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one lien with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LienRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve lien",
                    "value": {
                      "data": {
                        "id": "lien_example",
                        "object": "lien",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "search_id": "lis_example",
                        "filing_number": "REG-1001",
                        "original_filing_number": "REG-1001",
                        "lien_type": "ucc",
                        "jurisdiction": "US-DE",
                        "registry_name": "Example Secretary of State",
                        "status": "active",
                        "raw_status": "ACTIVE",
                        "filed_on": "2024-04-01",
                        "lapse_on": "2029-04-01",
                        "terminated_on": null,
                        "debtors": [],
                        "secured_parties": [],
                        "collateral_description": "Equipment described in attached schedule",
                        "collateral_categories": [
                          "equipment"
                        ],
                        "is_blanket_lien": null,
                        "registered_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "currency_basis": "registry_reported",
                        "document_ids": [],
                        "match_disposition": "possible_match",
                        "priority_assessment": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "lien_example",
                        "object": "lien",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/filing-events": {
      "get": {
        "operationId": "EP109",
        "summary": "List filing events",
        "description": "List authorized filing event records.\n\nRequired scope: `liens:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Liens"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "connection_id",
            "in": "query",
            "required": false,
            "description": "Filter one authorized source connection.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "liens:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/filing-events?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/filing-events?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/filing-events?limit=100&cursor=cur_example&subject_id=biz_example&connection_id=cnn_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized filing event records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/FilingEventRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list filing events",
                    "value": {
                      "data": [
                        {
                          "id": "filing_event_example",
                          "object": "filing_event",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "lien_id": "lie_example",
                          "event_type": "continuation",
                          "filing_number": "REG-1002",
                          "effective_on": "2028-10-01",
                          "previous_filing_number": "REG-1001",
                          "new_lapse_on": "2034-04-01",
                          "description": "Continuation filed",
                          "document_id": "doc_filing"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "filing_event_example",
                          "object": "filing_event",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/filing-events/{id}": {
      "get": {
        "operationId": "EP110",
        "summary": "Retrieve filing event",
        "description": "Retrieve one filing event with provenance.\n\nRequired scope: `liens:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Liens"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "filing_event_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "liens:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/filing-events/filing_event_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/filing-events/filing_event_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/filing-events/filing_event_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one filing event with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/FilingEventRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve filing event",
                    "value": {
                      "data": {
                        "id": "filing_event_example",
                        "object": "filing_event",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "lien_id": "lie_example",
                        "event_type": "continuation",
                        "filing_number": "REG-1002",
                        "effective_on": "2028-10-01",
                        "previous_filing_number": "REG-1001",
                        "new_lapse_on": "2034-04-01",
                        "description": "Continuation filed",
                        "document_id": "doc_filing"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "filing_event_example",
                        "object": "filing_event",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/attributes": {
      "get": {
        "operationId": "EP111",
        "summary": "List attributes",
        "description": "List authorized attribute records.\n\nRequired scope: `risk:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_metric_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "key",
            "in": "query",
            "required": false,
            "description": "Attribute key defined in Derived Attributes.",
            "schema": {
              "type": "string"
            },
            "example": "operating_inflows"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "description": "Only supported for stored point-in-time results.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/attributes?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance&key=operating_inflows\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/attributes?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance&key=operating_inflows\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/attributes?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance&key=operating_inflows\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized attribute records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AttributeRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list attributes",
                    "value": {
                      "data": [
                        {
                          "id": "atr_example",
                          "object": "attribute",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [
                            {
                              "field_path": "value",
                              "reason": "not_provided",
                              "detail": "Complete debt service schedule is unavailable."
                            }
                          ],
                          "schema_version": "1.4.2",
                          "key": "dscr",
                          "value_type": "decimal",
                          "value": null,
                          "unit": "ratio",
                          "status": "unavailable",
                          "window_start": "2025-10-01",
                          "window_end": "2026-10-01",
                          "as_of": "2026-10-22T14:00:00Z",
                          "calculation_version": "dscr-v1",
                          "input_resource_ids": [],
                          "missing_reason": "not_provided"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "atr_example",
                          "object": "attribute",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [
                            {
                              "field_path": "value",
                              "reason": "not_provided",
                              "detail": "Complete debt service schedule is unavailable."
                            }
                          ],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/attributes/{id}": {
      "get": {
        "operationId": "EP112",
        "summary": "Retrieve attribute",
        "description": "Retrieve one attribute with provenance.\n\nRequired scope: `risk:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "attribute_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/attributes/attribute_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/attributes/attribute_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/attributes/attribute_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one attribute with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AttributeRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve attribute",
                    "value": {
                      "data": {
                        "id": "attribute_example",
                        "object": "attribute",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [
                          {
                            "field_path": "value",
                            "reason": "not_provided",
                            "detail": "Complete debt service schedule is unavailable."
                          }
                        ],
                        "schema_version": "1.4.2",
                        "key": "dscr",
                        "value_type": "decimal",
                        "value": null,
                        "unit": "ratio",
                        "status": "unavailable",
                        "window_start": "2025-10-01",
                        "window_end": "2026-10-01",
                        "as_of": "2026-10-22T14:00:00Z",
                        "calculation_version": "dscr-v1",
                        "input_resource_ids": [],
                        "missing_reason": "not_provided"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "attribute_example",
                        "object": "attribute",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [
                          {
                            "field_path": "value",
                            "reason": "not_provided",
                            "detail": "Complete debt service schedule is unavailable."
                          }
                        ],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/risk-snapshots": {
      "get": {
        "operationId": "EP113",
        "summary": "List risk snapshots",
        "description": "List authorized risk snapshot records.\n\nRequired scope: `risk:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "as_of",
            "in": "query",
            "required": false,
            "description": "Only supported for stored point-in-time results.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/risk-snapshots?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/risk-snapshots?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/risk-snapshots?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized risk snapshot records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RiskSnapshotRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list risk snapshots",
                    "value": {
                      "data": [
                        {
                          "id": "risk_snapshot_example",
                          "object": "risk_snapshot",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "assessment_type": "underwriting",
                          "as_of": "2026-10-23T14:00:00Z",
                          "attribute_ids": [
                            "atr_example"
                          ],
                          "previous_snapshot_id": null,
                          "model_id": null,
                          "model_version": null,
                          "score": null,
                          "score_scale": null,
                          "rating": null,
                          "reason_codes": [],
                          "evidence_manifest_id": "manifest_example",
                          "workflow_run_id": "wfr_example",
                          "application_id": "app_example",
                          "billing_usage_id": "billing_usage_example"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "risk_snapshot_example",
                          "object": "risk_snapshot",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/risk-snapshots/{id}": {
      "get": {
        "operationId": "EP114",
        "summary": "Retrieve risk snapshot",
        "description": "Retrieve one risk snapshot with provenance.\n\nRequired scope: `risk:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "risk_snapshot_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/risk-snapshots/risk_snapshot_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/risk-snapshots/risk_snapshot_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/risk-snapshots/risk_snapshot_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one risk snapshot with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RiskSnapshotRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve risk snapshot",
                    "value": {
                      "data": {
                        "id": "risk_snapshot_example",
                        "object": "risk_snapshot",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "assessment_type": "underwriting",
                        "as_of": "2026-10-23T14:00:00Z",
                        "attribute_ids": [
                          "atr_example"
                        ],
                        "previous_snapshot_id": null,
                        "model_id": null,
                        "model_version": null,
                        "score": null,
                        "score_scale": null,
                        "rating": null,
                        "reason_codes": [],
                        "evidence_manifest_id": "manifest_example",
                        "workflow_run_id": "wfr_example",
                        "application_id": "app_example",
                        "billing_usage_id": "billing_usage_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "risk_snapshot_example",
                        "object": "risk_snapshot",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/monitors": {
      "get": {
        "operationId": "EP115",
        "summary": "List monitors",
        "description": "List authorized monitor records.\n\nRequired scope: `monitoring:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_monitor_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "monitoring:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/monitors?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/monitors?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/monitors?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized monitor records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MonitorRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list monitors",
                    "value": {
                      "data": [
                        {
                          "id": "monitor_example",
                          "object": "monitor",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "baseline_snapshot_id": "rsk_original",
                          "resource_types": [
                            "bank_transaction",
                            "lien"
                          ],
                          "attribute_keys": [
                            "operating_inflows"
                          ],
                          "status": "active",
                          "cadence": "daily",
                          "ruleset_version": "monitor-v1",
                          "last_evaluated_at": null,
                          "next_evaluation_at": null,
                          "blocked_reason": null,
                          "monitoring_period_id": "monitoring_period_example"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "monitor_example",
                          "object": "monitor",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP150",
        "summary": "Create monitor",
        "description": "Configure ongoing monitoring against a baseline.\n\nRequired scope: `monitoring:write`. Refresh frequency remains subject to provider and consent limits. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Discover approved baselines through GET /v1/monitoring-baselines. Supply its snapshot_id as baseline_snapshot_id; it must be ready and belong to this subject and workspace. Multiple monitors do not create multiple Signal account-month charges. Signal charges the full agreed monthly rate once per borrower/business/workspace at 00:00 UTC on the first day of the month, before monitoring proceeds. First activation during a month charges the full monthly rate immediately, without proration; the next charge is at the next month boundary. Repeated monitor creation, pauses, resumes, checks and reassessments do not add charges in an already paid period. Insufficient credits block monitoring without a debit or debt; funding resumes only the current period after its single successful charge, without charging missed inactive months. User-paused monitoring remains paused until the user resumes it. Account cancellation stops processing and all further deductions immediately. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "monitoring:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/monitors\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"subject_id\": \"biz_example\",\n  \"baseline_snapshot_id\": \"rsk_baseline\",\n  \"resource_types\": [\n    \"bank_transaction\",\n    \"lien\"\n  ],\n  \"attribute_keys\": [\n    \"operating_inflows\"\n  ],\n  \"cadence\": \"daily\",\n  \"ruleset_version\": \"monitor-v1\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/monitors\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'subject_id': 'biz_example',\n 'baseline_snapshot_id': 'rsk_baseline',\n 'resource_types': ['bank_transaction', 'lien'],\n 'attribute_keys': ['operating_inflows'],\n 'cadence': 'daily',\n 'ruleset_version': 'monitor-v1'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/monitors\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"subject_id\": \"biz_example\",\n  \"baseline_snapshot_id\": \"rsk_baseline\",\n  \"resource_types\": [\n    \"bank_transaction\",\n    \"lien\"\n  ],\n  \"attribute_keys\": [\n    \"operating_inflows\"\n  ],\n  \"cadence\": \"daily\",\n  \"ruleset_version\": \"monitor-v1\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "201": {
            "description": "Configure ongoing monitoring against a baseline.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              },
              "ETag": {
                "description": "Quoted record version for an If-Match update.",
                "schema": {
                  "type": "string"
                },
                "example": "\"1\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create monitor",
                    "value": {
                      "data": {
                        "id": "mon_example",
                        "object": "monitor",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "baseline_snapshot_id": "rsk_baseline",
                        "resource_types": [
                          "bank_transaction",
                          "lien"
                        ],
                        "attribute_keys": [
                          "operating_inflows"
                        ],
                        "status": "active",
                        "cadence": "daily",
                        "ruleset_version": "monitor-v1",
                        "last_evaluated_at": null,
                        "next_evaluation_at": null,
                        "blocked_reason": null,
                        "monitoring_period_id": "monitoring_period_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP150Request"
              },
              "example": {
                "subject_id": "biz_example",
                "baseline_snapshot_id": "rsk_baseline",
                "resource_types": [
                  "bank_transaction",
                  "lien"
                ],
                "attribute_keys": [
                  "operating_inflows"
                ],
                "cadence": "daily",
                "ruleset_version": "monitor-v1"
              }
            }
          }
        }
      }
    },
    "/v1/monitors/{id}": {
      "get": {
        "operationId": "EP116",
        "summary": "Retrieve monitor",
        "description": "Retrieve one monitor with provenance.\n\nRequired scope: `monitoring:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "mon_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "monitoring:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/monitors/mon_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/monitors/mon_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/monitors/mon_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one monitor with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              },
              "ETag": {
                "description": "Quoted record version for an If-Match update.",
                "schema": {
                  "type": "string"
                },
                "example": "\"1\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonitorRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve monitor",
                    "value": {
                      "data": {
                        "id": "mon_example",
                        "object": "monitor",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "baseline_snapshot_id": "rsk_original",
                        "resource_types": [
                          "bank_transaction",
                          "lien"
                        ],
                        "attribute_keys": [
                          "operating_inflows"
                        ],
                        "status": "active",
                        "cadence": "daily",
                        "ruleset_version": "monitor-v1",
                        "last_evaluated_at": null,
                        "next_evaluation_at": null,
                        "blocked_reason": null,
                        "monitoring_period_id": "monitoring_period_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "mon_example",
                        "object": "monitor",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "patch": {
        "operationId": "EP151",
        "summary": "Update monitor",
        "description": "Change monitoring configuration with optimistic concurrency.\n\nRequired scope: `monitoring:write`. Only explicit supplied fields change; null-clearing rules validated. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Signal charges the full agreed monthly rate once per borrower/business/workspace at 00:00 UTC on the first day of the month, before monitoring proceeds. First activation during a month charges the full monthly rate immediately, without proration; the next charge is at the next month boundary. Repeated monitor creation, pauses, resumes, checks and reassessments do not add charges in an already paid period. Insufficient credits block monitoring without a debit or debt; funding resumes only the current period after its single successful charge, without charging missed inactive months. User-paused monitoring remains paused until the user resumes it. Account cancellation stops processing and all further deductions immediately.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "mon_example"
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "description": "Current quoted record version returned as ETag. A stale version returns 412.",
            "schema": {
              "type": "string"
            },
            "example": "\"3\""
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "monitoring:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request PATCH --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/monitors/mon_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'If-Match: \"3\"' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"status\": \"paused\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'If-Match': '\"3\"',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"PATCH\", base_url + \"/v1/monitors/mon_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'status': 'paused'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"If-Match\": \"\\\"3\\\"\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/monitors/mon_example\", {\n  method: \"PATCH\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"status\": \"paused\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Change monitoring configuration with optimistic concurrency.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              },
              "ETag": {
                "description": "Quoted record version for an If-Match update.",
                "schema": {
                  "type": "string"
                },
                "example": "\"4\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic update monitor",
                    "value": {
                      "data": {
                        "id": "mon_example",
                        "object": "monitor",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 4,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "baseline_snapshot_id": "rsk_original",
                        "resource_types": [
                          "bank_transaction",
                          "lien"
                        ],
                        "attribute_keys": [
                          "operating_inflows"
                        ],
                        "status": "paused",
                        "cadence": "daily",
                        "ruleset_version": "monitor-v1",
                        "last_evaluated_at": null,
                        "next_evaluation_at": null,
                        "blocked_reason": null,
                        "monitoring_period_id": "monitoring_period_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP151Request"
              },
              "example": {
                "status": "paused"
              }
            }
          }
        }
      }
    },
    "/v1/alerts": {
      "get": {
        "operationId": "EP117",
        "summary": "List alerts",
        "description": "List authorized alert records.\n\nRequired scope: `risk:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_alert_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/alerts?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/alerts?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/alerts?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized alert records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AlertRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list alerts",
                    "value": {
                      "data": [
                        {
                          "id": "alert_example",
                          "object": "alert",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "monitor_id": "mon_example",
                          "alert_type": "operating_inflows_decline",
                          "severity": "high",
                          "status": "open",
                          "detected_at": "2026-10-23T14:00:00Z",
                          "baseline_snapshot_id": "rsk_original",
                          "current_snapshot_id": "rsk_current",
                          "attribute_key": "operating_inflows",
                          "previous_value": "50000.00",
                          "current_value": "35000.00",
                          "threshold": "relative_change <= -0.25",
                          "reason": "Operating inflows declined over comparable covered windows.",
                          "evidence_ids": [],
                          "resolved_at": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "alert_example",
                          "object": "alert",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/alerts/{id}": {
      "get": {
        "operationId": "EP118",
        "summary": "Retrieve alert",
        "description": "Retrieve one alert with provenance.\n\nRequired scope: `risk:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "alert_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/alerts/alert_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/alerts/alert_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/alerts/alert_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one alert with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AlertRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve alert",
                    "value": {
                      "data": {
                        "id": "alert_example",
                        "object": "alert",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "monitor_id": "mon_example",
                        "alert_type": "operating_inflows_decline",
                        "severity": "high",
                        "status": "open",
                        "detected_at": "2026-10-23T14:00:00Z",
                        "baseline_snapshot_id": "rsk_original",
                        "current_snapshot_id": "rsk_current",
                        "attribute_key": "operating_inflows",
                        "previous_value": "50000.00",
                        "current_value": "35000.00",
                        "threshold": "relative_change <= -0.25",
                        "reason": "Operating inflows declined over comparable covered windows.",
                        "evidence_ids": [],
                        "resolved_at": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "alert_example",
                        "object": "alert",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/workflow-runs": {
      "get": {
        "operationId": "EP127",
        "summary": "List workflow runs",
        "description": "List authorized workflow run records.\n\nRequired scope: `workflows:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Operations"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_workflow_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "workflows:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/workflow-runs?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/workflow-runs?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/workflow-runs?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized workflow run records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkflowRunRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list workflow runs",
                    "value": {
                      "data": [
                        {
                          "id": "wfr_example",
                          "object": "workflow_run",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "pending",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "workflow_type": "underwrite",
                          "workflow_version": "underwrite-v1",
                          "status": "queued",
                          "input_resource_ids": [
                            "app_example",
                            "doc_example"
                          ],
                          "output_resource_ids": [],
                          "product": "insights",
                          "input_manifest_id": "manifest_example",
                          "initial_input_manifest_id": "manifest_example",
                          "workload_id": "workload_example",
                          "billing_usage_id": null,
                          "monitoring_period_id": null,
                          "blocked_reason": null,
                          "stop_reason": null,
                          "failure": null,
                          "attempt": 1
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "wfr_example",
                          "object": "workflow_run",
                          "created_at": "2026-10-22T13:00:00Z",
                          "updated_at": "2026-10-22T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "pending",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      },
      "post": {
        "operationId": "EP147",
        "summary": "Start workflow run",
        "description": "Run a coordinated risk workflow.\n\nRequired scope: `workflows:execute`. AMLOK returns evidence and assessment results. The institution performs all borrower outreach and intervention in its own systems. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Billable work requires available credits covering its cost; otherwise return 402 insufficient_credits before accepting work, with no debit. A separately requested full underwriting uses Insights. Signal change-driven reassessment is included in Signal and does not create an additional Insights charge. A root underwrite request is a full Insights underwriting and requires application_id and input_manifest_id. Other workflow types require processing_context and are included stages. Signal reassessment is a Signal child run, never a separately billed root underwrite. Workload checks reject known over-limit inputs with 422 workload_limit_exceeded. If discovery reveals more records later, pause as blocked_by_limit before processing beyond the limit. No automatic tier upgrade occurs. Available credits are checked at acceptance and again atomically with output publication and the one usage debit at successful completion. No credits are reserved. If funds were spent by concurrent work, keep the run waiting_for_credits and withhold its final output; resume without duplicate processing when funded. Cancelled runs never publish or charge. Each evidence manifest is immutable. While an unfinished run waits for required evidence, accepted evidence can create a successor manifest; retain initial_input_manifest_id, update input_manifest_id and record_version, and emit an audit event identifying both manifests. The final snapshot and usage link to the final manifest. This continuation keeps the same run and single charge. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Operations"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "workflows:execute"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/workflow-runs\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"subject_id\": \"biz_example\",\n  \"workflow_type\": \"underwrite\",\n  \"workflow_version\": \"underwrite-v1\",\n  \"input_resource_ids\": [\n    \"app_example\",\n    \"doc_example\"\n  ],\n  \"application_id\": \"app_example\",\n  \"input_manifest_id\": \"manifest_example\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/workflow-runs\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'subject_id': 'biz_example',\n 'workflow_type': 'underwrite',\n 'workflow_version': 'underwrite-v1',\n 'input_resource_ids': ['app_example', 'doc_example'],\n 'application_id': 'app_example',\n 'input_manifest_id': 'manifest_example'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/workflow-runs\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"subject_id\": \"biz_example\",\n  \"workflow_type\": \"underwrite\",\n  \"workflow_version\": \"underwrite-v1\",\n  \"input_resource_ids\": [\n    \"app_example\",\n    \"doc_example\"\n  ],\n  \"application_id\": \"app_example\",\n  \"input_manifest_id\": \"manifest_example\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "202": {
            "description": "Run a coordinated risk workflow. Accepted work is not yet complete.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRun"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic start workflow run",
                    "value": {
                      "data": {
                        "id": "wfr_example",
                        "object": "workflow_run",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "workflow_type": "underwrite",
                        "workflow_version": "underwrite-v1",
                        "status": "queued",
                        "input_resource_ids": [
                          "app_example",
                          "doc_example"
                        ],
                        "output_resource_ids": [],
                        "application_id": "app_example",
                        "product": "insights",
                        "input_manifest_id": "manifest_example",
                        "initial_input_manifest_id": "manifest_example",
                        "workload_id": "workload_example",
                        "billing_usage_id": null,
                        "monitoring_period_id": null,
                        "blocked_reason": null,
                        "stop_reason": null,
                        "failure": null,
                        "attempt": 1
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP147Request"
              },
              "example": {
                "subject_id": "biz_example",
                "workflow_type": "underwrite",
                "workflow_version": "underwrite-v1",
                "input_resource_ids": [
                  "app_example",
                  "doc_example"
                ],
                "application_id": "app_example",
                "input_manifest_id": "manifest_example"
              }
            }
          }
        }
      }
    },
    "/v1/workflow-runs/{id}": {
      "get": {
        "operationId": "EP128",
        "summary": "Retrieve workflow run",
        "description": "Retrieve one workflow run with provenance.\n\nRequired scope: `workflows:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Operations"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "wfr_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "workflows:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/workflow-runs/wfr_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/workflow-runs/wfr_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/workflow-runs/wfr_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one workflow run with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRunRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve workflow run",
                    "value": {
                      "data": {
                        "id": "wfr_example",
                        "object": "workflow_run",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "workflow_type": "underwrite",
                        "workflow_version": "underwrite-v1",
                        "status": "queued",
                        "input_resource_ids": [
                          "app_example",
                          "doc_example"
                        ],
                        "output_resource_ids": [],
                        "product": "insights",
                        "input_manifest_id": "manifest_example",
                        "initial_input_manifest_id": "manifest_example",
                        "workload_id": "workload_example",
                        "billing_usage_id": null,
                        "monitoring_period_id": null,
                        "blocked_reason": null,
                        "stop_reason": null,
                        "failure": null,
                        "attempt": 1
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "wfr_example",
                        "object": "workflow_run",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "retryable_failure": {
                    "summary": "Retryable failed attempt on the same run",
                    "value": {
                      "data": {
                        "id": "wfr_example",
                        "object": "workflow_run",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "workflow_type": "underwrite",
                        "workflow_version": "underwrite-v1",
                        "status": "failed",
                        "input_resource_ids": [
                          "app_example",
                          "doc_example"
                        ],
                        "output_resource_ids": [],
                        "product": "insights",
                        "input_manifest_id": "manifest_example",
                        "initial_input_manifest_id": "manifest_example",
                        "workload_id": "workload_example",
                        "billing_usage_id": null,
                        "monitoring_period_id": null,
                        "blocked_reason": null,
                        "stop_reason": null,
                        "failure": {
                          "code": "processing_timeout",
                          "message": "The processing attempt timed out.",
                          "retryable": true,
                          "recovery_action": "retry_same_run",
                          "retry_after_seconds": 30,
                          "occurred_at": "2026-10-23T14:00:00Z",
                          "request_id": "req_example"
                        },
                        "attempt": 1
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/requirements": {
      "get": {
        "operationId": "EP129",
        "summary": "List requirements",
        "description": "List authorized requirement records.\n\nRequired scope: `operations:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Operations"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_requirement_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "operations:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/requirements?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/requirements?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/requirements?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized requirement records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RequirementRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list requirements",
                    "value": {
                      "data": [
                        {
                          "id": "requirement_example",
                          "object": "requirement",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "workflow_run_id": "wfr_example",
                          "requirement_type": "bank_statement",
                          "description": "Most recent three complete bank statements",
                          "status": "requested",
                          "due_on": "2026-10-25",
                          "document_ids": [],
                          "reviewer_id": null,
                          "waiver_reason": null,
                          "rejection": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "requirement_example",
                          "object": "requirement",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/requirements/{id}": {
      "get": {
        "operationId": "EP130",
        "summary": "Retrieve requirement",
        "description": "Retrieve one requirement with provenance.\n\nRequired scope: `operations:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Operations"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "requirement_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "operations:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/requirements/requirement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/requirements/requirement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/requirements/requirement_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one requirement with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RequirementRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve requirement",
                    "value": {
                      "data": {
                        "id": "requirement_example",
                        "object": "requirement",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "workflow_run_id": "wfr_example",
                        "requirement_type": "bank_statement",
                        "description": "Most recent three complete bank statements",
                        "status": "requested",
                        "due_on": "2026-10-25",
                        "document_ids": [],
                        "reviewer_id": null,
                        "waiver_reason": null,
                        "rejection": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "requirement_example",
                        "object": "requirement",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "rejected_evidence": {
                    "summary": "Evidence rejected with a corrective action",
                    "value": {
                      "data": {
                        "id": "requirement_example",
                        "object": "requirement",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "workflow_run_id": "wfr_example",
                        "requirement_type": "bank_statement",
                        "description": "Most recent three complete bank statements",
                        "status": "rejected",
                        "due_on": "2026-10-25",
                        "document_ids": [],
                        "reviewer_id": null,
                        "waiver_reason": null,
                        "rejection": {
                          "code": "unreadable",
                          "message": "Upload a legible replacement document.",
                          "document_ids": [
                            "doc_example"
                          ],
                          "reviewed_at": "2026-10-23T14:00:00Z"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/audit-events": {
      "get": {
        "operationId": "EP131",
        "summary": "List audit events",
        "description": "List authorized audit event records.\n\nRequired scope: `audit:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Operations"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "audit:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/audit-events?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/audit-events?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/audit-events?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized audit event records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuditEventRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list audit events",
                    "value": {
                      "data": [
                        {
                          "id": "audit_event_example",
                          "object": "audit_event",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "actor_id": "client_example",
                          "actor_type": "api_client",
                          "action": "verification.created",
                          "resource_type": "verification",
                          "resource_id": "ver_example",
                          "resource_version": 1,
                          "occurred_at": "2026-10-23T14:00:00Z",
                          "request_id": "req_example",
                          "workflow_run_id": "wfr_example",
                          "outcome": "success",
                          "change_summary": "status changed"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "audit_event_example",
                          "object": "audit_event",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/audit-events/{id}": {
      "get": {
        "operationId": "EP132",
        "summary": "Retrieve audit event",
        "description": "Retrieve one audit event with provenance.\n\nRequired scope: `audit:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Operations"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "audit_event_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "audit:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/audit-events/audit_event_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/audit-events/audit_event_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/audit-events/audit_event_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one audit event with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/AuditEventRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve audit event",
                    "value": {
                      "data": {
                        "id": "audit_event_example",
                        "object": "audit_event",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "actor_id": "client_example",
                        "actor_type": "api_client",
                        "action": "verification.created",
                        "resource_type": "verification",
                        "resource_id": "ver_example",
                        "resource_version": 1,
                        "occurred_at": "2026-10-23T14:00:00Z",
                        "request_id": "req_example",
                        "workflow_run_id": "wfr_example",
                        "outcome": "success",
                        "change_summary": "status changed"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "audit_event_example",
                        "object": "audit_event",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/reconciliation-links": {
      "get": {
        "operationId": "EP133",
        "summary": "List reconciliation links",
        "description": "List authorized reconciliation link records.\n\nRequired scope: `platform:read`. Source, module, country, consent and contracted permissions determine population.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Filter to one authorized business or person where applicable.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "updated_from",
            "in": "query",
            "required": false,
            "description": "Inclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updated_to",
            "in": "query",
            "required": false,
            "description": "Exclusive normalized update time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by this resource status.",
            "schema": {
              "$ref": "#/components/schemas/Enum_reconciliation_status"
            }
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Optional synchronization-checkpoint ID. Freezes this collection at the checkpoint boundary; cursor binds the snapshot. Unsupported or expired snapshots return 410.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "platform:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/reconciliation-links?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/reconciliation-links?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/reconciliation-links?limit=100&cursor=cur_example&subject_id=biz_example&fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List authorized reconciliation link records.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ReconciliationLinkRead"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list reconciliation links",
                    "value": {
                      "data": [
                        {
                          "id": "reconciliation_link_example",
                          "object": "reconciliation_link",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2",
                          "client_reference": "app-1029",
                          "from_resource_type": "payout",
                          "from_resource_id": "pyo_example",
                          "to_resource_type": "bank_transaction",
                          "to_resource_id": "btx_example",
                          "link_type": "settlement",
                          "allocated_amount": {
                            "amount": "1234.56",
                            "currency": "CAD"
                          },
                          "status": "matched",
                          "method_version": "payout_match_v1",
                          "confidence": null,
                          "review_status": "accepted"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": [
                        {
                          "id": "reconciliation_link_example",
                          "object": "reconciliation_link",
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 1,
                          "source_refs": [],
                          "data_status": "partial",
                          "missing_fields": [],
                          "schema_version": "1.4.2"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/reconciliation-links/{id}": {
      "get": {
        "operationId": "EP134",
        "summary": "Retrieve reconciliation link",
        "description": "Retrieve one reconciliation link with provenance.\n\nRequired scope: `platform:read`. Tenant and field entitlements enforced; unknown or invisible ID returns 404.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "reconciliation_link_example"
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "description": "Comma-separated top-level field names. Required identity and metadata always remain. Selected objects are complete; nested paths and wildcards are unsupported. Unknown fields return 400 validation_error.",
            "schema": {
              "type": "string"
            },
            "example": "id,object,updated_at"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "Comma-separated optional expansions: provenance, missing_fields. No unrestricted graph traversal.",
            "schema": {
              "type": "string"
            },
            "example": "provenance"
          },
          {
            "name": "manifest_id",
            "in": "query",
            "required": false,
            "description": "Optional immutable input-manifest ID. Return the exact normalized resource version listed in that manifest, not the current version. Reject IDs absent from the manifest or another subject/workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "platform:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/reconciliation-links/reconciliation_link_example?fields=id%2Cobject%2Cupdated_at&include=provenance\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/reconciliation-links/reconciliation_link_example?fields=id%2Cobject%2Cupdated_at&include=provenance\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/reconciliation-links/reconciliation_link_example?fields=id%2Cobject%2Cupdated_at&include=provenance\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Retrieve one reconciliation link with provenance.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReconciliationLinkRead"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve reconciliation link",
                    "value": {
                      "data": {
                        "id": "reconciliation_link_example",
                        "object": "reconciliation_link",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "from_resource_type": "payout",
                        "from_resource_id": "pyo_example",
                        "to_resource_type": "bank_transaction",
                        "to_resource_id": "btx_example",
                        "link_type": "settlement",
                        "allocated_amount": {
                          "amount": "1234.56",
                          "currency": "CAD"
                        },
                        "status": "matched",
                        "method_version": "payout_match_v1",
                        "confidence": null,
                        "review_status": "accepted"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  },
                  "projected": {
                    "summary": "Metadata-only response with fields=id",
                    "value": {
                      "data": {
                        "id": "reconciliation_link_example",
                        "object": "reconciliation_link",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/consents/{id}/revoke": {
      "post": {
        "operationId": "EP138",
        "summary": "Revoke consent",
        "description": "Revoke future collection under this consent.\n\nRequired scope: `consent:write`. Existing evidence retention follows configured policy. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "con_example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "consent:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/consents/con_example/revoke\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"reason\": \"Requested by the authorized institution.\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/consents/con_example/revoke\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'reason': 'Requested by the authorized institution.'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/consents/con_example/revoke\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"reason\": \"Requested by the authorized institution.\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Revoke future collection under this consent.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Consent"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic revoke consent",
                    "value": {
                      "data": {
                        "id": "con_example",
                        "object": "consent",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "subject_type": "business",
                        "status": "revoked",
                        "purposes": [
                          "credit_assessment"
                        ],
                        "scopes": [
                          "banking:read"
                        ],
                        "granted_at": null,
                        "expires_at": null,
                        "revoked_at": "2026-10-23T14:00:00Z",
                        "policy_version": "consent-v1",
                        "evidence_document_id": "doc_consent",
                        "authorized_by": "per_authorizer"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP138Request"
              },
              "example": {
                "reason": "Requested by the authorized institution."
              }
            }
          }
        }
      }
    },
    "/v1/connections/{id}/sync": {
      "post": {
        "operationId": "EP140",
        "summary": "Start connection sync",
        "description": "Request a bounded data refresh.\n\nRequired scope: `connections:write`. Poll GET /v1/sync-jobs/{id}; may complete partially. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/connections/cnn_example/sync\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"resources\": [\n    \"bank_transaction\"\n  ],\n  \"from\": \"2026-09-01\",\n  \"to\": \"2026-10-01\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/connections/cnn_example/sync\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'resources': ['bank_transaction'],\n 'from': '2026-09-01',\n 'to': '2026-10-01'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/connections/cnn_example/sync\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"resources\": [\n    \"bank_transaction\"\n  ],\n  \"from\": \"2026-09-01\",\n  \"to\": \"2026-10-01\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "202": {
            "description": "Request a bounded data refresh. Accepted work is not yet complete.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SyncJob"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic start connection sync",
                    "value": {
                      "data": {
                        "id": "cnn_example",
                        "object": "sync_job",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "connection_id": "cnn_01JAMLOK",
                        "resources": [
                          "bank_account",
                          "bank_transaction"
                        ],
                        "status": "queued",
                        "started_at": null,
                        "completed_at": null,
                        "requested_from": "2026-09-01",
                        "requested_to": "2026-10-01",
                        "records_added": null,
                        "records_updated": null,
                        "records_removed": null,
                        "coverage_start": null,
                        "coverage_end": null,
                        "errors": []
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP140Request"
              },
              "example": {
                "resources": [
                  "bank_transaction"
                ],
                "from": "2026-09-01",
                "to": "2026-10-01"
              }
            }
          }
        }
      }
    },
    "/v1/connections/{id}/disconnect": {
      "post": {
        "operationId": "EP141",
        "summary": "Disconnect connection",
        "description": "Disconnect a provider link.\n\nRequired scope: `connections:write`. Stops future collection; not a full evidence deletion command. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "cnn_example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/connections/cnn_example/disconnect\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"reason\": \"Requested by the authorized institution.\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/connections/cnn_example/disconnect\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'reason': 'Requested by the authorized institution.'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/connections/cnn_example/disconnect\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"reason\": \"Requested by the authorized institution.\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Disconnect a provider link.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic disconnect connection",
                    "value": {
                      "data": {
                        "id": "cnn_example",
                        "object": "connection",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "provider_id": "BANK-02",
                        "provider_tenant_id": "item_example",
                        "status": "revoked",
                        "institution_id": "ins_example",
                        "institution_name": "Example Bank",
                        "country": "CA",
                        "products": [
                          "transactions",
                          "balance"
                        ],
                        "scopes": [
                          "banking:read"
                        ],
                        "consent_id": "con_01JAMLOK",
                        "last_successful_sync_at": null,
                        "next_refresh_at": null,
                        "history_available_from": "2025-10-22",
                        "reauth_required_at": null,
                        "error_code": "reauth_required",
                        "sync_cursor": "cur_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP141Request"
              },
              "example": {
                "reason": "Requested by the authorized institution."
              }
            }
          }
        }
      }
    },
    "/v1/documents/{id}/download": {
      "post": {
        "operationId": "EP145",
        "summary": "Create document download link",
        "description": "Issue a short-lived evidence-download URL.\n\nRequired scope: `documents:read`. Signed link is scoped and expires; no permanent public storage URL. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Identity"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "doc_example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "documents:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/documents/doc_example/download\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"purpose\": \"credit_assessment\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/documents/doc_example/download\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'purpose': 'credit_assessment'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/documents/doc_example/download\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"purpose\": \"credit_assessment\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Issue a short-lived evidence-download URL.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DownloadLink"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create document download link",
                    "value": {
                      "data": {
                        "document_id": "doc_example",
                        "url": "https://evidence.example.com/temporary",
                        "expires_at": "2026-10-23T14:00:00Z",
                        "id": "doc_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP145Request"
              },
              "example": {
                "purpose": "credit_assessment"
              }
            }
          }
        }
      }
    },
    "/v1/attribute-calculations": {
      "post": {
        "operationId": "EP148",
        "summary": "Calculate attributes",
        "description": "Calculate selected attributes from a frozen evidence window.\n\nRequired scope: `risk:calculate`. GET /v1/attribute-calculations/{id} reports job state; values in /v1/attributes. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Discover input_manifest_id through GET /v1/input-manifests. It must be ready and belong to the same subject and workspace. The calculation window must be contained within its frozen coverage. This is a stage of an authorized Insights or Signal workflow. processing_context is required; unrelated, completed, unpaid, cancelled or unentitled contexts return 409 invalid_state. It creates no separate AMLOK charge. The orchestrator deduplicates equivalent stage work within the parent. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:calculate"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/attribute-calculations\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"subject_id\": \"biz_example\",\n  \"keys\": [\n    \"operating_inflows\"\n  ],\n  \"window_start\": \"2026-09-01\",\n  \"window_end\": \"2026-10-01\",\n  \"input_manifest_id\": \"manifest_example\",\n  \"processing_context\": {\n    \"product\": \"insights\",\n    \"workflow_run_id\": \"wfr_example\"\n  }\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/attribute-calculations\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'subject_id': 'biz_example',\n 'keys': ['operating_inflows'],\n 'window_start': '2026-09-01',\n 'window_end': '2026-10-01',\n 'input_manifest_id': 'manifest_example',\n 'processing_context': {'product': 'insights',\n                        'workflow_run_id': 'wfr_example'}},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/attribute-calculations\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"subject_id\": \"biz_example\",\n  \"keys\": [\n    \"operating_inflows\"\n  ],\n  \"window_start\": \"2026-09-01\",\n  \"window_end\": \"2026-10-01\",\n  \"input_manifest_id\": \"manifest_example\",\n  \"processing_context\": {\n    \"product\": \"insights\",\n    \"workflow_run_id\": \"wfr_example\"\n  }\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "202": {
            "description": "Calculate selected attributes from a frozen evidence window. Accepted work is not yet complete.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalculationJob"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic calculate attributes",
                    "value": {
                      "data": {
                        "id": "calc_example",
                        "status": "queued",
                        "subject_id": "biz_example",
                        "attribute_ids": [],
                        "errors": [],
                        "stop_reason": null,
                        "processing_context": {
                          "product": "insights",
                          "workflow_run_id": "wfr_example"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP148Request"
              },
              "example": {
                "subject_id": "biz_example",
                "keys": [
                  "operating_inflows"
                ],
                "window_start": "2026-09-01",
                "window_end": "2026-10-01",
                "input_manifest_id": "manifest_example",
                "processing_context": {
                  "product": "insights",
                  "workflow_run_id": "wfr_example"
                }
              }
            }
          }
        }
      }
    },
    "/v1/attribute-calculations/{id}": {
      "get": {
        "operationId": "EP149",
        "summary": "Retrieve attribute calculation",
        "description": "Read calculation job state and result IDs.\n\nRequired scope: `risk:read`. Job schema in Shared Types.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "res_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/attribute-calculations/res_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/attribute-calculations/res_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/attribute-calculations/res_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Read calculation job state and result IDs.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CalculationJob"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve attribute calculation",
                    "value": {
                      "data": {
                        "id": "calc_example",
                        "status": "queued",
                        "subject_id": "biz_example",
                        "attribute_ids": [],
                        "errors": [],
                        "stop_reason": null,
                        "processing_context": {
                          "product": "insights",
                          "workflow_run_id": "wfr_example"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/webhook-endpoints": {
      "post": {
        "operationId": "EP158",
        "summary": "Create webhook endpoint",
        "description": "Register an HTTPS event destination.\n\nRequired scope: `webhooks:write`. Return signing secret only once; validate destination against SSRF and tenant rules. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "webhooks:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/webhook-endpoints\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"url\": \"https://client.example.com/amlok-events\",\n  \"event_types\": [\n    \"verification.completed\"\n  ],\n  \"description\": \"Application events for the underwriting service\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/webhook-endpoints\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'url': 'https://client.example.com/amlok-events',\n 'event_types': ['verification.completed'],\n 'description': 'Application events for the underwriting '\n                'service'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/webhook-endpoints\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"url\": \"https://client.example.com/amlok-events\",\n  \"event_types\": [\n    \"verification.completed\"\n  ],\n  \"description\": \"Application events for the underwriting service\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "201": {
            "description": "Register an HTTPS event destination.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookEndpointCreated"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create webhook endpoint",
                    "value": {
                      "data": {
                        "id": "whk_example",
                        "url": "https://client.example.com/amlok-events",
                        "event_types": [
                          "verification.completed"
                        ],
                        "status": "active",
                        "secret": "synthetic_webhook_secret_replace_on_provisioning"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP158Request"
              },
              "example": {
                "url": "https://client.example.com/amlok-events",
                "event_types": [
                  "verification.completed"
                ],
                "description": "Application events for the underwriting service"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "EP159",
        "summary": "List webhook endpoints",
        "description": "List tenant event destinations.\n\nRequired scope: `webhooks:read`. Secrets are never returned on list/read.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "webhooks:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/webhook-endpoints?limit=100&cursor=cur_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/webhook-endpoints?limit=100&cursor=cur_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/webhook-endpoints?limit=100&cursor=cur_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List tenant event destinations.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEndpointPublic"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list webhook endpoints",
                    "value": {
                      "data": [
                        {
                          "id": "whk_example",
                          "url": "https://client.example.com/amlok-events",
                          "event_types": [
                            "verification.completed"
                          ],
                          "status": "active"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/webhook-endpoints/{id}/replay": {
      "post": {
        "operationId": "EP160",
        "summary": "Replay webhook event",
        "description": "Replay a previously generated authorized event.\n\nRequired scope: `webhooks:write`. Preserve original event ID for deduplication; log delivery attempt. Once account cancellation is submitted, processing and usage deductions stop immediately. Reject new operational commands with 409 invalid_state; pending work is cancelled without another debit. Read-only reporting remains available until workspace deletion. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt. Discover missing event IDs through GET /v1/webhook-events and inspect attempts through GET /v1/webhook-deliveries. Replay requires a retained event, original resource permission and an enabled endpoint subscribed to its type. Expired events return 410 event_history_expired; a disabled endpoint returns 409 invalid_state. Portal administrators manage destination URLs, subscriptions, enable/disable and signing-secret rotation. During the configured rotation overlap each delivery has v1 signatures for both old and new secrets; verifiers accept any matching v1. After the announced cutoff only the new secret signs deliveries.",
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Tenant-visible resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "res_example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Reuse for retries of the same intended command and identical payload. Retention: 24 hours.",
            "schema": {
              "type": "string"
            },
            "example": "idem_example_1001"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "webhooks:write"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/webhook-endpoints/res_example/replay\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"event_id\": \"evt_example\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/webhook-endpoints/res_example/replay\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'event_id': 'evt_example'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/webhook-endpoints/res_example/replay\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"event_id\": \"evt_example\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "202": {
            "description": "Replay a previously generated authorized event. Accepted work is not yet complete.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookReplay"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic replay webhook event",
                    "value": {
                      "data": {
                        "event_id": "evt_example",
                        "endpoint_id": "whk_example",
                        "status": "queued"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EP160Request"
              },
              "example": {
                "event_id": "evt_example"
              }
            }
          }
        }
      }
    },
    "/v1/providers": {
      "get": {
        "operationId": "EP163",
        "summary": "List providers",
        "description": "List contracted provider capabilities available to the caller.\n\nRequired scope: `connections:read`. Runtime entitlements, not the candidate workbook inventory.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "cur_example"
          },
          {
            "name": "country",
            "in": "query",
            "required": false,
            "description": "Target country for runtime capability lookup.",
            "schema": {
              "type": "string"
            },
            "example": "CA"
          },
          {
            "name": "resource_type",
            "in": "query",
            "required": false,
            "description": "Return capabilities for one resource type.",
            "schema": {
              "type": "string",
              "enum": [
                "connection",
                "consent",
                "sync_job",
                "business",
                "person",
                "relationship",
                "verification",
                "verification_check",
                "screening_match",
                "document",
                "bank_account",
                "account_balance",
                "bank_transaction",
                "recurring_stream",
                "income_observation",
                "merchant_account",
                "payment",
                "processor_transaction",
                "payout",
                "refund",
                "dispute",
                "counterparty",
                "order",
                "order_line",
                "subscription",
                "ledger_account",
                "journal",
                "journal_line",
                "invoice",
                "bill",
                "credit_note",
                "accounting_payment",
                "financial_statement",
                "statement_line",
                "tax_obligation",
                "product",
                "location",
                "inventory_balance",
                "inventory_movement",
                "purchase_order",
                "shipment",
                "production_order",
                "project",
                "application",
                "credit_facility",
                "loan",
                "installment",
                "repayment",
                "collateral",
                "guarantee",
                "covenant",
                "decision",
                "lien_search",
                "lien",
                "filing_event",
                "attribute",
                "risk_snapshot",
                "monitor",
                "alert",
                "workflow_run",
                "requirement",
                "audit_event",
                "reconciliation_link"
              ]
            },
            "example": "bank_transaction"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/providers?limit=100&cursor=cur_example&country=CA&resource_type=bank_transaction\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/providers?limit=100&cursor=cur_example&country=CA&resource_type=bank_transaction\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/providers?limit=100&cursor=cur_example&country=CA&resource_type=bank_transaction\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "List contracted provider capabilities available to the caller.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ProviderCapability"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list providers",
                    "value": {
                      "data": [
                        {
                          "provider_id": "BANK-02",
                          "resources": [
                            "bank_account",
                            "bank_transaction"
                          ],
                          "countries": [
                            "CA"
                          ],
                          "status": "enabled",
                          "limitations": [],
                          "products": [
                            {
                              "id": "transactions",
                              "resources": [
                                "bank_account",
                                "bank_transaction"
                              ],
                              "consent_scopes": [
                                "banking:read"
                              ],
                              "purposes": [
                                "credit_assessment"
                              ]
                            }
                          ]
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "partial"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/changes": {
      "get": {
        "operationId": "EP164",
        "summary": "Read change feed",
        "description": "Read created, updated and deleted normalized-resource changes in ascending sequence order. A cursor from a synchronization checkpoint is required on the first request; thereafter use the returned resume_cursor. Never reuse a collection cursor. Persist the returned resume_cursor only after durably applying every event in the page, deduplicating by resource type, ID and version. A terminal or empty page still returns a resume_cursor; poll it later to receive new changes. Each successful poll returns cursor_expires_at. A cursor expired beyond that time returns 410 cursor_expired and requires a new checkpoint plus a fresh bootstrap. Filters and workspace binding cannot change mid-stream. Deleted resources emit tombstones. Billing resources use billing snapshots and billing events, not this normalized-data feed.",
        "tags": [
          "Platform"
        ],
        "parameters": [
          {
            "name": "X-Request-ID",
            "in": "header",
            "required": false,
            "description": "Optional caller correlation ID; the response includes AMLOK request_id.",
            "schema": {
              "type": "string"
            },
            "example": "client-request-example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size. Default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": true,
            "description": "Opaque AMLOK cursor. Preserve the original filters.",
            "schema": {
              "type": "string"
            },
            "example": "changes_after_checkpoint_example"
          },
          {
            "name": "resource_types",
            "in": "query",
            "required": false,
            "description": "Optional comma-separated types. When omitted, inherit the checkpoint types; if supplied, must match them exactly.",
            "schema": {
              "type": "string"
            },
            "example": "bank_transaction,lien"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "platform:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/changes?limit=100&cursor=changes_after_checkpoint_example&resource_types=bank_transaction%2Clien\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/changes?limit=100&cursor=changes_after_checkpoint_example&resource_types=bank_transaction%2Clien\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/changes?limit=100&cursor=changes_after_checkpoint_example&resource_types=bank_transaction%2Clien\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Read authorized normalized resource changes.",
            "headers": {
              "X-Request-ID": {
                "description": "AMLOK response correlation identifier.",
                "schema": {
                  "type": "string"
                },
                "example": "req_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChangePage"
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic read change feed",
                    "value": {
                      "data": [
                        {
                          "resource_type": "bank_transaction",
                          "resource_id": "btx_example",
                          "resource_version": 2,
                          "action": "updated",
                          "changed_at": "2026-10-23T14:00:00Z",
                          "sequence": 42
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      },
                      "resume_cursor": "changes_after_sequence_42",
                      "cursor_expires_at": "2026-11-01T14:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          }
        }
      }
    },
    "/v1/billing/snapshot": {
      "get": {
        "operationId": "WA062",
        "summary": "Retrieve current billing snapshot",
        "description": "Read a consistent workspace billing snapshot. The snapshot freezes financial resource versions, rate cards, payment history and the ledger high-water mark at as_of. Reuse its id as snapshot_id on financial reads and export requests. Later postings or corrections never change this snapshot. Snapshots are available until workspace deletion; export needed evidence before closure. Unknown or deleted snapshot IDs return 404. This read does not spend credits or change payment settings.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingSnapshot"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve current billing snapshot",
                    "value": {
                      "data": {
                        "id": "billing_snapshot_example",
                        "object": "billing_snapshot",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "billing_account_id": "billing_account_example",
                        "as_of": "2026-10-23T14:00:00Z",
                        "ledger_sequence": 3,
                        "consistency": "immutable_workspace_billing_snapshot"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/snapshot\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/snapshot\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/snapshot\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/snapshots/{id}": {
      "get": {
        "operationId": "WA063",
        "summary": "Retrieve billing snapshot",
        "description": "Read a consistent workspace billing snapshot. The snapshot freezes financial resource versions, rate cards, payment history and the ledger high-water mark at as_of. Reuse its id as snapshot_id on financial reads and export requests. Later postings or corrections never change this snapshot. Snapshots are available until workspace deletion; export needed evidence before closure. Unknown or deleted snapshot IDs return 404. This read does not spend credits or change payment settings.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingSnapshot"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve billing snapshot",
                    "value": {
                      "data": {
                        "id": "billing_snapshot_example",
                        "object": "billing_snapshot",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "billing_account_id": "billing_account_example",
                        "as_of": "2026-10-23T14:00:00Z",
                        "ledger_sequence": 3,
                        "consistency": "immutable_workspace_billing_snapshot"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/snapshots/billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/snapshots/billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/snapshots/billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/account": {
      "get": {
        "operationId": "WA001",
        "summary": "Retrieve billing account",
        "description": "Read the unified workspace billing policy, CAD 200 default automatic top-up trigger, and CAD 500 minimum customer-funded top-up. The client portal manages card or bank-account payment methods, automatic top-ups and cancellation; enterprise clients can also use their dedicated account manager. The public API provides reporting only. Cancellation is available at any time with no notice period. Processing, usage deductions, and upcoming top-ups stop immediately when cancellation is submitted or set by the account manager. Cancel unfinished work without another debit. Full closure is at the end of the request month, with an immediate refund of all unused credits, including promotional credits, to the saved portal bank account. Data is deleted after the month closes and necessary final information is generated. Used credits are non-refundable.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingAccount"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve billing account",
                    "value": {
                      "data": {
                        "id": "billing_account_example",
                        "object": "billing_account",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "currency": "CAD",
                        "agreement_id": "agr_example",
                        "agreement_version": "3",
                        "minimum_monthly_commitment": "1000.00",
                        "payment_for_12_months": "12000.00",
                        "term_start": "2026-10-01T00:00:00Z",
                        "term_end": "2027-10-01T00:00:00Z",
                        "renewal_payment_at": "2027-10-01T00:00:00Z",
                        "credit_type": "prepaid_service_credits",
                        "outflow_policy": "product_usage_or_final_cancellation_refund",
                        "refund_policy": "full_unused_balance_on_final_cancellation",
                        "access": "reporting_only",
                        "portal_controls": [
                          "payment_methods",
                          "automatic_top_ups",
                          "account_cancellation"
                        ],
                        "funding_methods": [
                          "card",
                          "bank_account"
                        ],
                        "default_auto_top_up_threshold": "200.00",
                        "minimum_top_up_threshold": "200.00",
                        "payment_frequency": "every_12_months",
                        "cancellation_notice_days": 0,
                        "closure_timing": "end_of_request_month",
                        "processing_cutoff": "immediate_on_cancellation",
                        "status": "active",
                        "cancellation_requested_at": null,
                        "scheduled_closure_at": null,
                        "minimum_top_up_amount": "500.00",
                        "auto_top_up_enabled": true,
                        "auto_top_up_threshold": "200.00",
                        "auto_top_up_amount": "500.00",
                        "auto_top_up_balance_basis": "available_credits",
                        "refund_destination": "saved_portal_bank_account",
                        "policy_version": "unified-workspace-credits",
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/account?snapshot_id=billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/account?snapshot_id=billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/account?snapshot_id=billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/rate-card": {
      "get": {
        "operationId": "WA002",
        "summary": "Retrieve billing rate card",
        "description": "Read published or negotiated rates and agreed workload limits for the workspace. Custom quotes retain standard, advanced or complex as the tier and use pricing_basis negotiated with the agreed effective_rate and workload_limits. Insights record_limit covers the complete underwriting snapshot, including at least 12 months of banking history. Signal record_limit covers only newly processed records during the month; each updated record version counts as new, while retries and unchanged baseline records are not counted again. The tier must cover every workload dimension; custom allowances require an agreed quote. Historical usage retains its own rate-card identifier and effective rate.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingRateCard"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve billing rate card",
                    "value": {
                      "data": {
                        "id": "billing_rate_card_example",
                        "object": "billing_rate_card",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "currency": "CAD",
                        "effective_from": "2026-10-01T00:00:00Z",
                        "effective_to": null,
                        "agreement_id": "agr_example",
                        "agreement_version": "3",
                        "supersedes_id": null,
                        "rates": [
                          {
                            "product": "insights",
                            "tier": "standard",
                            "unit": "completed_underwriting",
                            "base_rate": "5.00",
                            "discount_percent": "0",
                            "effective_rate": "5.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 2,
                              "business_integrations": 5,
                              "record_limit": 75000,
                              "minimum_banking_history_months": 12,
                              "analysis_scope": "Routine reconciliation and standard analysis",
                              "record_counting_basis": "per_underwriting",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "successful_output_completion"
                          },
                          {
                            "product": "insights",
                            "tier": "advanced",
                            "unit": "completed_underwriting",
                            "base_rate": "15.00",
                            "discount_percent": "0",
                            "effective_rate": "15.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 4,
                              "business_integrations": 10,
                              "record_limit": 250000,
                              "minimum_banking_history_months": 12,
                              "analysis_scope": "Multiple entities or channels and deeper reconciliation",
                              "record_counting_basis": "per_underwriting",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "successful_output_completion"
                          },
                          {
                            "product": "insights",
                            "tier": "complex",
                            "unit": "completed_underwriting",
                            "base_rate": "35.00",
                            "discount_percent": "0",
                            "effective_rate": "35.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 8,
                              "business_integrations": 20,
                              "record_limit": 1000000,
                              "minimum_banking_history_months": 12,
                              "analysis_scope": "Extensive relationships, exceptions, and investigation",
                              "record_counting_basis": "per_underwriting",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "successful_output_completion"
                          },
                          {
                            "product": "signal",
                            "tier": "standard",
                            "unit": "active_account_month",
                            "base_rate": "3.00",
                            "discount_percent": "0",
                            "effective_rate": "3.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 2,
                              "business_integrations": 5,
                              "record_limit": 75000,
                              "minimum_banking_history_months": null,
                              "analysis_scope": "Routine reconciliation and standard analysis",
                              "record_counting_basis": "new_records_per_month",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "month_start_or_first_activation"
                          },
                          {
                            "product": "signal",
                            "tier": "advanced",
                            "unit": "active_account_month",
                            "base_rate": "5.00",
                            "discount_percent": "0",
                            "effective_rate": "5.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 4,
                              "business_integrations": 10,
                              "record_limit": 250000,
                              "minimum_banking_history_months": null,
                              "analysis_scope": "Multiple entities or channels and deeper reconciliation",
                              "record_counting_basis": "new_records_per_month",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "month_start_or_first_activation"
                          },
                          {
                            "product": "signal",
                            "tier": "complex",
                            "unit": "active_account_month",
                            "base_rate": "8.00",
                            "discount_percent": "0",
                            "effective_rate": "8.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 8,
                              "business_integrations": 20,
                              "record_limit": 1000000,
                              "minimum_banking_history_months": null,
                              "analysis_scope": "Extensive relationships, exceptions, and investigation",
                              "record_counting_basis": "new_records_per_month",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "month_start_or_first_activation"
                          }
                        ],
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/rate-card?snapshot_id=billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/rate-card?snapshot_id=billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/rate-card?snapshot_id=billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/rate-cards": {
      "get": {
        "operationId": "WA060",
        "summary": "List historical rate cards",
        "description": "Read immutable rate-card versions, including published and negotiated rates, workload limits and agreement references. A pricing change creates a new card and supersedes_id; historical usage keeps its original rate_card_id. The singular rate-card route selects the card effective at the snapshot time. effective_to is the exclusive scheduled end, if known when issued; later supersession does not rewrite old cards. Order by effective_from then id. Return only versions known at the selected snapshot.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "effective_at",
            "in": "query",
            "required": false,
            "description": "Return the card effective at this UTC instant, no later than the selected snapshot.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "agreement_id",
            "in": "query",
            "required": false,
            "description": "Filter by agreement reference.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size; default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and a stable snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingRateCard"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list historical rate cards",
                    "value": {
                      "data": [
                        {
                          "id": "billing_rate_card_example",
                          "object": "billing_rate_card",
                          "record_version": 1,
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "workspace_id": "wsp_example",
                          "currency": "CAD",
                          "effective_from": "2026-10-01T00:00:00Z",
                          "effective_to": null,
                          "agreement_id": "agr_example",
                          "agreement_version": "3",
                          "supersedes_id": null,
                          "rates": [
                            {
                              "product": "insights",
                              "tier": "standard",
                              "unit": "completed_underwriting",
                              "base_rate": "5.00",
                              "discount_percent": "0",
                              "effective_rate": "5.00",
                              "pricing_basis": "published",
                              "workload_limits": {
                                "bank_accounts": 2,
                                "business_integrations": 5,
                                "record_limit": 75000,
                                "minimum_banking_history_months": 12,
                                "analysis_scope": "Routine reconciliation and standard analysis",
                                "record_counting_basis": "per_underwriting",
                                "record_counting_rule": "distinct_record_versions"
                              },
                              "billing_timing": "successful_output_completion"
                            },
                            {
                              "product": "insights",
                              "tier": "advanced",
                              "unit": "completed_underwriting",
                              "base_rate": "15.00",
                              "discount_percent": "0",
                              "effective_rate": "15.00",
                              "pricing_basis": "published",
                              "workload_limits": {
                                "bank_accounts": 4,
                                "business_integrations": 10,
                                "record_limit": 250000,
                                "minimum_banking_history_months": 12,
                                "analysis_scope": "Multiple entities or channels and deeper reconciliation",
                                "record_counting_basis": "per_underwriting",
                                "record_counting_rule": "distinct_record_versions"
                              },
                              "billing_timing": "successful_output_completion"
                            },
                            {
                              "product": "insights",
                              "tier": "complex",
                              "unit": "completed_underwriting",
                              "base_rate": "35.00",
                              "discount_percent": "0",
                              "effective_rate": "35.00",
                              "pricing_basis": "published",
                              "workload_limits": {
                                "bank_accounts": 8,
                                "business_integrations": 20,
                                "record_limit": 1000000,
                                "minimum_banking_history_months": 12,
                                "analysis_scope": "Extensive relationships, exceptions, and investigation",
                                "record_counting_basis": "per_underwriting",
                                "record_counting_rule": "distinct_record_versions"
                              },
                              "billing_timing": "successful_output_completion"
                            },
                            {
                              "product": "signal",
                              "tier": "standard",
                              "unit": "active_account_month",
                              "base_rate": "3.00",
                              "discount_percent": "0",
                              "effective_rate": "3.00",
                              "pricing_basis": "published",
                              "workload_limits": {
                                "bank_accounts": 2,
                                "business_integrations": 5,
                                "record_limit": 75000,
                                "minimum_banking_history_months": null,
                                "analysis_scope": "Routine reconciliation and standard analysis",
                                "record_counting_basis": "new_records_per_month",
                                "record_counting_rule": "distinct_record_versions"
                              },
                              "billing_timing": "month_start_or_first_activation"
                            },
                            {
                              "product": "signal",
                              "tier": "advanced",
                              "unit": "active_account_month",
                              "base_rate": "5.00",
                              "discount_percent": "0",
                              "effective_rate": "5.00",
                              "pricing_basis": "published",
                              "workload_limits": {
                                "bank_accounts": 4,
                                "business_integrations": 10,
                                "record_limit": 250000,
                                "minimum_banking_history_months": null,
                                "analysis_scope": "Multiple entities or channels and deeper reconciliation",
                                "record_counting_basis": "new_records_per_month",
                                "record_counting_rule": "distinct_record_versions"
                              },
                              "billing_timing": "month_start_or_first_activation"
                            },
                            {
                              "product": "signal",
                              "tier": "complex",
                              "unit": "active_account_month",
                              "base_rate": "8.00",
                              "discount_percent": "0",
                              "effective_rate": "8.00",
                              "pricing_basis": "published",
                              "workload_limits": {
                                "bank_accounts": 8,
                                "business_integrations": 20,
                                "record_limit": 1000000,
                                "minimum_banking_history_months": null,
                                "analysis_scope": "Extensive relationships, exceptions, and investigation",
                                "record_counting_basis": "new_records_per_month",
                                "record_counting_rule": "distinct_record_versions"
                              },
                              "billing_timing": "month_start_or_first_activation"
                            }
                          ],
                          "snapshot_id": "billing_snapshot_example"
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/rate-cards?snapshot_id=billing_snapshot_example&limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/rate-cards?snapshot_id=billing_snapshot_example&limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/rate-cards?snapshot_id=billing_snapshot_example&limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/rate-cards/{id}": {
      "get": {
        "operationId": "WA061",
        "summary": "Retrieve historical rate card",
        "description": "Read immutable rate-card versions, including published and negotiated rates, workload limits and agreement references. A pricing change creates a new card and supersedes_id; historical usage keeps its original rate_card_id. The singular rate-card route selects the card effective at the snapshot time. effective_to is the exclusive scheduled end, if known when issued; later supersession does not rewrite old cards. Order by effective_from then id. Return only versions known at the selected snapshot.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "billing_rate_card_example"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingRateCard"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve historical rate card",
                    "value": {
                      "data": {
                        "id": "billing_rate_card_example",
                        "object": "billing_rate_card",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "currency": "CAD",
                        "effective_from": "2026-10-01T00:00:00Z",
                        "effective_to": null,
                        "agreement_id": "agr_example",
                        "agreement_version": "3",
                        "supersedes_id": null,
                        "rates": [
                          {
                            "product": "insights",
                            "tier": "standard",
                            "unit": "completed_underwriting",
                            "base_rate": "5.00",
                            "discount_percent": "0",
                            "effective_rate": "5.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 2,
                              "business_integrations": 5,
                              "record_limit": 75000,
                              "minimum_banking_history_months": 12,
                              "analysis_scope": "Routine reconciliation and standard analysis",
                              "record_counting_basis": "per_underwriting",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "successful_output_completion"
                          },
                          {
                            "product": "insights",
                            "tier": "advanced",
                            "unit": "completed_underwriting",
                            "base_rate": "15.00",
                            "discount_percent": "0",
                            "effective_rate": "15.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 4,
                              "business_integrations": 10,
                              "record_limit": 250000,
                              "minimum_banking_history_months": 12,
                              "analysis_scope": "Multiple entities or channels and deeper reconciliation",
                              "record_counting_basis": "per_underwriting",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "successful_output_completion"
                          },
                          {
                            "product": "insights",
                            "tier": "complex",
                            "unit": "completed_underwriting",
                            "base_rate": "35.00",
                            "discount_percent": "0",
                            "effective_rate": "35.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 8,
                              "business_integrations": 20,
                              "record_limit": 1000000,
                              "minimum_banking_history_months": 12,
                              "analysis_scope": "Extensive relationships, exceptions, and investigation",
                              "record_counting_basis": "per_underwriting",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "successful_output_completion"
                          },
                          {
                            "product": "signal",
                            "tier": "standard",
                            "unit": "active_account_month",
                            "base_rate": "3.00",
                            "discount_percent": "0",
                            "effective_rate": "3.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 2,
                              "business_integrations": 5,
                              "record_limit": 75000,
                              "minimum_banking_history_months": null,
                              "analysis_scope": "Routine reconciliation and standard analysis",
                              "record_counting_basis": "new_records_per_month",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "month_start_or_first_activation"
                          },
                          {
                            "product": "signal",
                            "tier": "advanced",
                            "unit": "active_account_month",
                            "base_rate": "5.00",
                            "discount_percent": "0",
                            "effective_rate": "5.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 4,
                              "business_integrations": 10,
                              "record_limit": 250000,
                              "minimum_banking_history_months": null,
                              "analysis_scope": "Multiple entities or channels and deeper reconciliation",
                              "record_counting_basis": "new_records_per_month",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "month_start_or_first_activation"
                          },
                          {
                            "product": "signal",
                            "tier": "complex",
                            "unit": "active_account_month",
                            "base_rate": "8.00",
                            "discount_percent": "0",
                            "effective_rate": "8.00",
                            "pricing_basis": "published",
                            "workload_limits": {
                              "bank_accounts": 8,
                              "business_integrations": 20,
                              "record_limit": 1000000,
                              "minimum_banking_history_months": null,
                              "analysis_scope": "Extensive relationships, exceptions, and investigation",
                              "record_counting_basis": "new_records_per_month",
                              "record_counting_rule": "distinct_record_versions"
                            },
                            "billing_timing": "month_start_or_first_activation"
                          }
                        ],
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/rate-cards/billing_rate_card_example?snapshot_id=billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/rate-cards/billing_rate_card_example?snapshot_id=billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/rate-cards/billing_rate_card_example?snapshot_id=billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/usage": {
      "get": {
        "operationId": "WA003",
        "summary": "List usage records",
        "description": "Read immutable usage charges and correcting reversals. Usage records exist only for actual deductions or their corrections; unfinished work is represented by its processing resource, not a pending credit category. Order by selected time_basis then id. No customer endpoint creates charges. Cancellation stops all further deductions.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "Inclusive UTC boundary. Must precede to.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-10-01T00:00:00Z"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "Exclusive UTC boundary.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-11-01T00:00:00Z"
          },
          {
            "name": "time_basis",
            "in": "query",
            "required": false,
            "description": "Choose event or posting time; defaults to posted_at.",
            "schema": {
              "type": "string",
              "enum": [
                "occurred_at",
                "posted_at"
              ]
            },
            "example": "posted_at"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Usage is recorded only after an actual debit or correcting reversal.",
            "schema": {
              "type": "string",
              "enum": [
                "posted"
              ]
            }
          },
          {
            "name": "entry_type",
            "in": "query",
            "required": false,
            "description": "Charge or compensating reversal.",
            "schema": {
              "type": "string",
              "enum": [
                "charge",
                "reversal"
              ]
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "description": "Product filter.",
            "schema": {
              "type": "string",
              "enum": [
                "insights",
                "signal"
              ]
            }
          },
          {
            "name": "tier",
            "in": "query",
            "required": false,
            "description": "Complexity filter.",
            "schema": {
              "type": "string",
              "enum": [
                "standard",
                "advanced",
                "complex"
              ]
            }
          },
          {
            "name": "source_resource_id",
            "in": "query",
            "required": false,
            "description": "Workflow-run ID for Insights or borrower/business ID for Signal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rate_card_id",
            "in": "query",
            "required": false,
            "description": "Filter to an immutable rate-card version.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size; default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and a stable snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingUsage"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list usage records",
                    "value": {
                      "data": [
                        {
                          "id": "billing_usage_signal",
                          "object": "billing_usage",
                          "record_version": 1,
                          "created_at": "2026-10-01T00:00:00Z",
                          "updated_at": "2026-10-01T00:00:00Z",
                          "workspace_id": "wsp_example",
                          "billing_account_id": "billing_account_example",
                          "product": "signal",
                          "tier": "standard",
                          "source_resource_id": "biz_example",
                          "unit": "active_account_month",
                          "quantity": "1",
                          "unit_rate": "3.00",
                          "currency": "CAD",
                          "amount": "3.00",
                          "entry_type": "charge",
                          "reverses_usage_id": null,
                          "status": "posted",
                          "subject_id": "biz_example",
                          "workflow_run_id": null,
                          "application_id": null,
                          "input_manifest_id": "manifest_example",
                          "risk_snapshot_id": "rsk_baseline",
                          "monitoring_period_id": "monitoring_period_example",
                          "occurred_at": "2026-10-01T00:00:00Z",
                          "posted_at": "2026-10-01T00:00:00Z",
                          "billing_period_start": "2026-10-01T00:00:00Z",
                          "billing_period_end": "2026-11-01T00:00:00Z",
                          "rate_card_id": "billing_rate_card_example",
                          "ledger_entry_id": "ledger_signal_example",
                          "snapshot_id": "billing_snapshot_example"
                        },
                        {
                          "id": "billing_usage_example",
                          "object": "billing_usage",
                          "record_version": 1,
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "workspace_id": "wsp_example",
                          "billing_account_id": "billing_account_example",
                          "product": "insights",
                          "tier": "standard",
                          "source_resource_id": "wfr_example",
                          "unit": "completed_underwriting",
                          "quantity": "1",
                          "unit_rate": "5.00",
                          "currency": "CAD",
                          "amount": "5.00",
                          "entry_type": "charge",
                          "reverses_usage_id": null,
                          "status": "posted",
                          "subject_id": "biz_example",
                          "workflow_run_id": "wfr_example",
                          "application_id": "app_example",
                          "input_manifest_id": "manifest_example",
                          "risk_snapshot_id": "risk_snapshot_example",
                          "monitoring_period_id": null,
                          "occurred_at": "2026-10-23T14:00:00Z",
                          "posted_at": "2026-10-23T14:00:00Z",
                          "billing_period_start": "2026-10-01T00:00:00Z",
                          "billing_period_end": "2026-11-01T00:00:00Z",
                          "rate_card_id": "billing_rate_card_example",
                          "ledger_entry_id": "billing_credit_entry_example",
                          "snapshot_id": "billing_snapshot_example"
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/usage?from=2026-10-01T00%3A00%3A00Z&to=2026-11-01T00%3A00%3A00Z&time_basis=posted_at&snapshot_id=billing_snapshot_example&limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/usage?from=2026-10-01T00%3A00%3A00Z&to=2026-11-01T00%3A00%3A00Z&time_basis=posted_at&snapshot_id=billing_snapshot_example&limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/usage?from=2026-10-01T00%3A00%3A00Z&to=2026-11-01T00%3A00%3A00Z&time_basis=posted_at&snapshot_id=billing_snapshot_example&limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/usage/{id}": {
      "get": {
        "operationId": "WA004",
        "summary": "Retrieve usage record",
        "description": "Read immutable usage charges and correcting reversals. Usage records exist only for actual deductions or their corrections; unfinished work is represented by its processing resource, not a pending credit category. Order by selected time_basis then id. No customer endpoint creates charges. Cancellation stops all further deductions.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "billing_usage_example"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingUsage"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve usage record",
                    "value": {
                      "data": {
                        "id": "billing_usage_example",
                        "object": "billing_usage",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "billing_account_id": "billing_account_example",
                        "product": "insights",
                        "tier": "standard",
                        "source_resource_id": "wfr_example",
                        "unit": "completed_underwriting",
                        "quantity": "1",
                        "unit_rate": "5.00",
                        "currency": "CAD",
                        "amount": "5.00",
                        "entry_type": "charge",
                        "reverses_usage_id": null,
                        "status": "posted",
                        "subject_id": "biz_example",
                        "workflow_run_id": "wfr_example",
                        "application_id": "app_example",
                        "input_manifest_id": "manifest_example",
                        "risk_snapshot_id": "risk_snapshot_example",
                        "monitoring_period_id": null,
                        "occurred_at": "2026-10-23T14:00:00Z",
                        "posted_at": "2026-10-23T14:00:00Z",
                        "billing_period_start": "2026-10-01T00:00:00Z",
                        "billing_period_end": "2026-11-01T00:00:00Z",
                        "rate_card_id": "billing_rate_card_example",
                        "ledger_entry_id": "billing_credit_entry_example",
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/usage/billing_usage_example?snapshot_id=billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/usage/billing_usage_example?snapshot_id=billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/usage/billing_usage_example?snapshot_id=billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/consumption": {
      "get": {
        "operationId": "WA005",
        "summary": "Retrieve consumption summary",
        "description": "Aggregate posted usage and reversals at a consistent as_of snapshot. Unfinished processing is not spent credit. Product and tier remain distinct even when grouping by day or month.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "Inclusive UTC boundary. Must precede to.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-10-01T00:00:00Z"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "Exclusive UTC boundary.",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-11-01T00:00:00Z"
          },
          {
            "name": "time_basis",
            "in": "query",
            "required": true,
            "description": "Basis for selecting charges.",
            "schema": {
              "type": "string",
              "enum": [
                "occurred_at",
                "posted_at"
              ]
            },
            "example": "posted_at"
          },
          {
            "name": "group_by",
            "in": "query",
            "required": true,
            "description": "Grouping.",
            "schema": {
              "type": "string",
              "enum": [
                "product_tier",
                "day",
                "month"
              ]
            },
            "example": "product_tier"
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "description": "Product filter.",
            "schema": {
              "type": "string",
              "enum": [
                "insights",
                "signal"
              ]
            }
          },
          {
            "name": "tier",
            "in": "query",
            "required": false,
            "description": "Complexity filter.",
            "schema": {
              "type": "string",
              "enum": [
                "standard",
                "advanced",
                "complex"
              ]
            }
          },
          {
            "name": "source_resource_id",
            "in": "query",
            "required": false,
            "description": "Workflow-run ID for Insights or borrower/business ID for Signal.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rate_card_id",
            "in": "query",
            "required": false,
            "description": "Filter to an immutable rate-card version.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingConsumption"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve consumption summary",
                    "value": {
                      "data": {
                        "id": "billing_consumption_example",
                        "object": "billing_consumption",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "billing_account_id": "billing_account_example",
                        "currency": "CAD",
                        "from": "2026-10-01T00:00:00Z",
                        "to": "2026-11-01T00:00:00Z",
                        "as_of": "2026-10-23T14:00:00Z",
                        "time_basis": "posted_at",
                        "group_by": "product_tier",
                        "rows": [
                          {
                            "product": "insights",
                            "tier": "standard",
                            "bucket_start": "2026-10-01T00:00:00Z",
                            "bucket_end": "2026-11-01T00:00:00Z",
                            "quantity": "1",
                            "unit": "completed_underwriting",
                            "gross_amount": "5.00",
                            "adjustment_amount": "0.00",
                            "net_amount": "5.00"
                          },
                          {
                            "product": "signal",
                            "tier": "standard",
                            "bucket_start": "2026-10-01T00:00:00Z",
                            "bucket_end": "2026-11-01T00:00:00Z",
                            "quantity": "1",
                            "unit": "active_account_month",
                            "gross_amount": "3.00",
                            "adjustment_amount": "0.00",
                            "net_amount": "3.00"
                          }
                        ],
                        "total_net_amount": "8.00",
                        "provisional": true,
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/consumption?from=2026-10-01T00%3A00%3A00Z&to=2026-11-01T00%3A00%3A00Z&time_basis=posted_at&group_by=product_tier&snapshot_id=billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/consumption?from=2026-10-01T00%3A00%3A00Z&to=2026-11-01T00%3A00%3A00Z&time_basis=posted_at&group_by=product_tier&snapshot_id=billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/consumption?from=2026-10-01T00%3A00%3A00Z&to=2026-11-01T00%3A00%3A00Z&time_basis=posted_at&group_by=product_tier&snapshot_id=billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/reports": {
      "post": {
        "operationId": "WA006",
        "summary": "Create billing report",
        "description": "Generate a read-only snapshot export asynchronously. This does not change credits or payment settings. Dates are UTC [from,to); from must precede to. Poll until ready. CSV cells that could execute spreadsheet formulas are escaped.\n\nRequired scope: billing:export. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Stable key for this intended action; retain across retries.",
            "schema": {
              "type": "string"
            },
            "example": "idem_reporting_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:export"
        ],
        "responses": {
          "202": {
            "description": "Accepted; inspect the report status. Credit balances are unchanged.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingReport"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create billing report",
                    "value": {
                      "data": {
                        "id": "billing_report_example",
                        "object": "billing_report",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "from": "2026-10-01T00:00:00Z",
                        "to": "2026-11-01T00:00:00Z",
                        "report_type": "usage",
                        "format": "csv",
                        "time_basis": "posted_at",
                        "billing_account_id": "billing_account_example",
                        "status": "queued",
                        "as_of": "2026-10-23T14:00:00Z",
                        "row_count": null,
                        "expires_at": null,
                        "failure_code": null,
                        "snapshot_id": "billing_snapshot_example",
                        "filters": {}
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "pending"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBillingReport"
              },
              "example": {
                "from": "2026-10-01T00:00:00Z",
                "to": "2026-11-01T00:00:00Z",
                "report_type": "usage",
                "format": "csv",
                "time_basis": "posted_at",
                "snapshot_id": "billing_snapshot_example",
                "filters": {}
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/reports\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"from\": \"2026-10-01T00:00:00Z\",\n  \"to\": \"2026-11-01T00:00:00Z\",\n  \"report_type\": \"usage\",\n  \"format\": \"csv\",\n  \"time_basis\": \"posted_at\",\n  \"snapshot_id\": \"billing_snapshot_example\",\n  \"filters\": {}\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/billing/reports\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'from': '2026-10-01T00:00:00Z',\n 'to': '2026-11-01T00:00:00Z',\n 'report_type': 'usage',\n 'format': 'csv',\n 'time_basis': 'posted_at',\n 'snapshot_id': 'billing_snapshot_example',\n 'filters': {}},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/reports\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"from\": \"2026-10-01T00:00:00Z\",\n  \"to\": \"2026-11-01T00:00:00Z\",\n  \"report_type\": \"usage\",\n  \"format\": \"csv\",\n  \"time_basis\": \"posted_at\",\n  \"snapshot_id\": \"billing_snapshot_example\",\n  \"filters\": {}\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      },
      "get": {
        "operationId": "WA007",
        "summary": "List billing reports",
        "description": "Read current export-job status, its frozen financial snapshot and expiry. Job status is current, while exported data stays bound to snapshot_id. Order by created_at then id.\n\nRequired scope: billing:export. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Export-job status.",
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "processing",
                "ready",
                "failed",
                "expired"
              ]
            }
          },
          {
            "name": "report_type",
            "in": "query",
            "required": false,
            "description": "Export type.",
            "schema": {
              "type": "string",
              "enum": [
                "usage",
                "ledger",
                "statement",
                "funding"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size; default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and a stable snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:export"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingReport"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list billing reports",
                    "value": {
                      "data": [
                        {
                          "id": "billing_report_example",
                          "object": "billing_report",
                          "record_version": 1,
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "workspace_id": "wsp_example",
                          "from": "2026-10-01T00:00:00Z",
                          "to": "2026-11-01T00:00:00Z",
                          "report_type": "usage",
                          "format": "csv",
                          "time_basis": "posted_at",
                          "billing_account_id": "billing_account_example",
                          "status": "queued",
                          "as_of": "2026-10-23T14:00:00Z",
                          "row_count": null,
                          "expires_at": null,
                          "failure_code": null,
                          "snapshot_id": "billing_snapshot_example",
                          "filters": {}
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/reports?limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/reports?limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/reports?limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/reports/{id}": {
      "get": {
        "operationId": "WA008",
        "summary": "Retrieve billing report",
        "description": "Read current export-job status, its frozen financial snapshot and expiry. Job status is current, while exported data stays bound to snapshot_id. Order by created_at then id.\n\nRequired scope: billing:export. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "billing_report_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:export"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"2:billing_snapshot_example\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingReport"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve billing report",
                    "value": {
                      "data": {
                        "id": "billing_report_example",
                        "object": "billing_report",
                        "record_version": 2,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "from": "2026-10-01T00:00:00Z",
                        "to": "2026-11-01T00:00:00Z",
                        "report_type": "usage",
                        "format": "csv",
                        "time_basis": "posted_at",
                        "billing_account_id": "billing_account_example",
                        "status": "ready",
                        "as_of": "2026-10-23T14:00:00Z",
                        "row_count": 2,
                        "expires_at": "2026-11-01T14:00:00Z",
                        "failure_code": null,
                        "snapshot_id": "billing_snapshot_example",
                        "filters": {}
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/reports/billing_report_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/reports/billing_report_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/reports/billing_report_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/reports/{id}/download-link": {
      "post": {
        "operationId": "WA009",
        "summary": "Create billing report download link",
        "description": "Only ready, unexpired reports return a short-lived authorized URL. Treat the link as a secret.\n\nRequired scope: billing:export. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "billing_report_example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Stable key for this intended action; retain across retries.",
            "schema": {
              "type": "string"
            },
            "example": "idem_reporting_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:export"
        ],
        "responses": {
          "201": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_download_example\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingDownload"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic create billing report download link",
                    "value": {
                      "data": {
                        "id": "billing_download_example",
                        "object": "billing_download",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "url": "https://downloads.example.com/authorized-report",
                        "expires_at": "2026-10-23T14:05:00Z",
                        "sha256": "03642f3c7b395fbebdcd80a089c2003863354cd56b593f45ebc6cdf069c7fb5d"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BillingReportDownloadRequest"
              },
              "example": {
                "reason": "Monthly reconciliation."
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/reports/billing_report_example/download-link\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"reason\": \"Monthly reconciliation.\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/billing/reports/billing_report_example/download-link\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'reason': 'Monthly reconciliation.'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/reports/billing_report_example/download-link\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"reason\": \"Monthly reconciliation.\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/statements": {
      "get": {
        "operationId": "WA010",
        "summary": "List billing statements",
        "description": "Statements reconcile posted ledger movements and carry their own frozen snapshot_id. Final revisions are immutable; later corrections create a linked revision. Return revisions in period-start, revision, id order. Date filters match overlapping statement periods. Use report_type statement to export the exact statement snapshot and period.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Inclusive UTC boundary; provide with to.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Exclusive UTC boundary; provide with from.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Statement state.",
            "schema": {
              "type": "string",
              "enum": [
                "provisional",
                "final"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size; default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and a stable snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingStatement"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list billing statements",
                    "value": {
                      "data": [
                        {
                          "id": "billing_statement_example",
                          "object": "billing_statement",
                          "record_version": 1,
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "workspace_id": "wsp_example",
                          "from": "2026-10-01T00:00:00Z",
                          "to": "2026-11-01T00:00:00Z",
                          "billing_account_id": "billing_account_example",
                          "currency": "CAD",
                          "status": "provisional",
                          "revision": 1,
                          "supersedes_id": null,
                          "as_of": "2026-10-23T14:00:00Z",
                          "opening_balance": "12000.00",
                          "funding": "0.00",
                          "usage": "8.00",
                          "refunds": "0.00",
                          "adjustments": "0.00",
                          "closing_balance": "11992.00",
                          "ledger_sequence_from": 2,
                          "ledger_sequence_to": 3,
                          "snapshot_id": "billing_snapshot_example"
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/statements?limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/statements?limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/statements?limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/statements/{id}": {
      "get": {
        "operationId": "WA011",
        "summary": "Retrieve billing statement",
        "description": "Statements reconcile posted ledger movements and carry their own frozen snapshot_id. Final revisions are immutable; later corrections create a linked revision. Return revisions in period-start, revision, id order. Date filters match overlapping statement periods. Use report_type statement to export the exact statement snapshot and period.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "billing_statement_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingStatement"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve billing statement",
                    "value": {
                      "data": {
                        "id": "billing_statement_example",
                        "object": "billing_statement",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "from": "2026-10-01T00:00:00Z",
                        "to": "2026-11-01T00:00:00Z",
                        "billing_account_id": "billing_account_example",
                        "currency": "CAD",
                        "status": "provisional",
                        "revision": 1,
                        "supersedes_id": null,
                        "as_of": "2026-10-23T14:00:00Z",
                        "opening_balance": "12000.00",
                        "funding": "0.00",
                        "usage": "8.00",
                        "refunds": "0.00",
                        "adjustments": "0.00",
                        "closing_balance": "11992.00",
                        "ledger_sequence_from": 2,
                        "ledger_sequence_to": 3,
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/statements/billing_statement_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/statements/billing_statement_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/statements/billing_statement_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/funding": {
      "get": {
        "operationId": "WA064",
        "summary": "List funding records",
        "description": "Read annual prepayments, customer top-ups and promotional additions. Filters use initiated_at and ordering is initiated_at then id. Only settled funding adds credits; pending payments remain excluded. Invoice and receipt references are populated when issued. Payment method type is shown without bank or card credentials. Funding source is audit provenance, not a separate spending balance or consumption priority. No endpoint initiates, retries or cancels a payment.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Inclusive UTC boundary; provide with to.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Exclusive UTC boundary; provide with from.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "source",
            "in": "query",
            "required": false,
            "description": "Funding source.",
            "schema": {
              "type": "string",
              "enum": [
                "annual_prepayment",
                "customer_top_up",
                "promotional_top_up"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Funding status.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "settled",
                "failed",
                "cancelled"
              ]
            }
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size; default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and a stable snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingFunding"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list funding records",
                    "value": {
                      "data": [
                        {
                          "id": "billing_funding_example",
                          "object": "billing_funding",
                          "record_version": 1,
                          "created_at": "2026-09-30T12:00:00Z",
                          "updated_at": "2026-09-30T14:00:00Z",
                          "workspace_id": "wsp_example",
                          "billing_account_id": "billing_account_example",
                          "currency": "CAD",
                          "amount": "12000.00",
                          "source": "annual_prepayment",
                          "payment_method_type": "bank_account",
                          "status": "settled",
                          "initiated_at": "2026-09-30T12:00:00Z",
                          "settled_at": "2026-09-30T14:00:00Z",
                          "failure_code": null,
                          "invoice_reference": "invoice_example",
                          "receipt_reference": "receipt_example",
                          "ledger_entry_id": "ledger_funding_example",
                          "client_reference": "annual-prepayment",
                          "snapshot_id": "billing_snapshot_example"
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/funding?snapshot_id=billing_snapshot_example&limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/funding?snapshot_id=billing_snapshot_example&limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/funding?snapshot_id=billing_snapshot_example&limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/funding/{id}": {
      "get": {
        "operationId": "WA065",
        "summary": "Retrieve funding record",
        "description": "Read annual prepayments, customer top-ups and promotional additions. Filters use initiated_at and ordering is initiated_at then id. Only settled funding adds credits; pending payments remain excluded. Invoice and receipt references are populated when issued. Payment method type is shown without bank or card credentials. Funding source is audit provenance, not a separate spending balance or consumption priority. No endpoint initiates, retries or cancels a payment.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "billing_funding_example"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingFunding"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve funding record",
                    "value": {
                      "data": {
                        "id": "billing_funding_example",
                        "object": "billing_funding",
                        "record_version": 1,
                        "created_at": "2026-09-30T12:00:00Z",
                        "updated_at": "2026-09-30T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "billing_account_id": "billing_account_example",
                        "currency": "CAD",
                        "amount": "12000.00",
                        "source": "annual_prepayment",
                        "payment_method_type": "bank_account",
                        "status": "settled",
                        "initiated_at": "2026-09-30T12:00:00Z",
                        "settled_at": "2026-09-30T14:00:00Z",
                        "failure_code": null,
                        "invoice_reference": "invoice_example",
                        "receipt_reference": "receipt_example",
                        "ledger_entry_id": "ledger_funding_example",
                        "client_reference": "annual-prepayment",
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/funding/billing_funding_example?snapshot_id=billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/funding/billing_funding_example?snapshot_id=billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/funding/billing_funding_example?snapshot_id=billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/credits": {
      "get": {
        "operationId": "WA058",
        "summary": "Retrieve credit balance",
        "description": "Read available_credits, the single spendable balance, and spent_credits, cumulative product charges less correcting reversals since account opening. There are no reserved, held or separate posted-credit balances. Successful paid and promotional top-ups add to available credits with no consumption priority; payments still in progress are not credits. Actual product charges reduce available credits and increase spent credits atomically. Final refunds reduce available credits without increasing spent credits. The automatic top-up trigger compares available_credits with the configured threshold, at least CAD 200. Processing can continue below the trigger while funded. Cancellation immediately stops deductions; all remaining available credits are refunded at month-end closure. This endpoint is read-only.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingCreditBalance"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve credit balance",
                    "value": {
                      "data": {
                        "id": "billing_credit_balance_example",
                        "object": "billing_credit_balance",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "billing_account_id": "billing_account_example",
                        "currency": "CAD",
                        "as_of": "2026-10-23T14:00:00Z",
                        "ledger_sequence": 3,
                        "available_credits": "11992.00",
                        "spent_credits": "8.00",
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/credits?snapshot_id=billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/credits?snapshot_id=billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/credits?snapshot_id=billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/credit-ledger": {
      "get": {
        "operationId": "WA059",
        "summary": "List credit ledger entries",
        "description": "Read posted credit additions, product consumption, reconciliation adjustments and final-cancellation refunds. Entries are immutable and returned in ascending sequence order at a stable snapshot. The customer cannot create or change ledger entries. Read a statement or export for period reconciliation.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "sequence_after",
            "in": "query",
            "required": false,
            "description": "Read entries after this exclusive billing account sequence.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "Inclusive UTC boundary; provide with to.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "Exclusive UTC boundary; provide with from.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "entry_type",
            "in": "query",
            "required": false,
            "description": "Movement type.",
            "schema": {
              "type": "string",
              "enum": [
                "funding",
                "usage",
                "refund",
                "adjustment",
                "reversal"
              ]
            }
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size; default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and a stable snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingCreditEntry"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic list credit ledger entries",
                    "value": {
                      "data": [
                        {
                          "id": "ledger_funding_example",
                          "object": "billing_credit_entry",
                          "record_version": 1,
                          "created_at": "2026-09-30T14:00:00Z",
                          "updated_at": "2026-09-30T14:00:00Z",
                          "workspace_id": "wsp_example",
                          "billing_account_id": "billing_account_example",
                          "sequence": 1,
                          "currency": "CAD",
                          "amount": "12000.00",
                          "balance_after": "12000.00",
                          "entry_type": "funding",
                          "movement_id": "billing_funding_example",
                          "reverses_entry_id": null,
                          "posted_at": "2026-09-30T14:00:00Z",
                          "client_reference": "annual-prepayment",
                          "snapshot_id": "billing_snapshot_example"
                        },
                        {
                          "id": "ledger_signal_example",
                          "object": "billing_credit_entry",
                          "record_version": 1,
                          "created_at": "2026-10-01T00:00:00Z",
                          "updated_at": "2026-10-01T00:00:00Z",
                          "workspace_id": "wsp_example",
                          "billing_account_id": "billing_account_example",
                          "sequence": 2,
                          "currency": "CAD",
                          "amount": "-3.00",
                          "balance_after": "11997.00",
                          "entry_type": "usage",
                          "movement_id": "billing_usage_signal",
                          "reverses_entry_id": null,
                          "posted_at": "2026-10-01T00:00:00Z",
                          "client_reference": "signal-october",
                          "snapshot_id": "billing_snapshot_example"
                        },
                        {
                          "id": "billing_credit_entry_example",
                          "object": "billing_credit_entry",
                          "record_version": 1,
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "workspace_id": "wsp_example",
                          "billing_account_id": "billing_account_example",
                          "sequence": 3,
                          "currency": "CAD",
                          "amount": "-5.00",
                          "balance_after": "11992.00",
                          "entry_type": "usage",
                          "movement_id": "billing_usage_example",
                          "reverses_entry_id": null,
                          "posted_at": "2026-10-23T14:00:00Z",
                          "client_reference": "insights-october",
                          "snapshot_id": "billing_snapshot_example"
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/credit-ledger?snapshot_id=billing_snapshot_example&limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/credit-ledger?snapshot_id=billing_snapshot_example&limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/credit-ledger?snapshot_id=billing_snapshot_example&limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/billing/credit-ledger/{id}": {
      "get": {
        "operationId": "WA067",
        "summary": "Retrieve credit ledger entry",
        "description": "Read an immutable posted movement by ledger_entry_id from a usage or funding record. Reversals reference the original entry. Balance_after describes the full account ledger, even when a filtered list omits other movements. The selected snapshot must include the movement; otherwise return 404.\n\nRequired scope: billing:read. The API key is bound to exactly one workspace, institution and environment. There is no workspace override; this binding applies to every read and export.",
        "tags": [
          "Reporting"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource identifier.",
            "schema": {
              "type": "string"
            },
            "example": "billing_credit_entry_example"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "description": "Reuse an immutable snapshot from this workspace. Omit to use a current snapshot. Cursors bind this value; unknown snapshots return 404 and conflicting cursor parameters return 400.",
            "schema": {
              "type": "string"
            },
            "example": "billing_snapshot_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "responses": {
          "200": {
            "description": "Successful response.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              },
              "ETag": {
                "schema": {
                  "type": "string"
                },
                "example": "\"1:billing_snapshot_example\""
              },
              "X-Billing-Snapshot-ID": {
                "description": "Snapshot for this entire response and all pages. Reuse for cross-report reconciliation.",
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "example": "billing_snapshot_example"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingCreditEntry"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Synthetic retrieve credit ledger entry",
                    "value": {
                      "data": {
                        "id": "billing_credit_entry_example",
                        "object": "billing_credit_entry",
                        "record_version": 1,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "workspace_id": "wsp_example",
                        "billing_account_id": "billing_account_example",
                        "sequence": 3,
                        "currency": "CAD",
                        "amount": "-5.00",
                        "balance_after": "11992.00",
                        "entry_type": "usage",
                        "movement_id": "billing_usage_example",
                        "reverses_entry_id": null,
                        "posted_at": "2026-10-23T14:00:00Z",
                        "client_reference": "insights-october",
                        "snapshot_id": "billing_snapshot_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "412": {
            "$ref": "#/components/responses/Error412"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/billing/credit-ledger/billing_credit_entry_example?snapshot_id=billing_snapshot_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/billing/credit-ledger/billing_credit_entry_example?snapshot_id=billing_snapshot_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/billing/credit-ledger/billing_credit_entry_example?snapshot_id=billing_snapshot_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/healthcheck": {
      "get": {
        "operationId": "ST001",
        "summary": "Healthcheck",
        "description": "Public unauthenticated readiness check for the AMLOK API. HTTP 200 with status ok means the API can accept requests; HTTP 503 with status unavailable means it cannot. No borrower or tenant data is exposed. This is a point-in-time check, not confirmation that a job completed, an integration is current, or every product is operational.",
        "tags": [
          "Platform"
        ],
        "security": [],
        "x-required-scopes": [],
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/healthcheck\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/healthcheck\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nif (!baseUrl) throw new Error(\"Configure AMLOK_API_BASE_URL\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/healthcheck\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Current availability observation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Healthcheck"
                    },
                    {
                      "properties": {
                        "status": {
                          "const": "ok"
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "synthetic": {
                    "summary": "Illustrative healthy response",
                    "value": {
                      "status": "ok",
                      "timestamp": "2026-10-23T14:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "description": "API is not ready to accept requests.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Healthcheck"
                    },
                    {
                      "properties": {
                        "status": {
                          "const": "unavailable"
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "unavailable": {
                    "value": {
                      "status": "unavailable",
                      "timestamp": "2026-10-23T14:00:00Z"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/service-status": {
      "get": {
        "operationId": "ST002",
        "summary": "Service status",
        "description": "Public unauthenticated summary of AMLOK service availability. A successful HTTP 200 means the status report was retrieved; inspect the overall and per-service status to understand availability. unknown means a current state cannot be confirmed and must not be treated as operational. updated_at identifies the observation time; do not treat stale or unreachable status as healthy. Provider-specific freshness and account connection errors are separate from AMLOK service availability. This response contains no internal infrastructure identifiers or customer data.",
        "tags": [
          "Platform"
        ],
        "security": [],
        "x-required-scopes": [],
        "parameters": [],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/service-status\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/service-status\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nif (!baseUrl) throw new Error(\"Configure AMLOK_API_BASE_URL\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/service-status\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Current availability observation.",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                },
                "example": "no-store"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceStatus"
                },
                "examples": {
                  "synthetic": {
                    "summary": "Illustrative healthy response",
                    "value": {
                      "status": "operational",
                      "updated_at": "2026-10-23T14:00:00Z",
                      "services": [
                        {
                          "id": "api",
                          "name": "API",
                          "status": "operational",
                          "updated_at": "2026-10-23T14:00:00Z"
                        },
                        {
                          "id": "insights",
                          "name": "AMLOK Insights",
                          "status": "operational",
                          "updated_at": "2026-10-23T14:00:00Z"
                        },
                        {
                          "id": "signal",
                          "name": "AMLOK Signal",
                          "status": "operational",
                          "updated_at": "2026-10-23T14:00:00Z"
                        },
                        {
                          "id": "connections",
                          "name": "Data connections",
                          "status": "operational",
                          "updated_at": "2026-10-23T14:00:00Z"
                        },
                        {
                          "id": "webhooks",
                          "name": "Webhook delivery",
                          "status": "operational",
                          "updated_at": "2026-10-23T14:00:00Z"
                        },
                        {
                          "id": "reporting",
                          "name": "Reporting",
                          "status": "operational",
                          "updated_at": "2026-10-23T14:00:00Z"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/input-manifests": {
      "get": {
        "operationId": "BM001",
        "summary": "List input manifests",
        "description": "Read an immutable evidence manifest prepared by AMLOK from synchronized, borrower-permissioned records. window_start is inclusive and window_end exclusive. record_count covers the frozen input set; sha256 identifies its content. Manifest reads do not expose payment controls or create a charge. Use the ready manifest id as input_manifest_id when calculating attributes for the same subject and a window contained within the manifest. Superseded or revoked manifests cannot authorize new calculations. The API key identifies exactly one workspace, institution and environment. All linked resources must belong to that workspace and subject; caller-supplied workspace selectors cannot override authorization.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "subject_id",
            "in": "query",
            "required": true,
            "description": "Required authorized borrower/business in the key-bound workspace.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Lifecycle filter. Use ready for new calculations or monitor creation.",
            "schema": {
              "type": "string",
              "enum": [
                "ready",
                "superseded",
                "revoked"
              ]
            },
            "example": "ready"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size; default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/input-manifests?subject_id=biz_example&status=ready&limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/input-manifests?subject_id=biz_example&status=ready&limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/input-manifests?subject_id=biz_example&status=ready&limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized baseline metadata. An empty list means no matching baseline is available.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InputManifest"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "workspace_id": "wsp_example",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-01T00:00:00Z",
                          "updated_at": "2026-10-01T00:00:00Z",
                          "record_version": 1,
                          "status": "ready",
                          "id": "manifest_example",
                          "object": "input_manifest",
                          "window_start": "2025-10-01",
                          "window_end": "2026-10-01",
                          "record_count": 2,
                          "source_connection_ids": [
                            "cnn_example"
                          ],
                          "sha256": "29cabb88c51d1639c6fd0d5d98bdadd5353812a85df8ed7b735f69d16881abc9"
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/input-manifests/{id}": {
      "get": {
        "operationId": "BM002",
        "summary": "Retrieve input manifest",
        "description": "Read an immutable evidence manifest prepared by AMLOK from synchronized, borrower-permissioned records. window_start is inclusive and window_end exclusive. record_count covers the frozen input set; sha256 identifies its content. Manifest reads do not expose payment controls or create a charge. Use the ready manifest id as input_manifest_id when calculating attributes for the same subject and a window contained within the manifest. Superseded or revoked manifests cannot authorize new calculations. The API key identifies exactly one workspace, institution and environment. All linked resources must belong to that workspace and subject; caller-supplied workspace selectors cannot override authorization.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identifier in the authorized workspace.",
            "schema": {
              "type": "string"
            },
            "example": "manifest_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/input-manifests/manifest_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/input-manifests/manifest_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/input-manifests/manifest_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized baseline metadata. An empty list means no matching baseline is available.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/InputManifest"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "workspace_id": "wsp_example",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-01T00:00:00Z",
                        "updated_at": "2026-10-01T00:00:00Z",
                        "record_version": 1,
                        "status": "ready",
                        "id": "manifest_example",
                        "object": "input_manifest",
                        "window_start": "2025-10-01",
                        "window_end": "2026-10-01",
                        "record_count": 2,
                        "source_connection_ids": [
                          "cnn_example"
                        ],
                        "sha256": "29cabb88c51d1639c6fd0d5d98bdadd5353812a85df8ed7b735f69d16881abc9"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/monitoring-baselines": {
      "get": {
        "operationId": "BB001",
        "summary": "List monitoring baselines",
        "description": "Read an approved monitoring baseline prepared by AMLOK from a completed assessment or the agreed existing-portfolio onboarding process. Use its snapshot_id, not the baseline record id, as baseline_snapshot_id when creating a monitor. Retrieve that risk snapshot for the baseline evidence and attributes. Only ready baselines for the same subject and workspace can initialize a monitor. This read does not launch or charge an Insights underwriting. Signal change-driven reassessment remains included in Signal. The API key identifies exactly one workspace, institution and environment. All linked resources must belong to that workspace and subject; caller-supplied workspace selectors cannot override authorization.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "subject_id",
            "in": "query",
            "required": true,
            "description": "Required authorized borrower/business in the key-bound workspace.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Lifecycle filter. Use ready for new calculations or monitor creation.",
            "schema": {
              "type": "string",
              "enum": [
                "ready",
                "superseded",
                "revoked"
              ]
            },
            "example": "ready"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size; default 100, maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "monitoring:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/monitoring-baselines?subject_id=biz_example&status=ready&limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/monitoring-baselines?subject_id=biz_example&status=ready&limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/monitoring-baselines?subject_id=biz_example&status=ready&limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized baseline metadata. An empty list means no matching baseline is available.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MonitoringBaseline"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "workspace_id": "wsp_example",
                          "subject_id": "biz_example",
                          "created_at": "2026-10-01T00:00:00Z",
                          "updated_at": "2026-10-01T00:00:00Z",
                          "record_version": 1,
                          "status": "ready",
                          "id": "baseline_example",
                          "object": "monitoring_baseline",
                          "snapshot_id": "rsk_baseline",
                          "input_manifest_id": "manifest_example",
                          "approved_at": "2026-10-01T00:00:00Z"
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/monitoring-baselines/{id}": {
      "get": {
        "operationId": "BB002",
        "summary": "Retrieve monitoring baseline",
        "description": "Read an approved monitoring baseline prepared by AMLOK from a completed assessment or the agreed existing-portfolio onboarding process. Use its snapshot_id, not the baseline record id, as baseline_snapshot_id when creating a monitor. Retrieve that risk snapshot for the baseline evidence and attributes. Only ready baselines for the same subject and workspace can initialize a monitor. This read does not launch or charge an Insights underwriting. Signal change-driven reassessment remains included in Signal. The API key identifies exactly one workspace, institution and environment. All linked resources must belong to that workspace and subject; caller-supplied workspace selectors cannot override authorization.",
        "tags": [
          "Risk"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Identifier in the authorized workspace.",
            "schema": {
              "type": "string"
            },
            "example": "baseline_example"
          }
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "monitoring:read"
        ],
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/monitoring-baselines/baseline_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/monitoring-baselines/baseline_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/monitoring-baselines/baseline_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized baseline metadata. An empty list means no matching baseline is available.",
            "headers": {
              "X-Request-ID": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonitoringBaseline"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "workspace_id": "wsp_example",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-01T00:00:00Z",
                        "updated_at": "2026-10-01T00:00:00Z",
                        "record_version": 1,
                        "status": "ready",
                        "id": "baseline_example",
                        "object": "monitoring_baseline",
                        "snapshot_id": "rsk_baseline",
                        "input_manifest_id": "manifest_example",
                        "approved_at": "2026-10-01T00:00:00Z"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/workloads": {
      "get": {
        "operationId": "EN001",
        "summary": "List workload reports",
        "description": "Read measured workload against the agreed limits. At a limit, work already within scope can continue; the next operation that would exceed any dimension is rejected or blocked before excess records are processed. Counts across monitors are deduplicated by subject, source record ID and source version during the month. No automatic repricing, mixed-tier limits or extra usage charge occurs. AMLOK must approve an amended rate card before blocked work resumes. Whole-underwriting counts include the complete evidence history; Signal counts only new processed record versions in the UTC calendar month. Counters and limit checks are atomic across concurrent work. as_of and the cursor freeze a read snapshot; a new first-page read gets current progress.",
        "tags": [
          "Reporting"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "parameters": [
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Authorized borrower/business.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "description": "Product filter.",
            "schema": {
              "type": "string",
              "enum": [
                "insights",
                "signal"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque continuation bound to the original filters and snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WorkloadReport"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "id": "workload_example",
                          "object": "workload",
                          "workspace_id": "wsp_example",
                          "subject_id": "biz_example",
                          "product": "insights",
                          "workflow_run_id": "wfr_example",
                          "monitoring_period_id": null,
                          "rate_card_id": "billing_rate_card_example",
                          "tier": "standard",
                          "as_of": "2026-10-23T14:00:00Z",
                          "period_start": "2025-10-01T00:00:00Z",
                          "period_end": "2026-10-01T00:00:00Z",
                          "record_counting_basis": "per_underwriting",
                          "bank_accounts": {
                            "used": 2,
                            "limit": 2,
                            "remaining": 0
                          },
                          "business_integrations": {
                            "used": 5,
                            "limit": 5,
                            "remaining": 0
                          },
                          "records": {
                            "used": 2,
                            "limit": 75000,
                            "remaining": 74998
                          },
                          "status": "at_limit",
                          "blocking_dimensions": [],
                          "analysis_scope": "Routine reconciliation and standard analysis",
                          "input_manifest_id": "manifest_example"
                        },
                        {
                          "id": "workload_signal_example",
                          "object": "workload",
                          "workspace_id": "wsp_example",
                          "subject_id": "biz_example",
                          "product": "signal",
                          "workflow_run_id": null,
                          "monitoring_period_id": "monitoring_period_example",
                          "rate_card_id": "billing_rate_card_example",
                          "tier": "standard",
                          "as_of": "2026-10-23T14:00:00Z",
                          "period_start": "2026-10-01T00:00:00Z",
                          "period_end": "2026-11-01T00:00:00Z",
                          "record_counting_basis": "new_records_per_month",
                          "bank_accounts": {
                            "used": 2,
                            "limit": 2,
                            "remaining": 0
                          },
                          "business_integrations": {
                            "used": 5,
                            "limit": 5,
                            "remaining": 0
                          },
                          "records": {
                            "used": 50,
                            "limit": 75000,
                            "remaining": 74950
                          },
                          "status": "at_limit",
                          "blocking_dimensions": [],
                          "analysis_scope": "Routine reconciliation and standard analysis",
                          "input_manifest_id": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/workloads?subject_id=biz_example&limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/workloads?subject_id=biz_example&limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/workloads?subject_id=biz_example&limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/workloads/{id}": {
      "get": {
        "operationId": "EN002",
        "summary": "Retrieve workload report",
        "description": "Read measured workload against the agreed limits. At a limit, work already within scope can continue; the next operation that would exceed any dimension is rejected or blocked before excess records are processed. Counts across monitors are deduplicated by subject, source record ID and source version during the month. No automatic repricing, mixed-tier limits or extra usage charge occurs. AMLOK must approve an amended rate card before blocked work resumes. Whole-underwriting counts include the complete evidence history; Signal counts only new processed record versions in the UTC calendar month. Counters and limit checks are atomic across concurrent work. as_of and the cursor freeze a read snapshot; a new first-page read gets current progress.",
        "tags": [
          "Reporting"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "billing:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource ID in this workspace.",
            "schema": {
              "type": "string"
            },
            "example": "workload_example"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkloadReport"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "workload_example",
                        "object": "workload",
                        "workspace_id": "wsp_example",
                        "subject_id": "biz_example",
                        "product": "insights",
                        "workflow_run_id": "wfr_example",
                        "monitoring_period_id": null,
                        "rate_card_id": "billing_rate_card_example",
                        "tier": "standard",
                        "as_of": "2026-10-23T14:00:00Z",
                        "period_start": "2025-10-01T00:00:00Z",
                        "period_end": "2026-10-01T00:00:00Z",
                        "record_counting_basis": "per_underwriting",
                        "bank_accounts": {
                          "used": 2,
                          "limit": 2,
                          "remaining": 0
                        },
                        "business_integrations": {
                          "used": 5,
                          "limit": 5,
                          "remaining": 0
                        },
                        "records": {
                          "used": 2,
                          "limit": 75000,
                          "remaining": 74998
                        },
                        "status": "at_limit",
                        "blocking_dimensions": [],
                        "analysis_scope": "Routine reconciliation and standard analysis",
                        "input_manifest_id": "manifest_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/workloads/workload_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/workloads/workload_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/workloads/workload_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/monitoring-periods": {
      "get": {
        "operationId": "EN003",
        "summary": "List monitoring periods",
        "description": "Signal charges the full agreed monthly rate once per borrower/business/workspace at 00:00 UTC on the first day of the month, before monitoring proceeds. First activation during a month charges the full monthly rate immediately, without proration; the next charge is at the next month boundary. Repeated monitor creation, pauses, resumes, checks and reassessments do not add charges in an already paid period. Insufficient credits block monitoring without a debit or debt; funding resumes only the current period after its single successful charge, without charging missed inactive months. User-paused monitoring remains paused until the user resumes it. Account cancellation stops processing and all further deductions immediately. Read one shared record per subject/month, including its charge and workload references. Periods are immutable in identity; current status and charged_at reflect activation. API reads never create a charge.",
        "tags": [
          "Risk"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "monitoring:read"
        ],
        "parameters": [
          {
            "name": "subject_id",
            "in": "query",
            "required": false,
            "description": "Authorized borrower/business.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "period_start",
            "in": "query",
            "required": false,
            "description": "Inclusive UTC period-start boundary.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "period_end",
            "in": "query",
            "required": false,
            "description": "Exclusive UTC period-start boundary.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque continuation bound to the original filters and snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MonitoringPeriod"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "id": "monitoring_period_example",
                          "object": "monitoring_period",
                          "workspace_id": "wsp_example",
                          "subject_id": "biz_example",
                          "period_start": "2026-10-01T00:00:00Z",
                          "period_end": "2026-11-01T00:00:00Z",
                          "first_activated_at": "2026-10-01T00:00:00Z",
                          "charged_at": "2026-10-01T00:00:00Z",
                          "billing_usage_id": "billing_usage_signal",
                          "status": "active",
                          "workload_id": "workload_signal_example",
                          "baseline_snapshot_id": "rsk_baseline",
                          "rate_card_id": "billing_rate_card_example",
                          "tier": "standard",
                          "blocked_reason": null
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/monitoring-periods?subject_id=biz_example&limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/monitoring-periods?subject_id=biz_example&limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/monitoring-periods?subject_id=biz_example&limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/monitoring-periods/{id}": {
      "get": {
        "operationId": "EN004",
        "summary": "Retrieve monitoring period",
        "description": "Signal charges the full agreed monthly rate once per borrower/business/workspace at 00:00 UTC on the first day of the month, before monitoring proceeds. First activation during a month charges the full monthly rate immediately, without proration; the next charge is at the next month boundary. Repeated monitor creation, pauses, resumes, checks and reassessments do not add charges in an already paid period. Insufficient credits block monitoring without a debit or debt; funding resumes only the current period after its single successful charge, without charging missed inactive months. User-paused monitoring remains paused until the user resumes it. Account cancellation stops processing and all further deductions immediately.",
        "tags": [
          "Risk"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "monitoring:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource ID in this workspace.",
            "schema": {
              "type": "string"
            },
            "example": "monitoring_period_example"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonitoringPeriod"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "monitoring_period_example",
                        "object": "monitoring_period",
                        "workspace_id": "wsp_example",
                        "subject_id": "biz_example",
                        "period_start": "2026-10-01T00:00:00Z",
                        "period_end": "2026-11-01T00:00:00Z",
                        "first_activated_at": "2026-10-01T00:00:00Z",
                        "charged_at": "2026-10-01T00:00:00Z",
                        "billing_usage_id": "billing_usage_signal",
                        "status": "active",
                        "workload_id": "workload_signal_example",
                        "baseline_snapshot_id": "rsk_baseline",
                        "rate_card_id": "billing_rate_card_example",
                        "tier": "standard",
                        "blocked_reason": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/monitoring-periods/monitoring_period_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/monitoring-periods/monitoring_period_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/monitoring-periods/monitoring_period_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/input-manifests/{id}/entries": {
      "get": {
        "operationId": "EN005",
        "summary": "List input manifest entries",
        "description": "Read the frozen source and normalized record-version references for an immutable input manifest. The path ID is the manifest ID. Order by resource_type, resource_id, resource_version; cursors remain bound to the same manifest. The record_count equals the complete entry count, including separately analyzed line items. Download the actual frozen normalized evidence through the record endpoint using manifest_id; raw documents use the document download route with the same manifest_id. Hash canonicalization is specified on InputManifest.sha256. Missing authorization returns 403; unavailable or deleted evidence returns 404 rather than substituting a newer record.",
        "tags": [
          "Risk"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized resource ID in this workspace.",
            "schema": {
              "type": "string"
            },
            "example": "manifest_example"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200
            },
            "example": 100
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque continuation bound to the original filters and snapshot.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ManifestEntry"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "resource_type": "application",
                          "resource_id": "app_example",
                          "resource_version": 1,
                          "source_record_id": "client-application-example",
                          "source_version": "1",
                          "content_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                        },
                        {
                          "resource_type": "document",
                          "resource_id": "doc_example",
                          "resource_version": 1,
                          "source_record_id": "client-document-example",
                          "source_version": "1",
                          "content_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
                        }
                      ],
                      "page": {
                        "next_cursor": null,
                        "has_more": false,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/input-manifests/manifest_example/entries?limit=100\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/input-manifests/manifest_example/entries?limit=100\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/input-manifests/manifest_example/entries?limit=100\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/sync-checkpoints": {
      "post": {
        "operationId": "EN006",
        "summary": "Create synchronization checkpoint",
        "description": "Create a read-only synchronization boundary. This does not synchronize a provider, process a product or spend credits. Read each requested collection with snapshot_id equal to this checkpoint ID, then consume /v1/changes from resume_cursor. Both refer to the same as_of boundary, preventing a bootstrap gap. Snapshots and resume cursors remain valid until their explicit expires_at. Reject unentitled types. Workspace deletion revokes checkpoints. Checkpoint creation remains available while read-only reporting access remains active. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Platform"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "platform:read"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Stable key for one intended request. Reuse on retries.",
            "schema": {
              "type": "string"
            },
            "example": "idem_enterprise_example"
          }
        ],
        "responses": {
          "201": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SyncCheckpoint"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "checkpoint_example",
                        "object": "sync_checkpoint",
                        "workspace_id": "wsp_example",
                        "as_of": "2026-10-23T14:00:00Z",
                        "expires_at": "2026-11-01T14:00:00Z",
                        "resource_types": [
                          "bank_transaction",
                          "lien"
                        ],
                        "resume_cursor": "changes_after_checkpoint_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSyncCheckpoint"
              },
              "example": {
                "resource_types": [
                  "bank_transaction",
                  "lien"
                ]
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/sync-checkpoints\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"resource_types\": [\n    \"bank_transaction\",\n    \"lien\"\n  ]\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/sync-checkpoints\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'resource_types': ['bank_transaction', 'lien']},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/sync-checkpoints\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"resource_types\": [\n    \"bank_transaction\",\n    \"lien\"\n  ]\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/connections/{id}/authorization": {
      "post": {
        "operationId": "IR001",
        "summary": "Renew connection authorization",
        "description": "Create a fresh short-lived authorization action on the existing pending, active or reauth_required connection. Preserve its ID, records and synchronization lineage. The consent must authorize the same subject, provider products and purposes. Validate redirect_uri against portal registration. Bind state to this connection and action; echo it on return. A new action invalidates any older unused action. An identical idempotent retry returns the same action, including its original expiry; use a new key when intentionally replacing an expired action. Reauthorization does not backfill data until a successful sync. Revoked or disconnected connections cannot be reopened; obtain new consent and create a new connection. Account cancellation rejects new processing immediately with 409 invalid_state. Read-only access lasts only until workspace deletion. No separate product charge or financial mutation is introduced. Browser return parameters are connection_id, state and result (completed, cancelled or failed); failed returns a sanitized error_code. Verify the saved state and expected connection, then retrieve the connection server-side. The callback never proves consent or connection activation. No credentials or source data appear in return parameters. The state must be unpredictable, bound to the initiating browser session and accepted only once. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Platform"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "connections:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized identifier in this workspace.",
            "schema": {
              "type": "string"
            },
            "example": "connection_example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Stable key for this intended action; retain across retries.",
            "schema": {
              "type": "string"
            },
            "example": "idem_integration_example"
          }
        ],
        "responses": {
          "201": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    },
                    "action": {
                      "$ref": "#/components/schemas/Action"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "action"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "connection_example",
                        "object": "connection",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "partial",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "client_reference": "app-1029",
                        "provider_id": "BANK-02",
                        "provider_tenant_id": "item_example",
                        "status": "active",
                        "institution_id": "ins_example",
                        "institution_name": "Example Bank",
                        "country": "CA",
                        "products": [
                          "transactions",
                          "balance"
                        ],
                        "scopes": [
                          "banking:read"
                        ],
                        "consent_id": "con_01JAMLOK",
                        "last_successful_sync_at": null,
                        "next_refresh_at": null,
                        "history_available_from": "2025-10-22",
                        "reauth_required_at": null,
                        "error_code": "reauth_required",
                        "sync_cursor": "cur_example"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      },
                      "action": {
                        "type": "redirect",
                        "url": "https://authorize.example.com/session/synthetic",
                        "expires_at": "2026-10-23T14:15:00Z"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthorizationRequest"
              },
              "example": {
                "consent_id": "con_example",
                "redirect_uri": "https://client.example.com/connected",
                "state": "synthetic-random-state-at-least-32-characters"
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/connections/connection_example/authorization\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"consent_id\": \"con_example\",\n  \"redirect_uri\": \"https://client.example.com/connected\",\n  \"state\": \"synthetic-random-state-at-least-32-characters\"\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/connections/connection_example/authorization\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'consent_id': 'con_example',\n 'redirect_uri': 'https://client.example.com/connected',\n 'state': 'synthetic-random-state-at-least-32-characters'},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/connections/connection_example/authorization\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"consent_id\": \"con_example\",\n  \"redirect_uri\": \"https://client.example.com/connected\",\n  \"state\": \"synthetic-random-state-at-least-32-characters\"\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/subject-associations": {
      "post": {
        "operationId": "IR002",
        "summary": "Create subject association",
        "description": "Associate an existing person with a business in this workspace using permitted evidence and recorded authorization. This is a client-declared association, not a verified legal ownership determination. AMLOK validates subject ownership, the authorization and supporting evidence; status becomes active automatically when checks pass, or remains pending for platform review. Rejected records expose reason_code. An active association authorizes only related-person verification within an agreed parent product workflow. It does not grant broader data access. Canonical verified relationships remain read-only evidence. Review, corrections and revocation occur in the portal; create a new association for corrected evidence. Completed assessments retain their historical association version. Account cancellation rejects new processing immediately with 409 invalid_state. Read-only access lasts only until workspace deletion. No separate product charge or financial mutation is introduced. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Identity"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Stable key for this intended action; retain across retries.",
            "schema": {
              "type": "string"
            },
            "example": "idem_integration_example"
          }
        ],
        "responses": {
          "201": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubjectAssociation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "assoc_example",
                        "object": "subject_association",
                        "business_id": "biz_example",
                        "person_id": "per_example",
                        "role": "beneficial_owner",
                        "status": "pending",
                        "evidence_document_ids": [
                          "doc_example"
                        ],
                        "relationship_id": null,
                        "reason_code": null,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 1
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubjectAssociationRequest"
              },
              "example": {
                "business_id": "biz_example",
                "person_id": "per_example",
                "role": "beneficial_owner",
                "evidence_document_ids": [
                  "doc_example"
                ]
              }
            }
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/subject-associations\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001' \\\n  --header 'Content-Type: application/json' \\\n  --data '{\n  \"business_id\": \"biz_example\",\n  \"person_id\": \"per_example\",\n  \"role\": \"beneficial_owner\",\n  \"evidence_document_ids\": [\n    \"doc_example\"\n  ]\n}'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001',\n 'Content-Type': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/subject-associations\",\n    headers=headers, timeout=30, allow_redirects=False,\n    json={'business_id': 'biz_example',\n 'person_id': 'per_example',\n 'role': 'beneficial_owner',\n 'evidence_document_ids': ['doc_example']},\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\",\n  \"Content-Type\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/subject-associations\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n  body: JSON.stringify({\n  \"business_id\": \"biz_example\",\n  \"person_id\": \"per_example\",\n  \"role\": \"beneficial_owner\",\n  \"evidence_document_ids\": [\n    \"doc_example\"\n  ]\n}),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      },
      "get": {
        "operationId": "IR003",
        "summary": "List subject associations",
        "description": "Associate an existing person with a business in this workspace using permitted evidence and recorded authorization. This is a client-declared association, not a verified legal ownership determination. AMLOK validates subject ownership, the authorization and supporting evidence; status becomes active automatically when checks pass, or remains pending for platform review. Rejected records expose reason_code. An active association authorizes only related-person verification within an agreed parent product workflow. It does not grant broader data access. Canonical verified relationships remain read-only evidence. Review, corrections and revocation occur in the portal; create a new association for corrected evidence. Completed assessments retain their historical association version.",
        "tags": [
          "Identity"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and the first page snapshot. Do not change filters during pagination.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "business_id",
            "in": "query",
            "required": false,
            "description": "Filter primary business.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "person_id",
            "in": "query",
            "required": false,
            "description": "Filter related person.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Association status.",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "active",
                "rejected",
                "revoked"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SubjectAssociation"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "id": "assoc_example",
                          "object": "subject_association",
                          "business_id": "biz_example",
                          "person_id": "per_example",
                          "role": "beneficial_owner",
                          "status": "active",
                          "evidence_document_ids": [
                            "doc_example"
                          ],
                          "relationship_id": null,
                          "reason_code": null,
                          "created_at": "2026-10-23T14:00:00Z",
                          "updated_at": "2026-10-23T14:00:00Z",
                          "record_version": 2
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/subject-associations\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/subject-associations\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/subject-associations\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/subject-associations/{id}": {
      "get": {
        "operationId": "IR004",
        "summary": "Retrieve subject association",
        "description": "Associate an existing person with a business in this workspace using permitted evidence and recorded authorization. This is a client-declared association, not a verified legal ownership determination. AMLOK validates subject ownership, the authorization and supporting evidence; status becomes active automatically when checks pass, or remains pending for platform review. Rejected records expose reason_code. An active association authorizes only related-person verification within an agreed parent product workflow. It does not grant broader data access. Canonical verified relationships remain read-only evidence. Review, corrections and revocation occur in the portal; create a new association for corrected evidence. Completed assessments retain their historical association version.",
        "tags": [
          "Identity"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "identity:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized identifier in this workspace.",
            "schema": {
              "type": "string"
            },
            "example": "assoc_example"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubjectAssociation"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "assoc_example",
                        "object": "subject_association",
                        "business_id": "biz_example",
                        "person_id": "per_example",
                        "role": "beneficial_owner",
                        "status": "active",
                        "evidence_document_ids": [
                          "doc_example"
                        ],
                        "relationship_id": null,
                        "reason_code": null,
                        "created_at": "2026-10-23T14:00:00Z",
                        "updated_at": "2026-10-23T14:00:00Z",
                        "record_version": 2
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/subject-associations/assoc_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/subject-associations/assoc_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/subject-associations/assoc_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/workflow-runs/{id}/retry": {
      "post": {
        "operationId": "IR005",
        "summary": "Retry failed workflow",
        "description": "Retry an existing failed run only when failure.retryable is true and recovery_action is retry_same_run. Retain run identity, application, product context, evidence and the one eventual charge. Increment attempt once per accepted retry and append an audit event; replaying this idempotency key cannot increment it again. Revalidate active consent, parent context, association and workload. Respect retry_after_seconds. Non-retryable, completed, cancelled or already-running runs return 409 invalid_state; concurrent retries can start only one attempt. Unfunded accepted work uses waiting_for_credits, not a replacement run. For non-retryable invalid evidence, correct requirements or contact support as failure.recovery_action directs; do not invent a replacement billable operation. Account cancellation rejects new processing immediately with 409 invalid_state. Read-only access lasts only until workspace deletion. No separate product charge or financial mutation is introduced. Accepted commands have a durable request receipt. Full response replay lasts 24 hours; afterward the same key and target return 409 idempotency_result_expired without re-execution. Different payloads return 409 idempotency_conflict. Use GET /v1/request-receipts/lookup to find the original resource. The fingerprint includes the resolved target path and intended payload; a key used on another target is rejected rather than replayed onto it. Pre-execution validation or insufficient-credit rejection creates no accepted receipt.",
        "tags": [
          "Operations"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "workflows:execute"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized identifier in this workspace.",
            "schema": {
              "type": "string"
            },
            "example": "wfr_example"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Stable key for this intended action; retain across retries.",
            "schema": {
              "type": "string"
            },
            "example": "idem_integration_example"
          }
        ],
        "responses": {
          "202": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WorkflowRun"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "wfr_example",
                        "object": "workflow_run",
                        "subject_id": "biz_example",
                        "created_at": "2026-10-22T13:00:00Z",
                        "updated_at": "2026-10-22T14:00:00Z",
                        "record_version": 1,
                        "source_refs": [],
                        "data_status": "pending",
                        "missing_fields": [],
                        "schema_version": "1.4.2",
                        "workflow_type": "underwrite",
                        "workflow_version": "underwrite-v1",
                        "status": "queued",
                        "input_resource_ids": [
                          "app_example",
                          "doc_example"
                        ],
                        "output_resource_ids": [],
                        "product": "insights",
                        "input_manifest_id": "manifest_example",
                        "initial_input_manifest_id": "manifest_example",
                        "workload_id": "workload_example",
                        "billing_usage_id": null,
                        "monitoring_period_id": null,
                        "blocked_reason": null,
                        "stop_reason": null,
                        "failure": null,
                        "attempt": 2,
                        "completed_at": null
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request POST --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/workflow-runs/wfr_example/retry\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_example_1001'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_example_1001'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"POST\", base_url + \"/v1/workflow-runs/wfr_example/retry\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_example_1001\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/workflow-runs/wfr_example/retry\", {\n  method: \"POST\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/request-receipts/lookup": {
      "get": {
        "operationId": "IR006",
        "summary": "Look up request receipt",
        "description": "Find an accepted POST after losing its response, including after the 24-hour full-response replay window. Supply the original Idempotency-Key header, operation_id and exact resolved target_path (no origin or query). The same workspace, environment and original operation scopes are required; key rotation does not break lookup. Receipts are created atomically before acknowledging an accepted command and retained until workspace deletion, including after a linked resource expires. resource_unavailable retains its identity but does not authorize rerunning it. Store a non-reversible key digest, not the raw key. A 404 is not proof that an in-flight request never arrived; within 24 hours retry the same key, afterward contact support with the caller correlation ID before any new submission. This endpoint neither executes nor replays work. resource_path identifies an authorized relative GET route and requires its read scope. For a short-lived document or report link, it identifies the document or report parent, never the signed URL. An expired link can be intentionally regenerated with a new key without paid processing. Webhook replay receipts identify the original webhook event; match delivery replay_request_id to receipt.request_id. A lost create-webhook response cannot reveal its one-time secret through lookup; rotate it in the portal.",
        "tags": [
          "Platform"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "platform:read"
        ],
        "parameters": [
          {
            "name": "operation_id",
            "in": "query",
            "required": true,
            "description": "Original OpenAPI operationId.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "target_path",
            "in": "query",
            "required": true,
            "description": "Exact resolved request path, for example /v1/connections/cnn_example/sync.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "Original key being looked up. This GET does not create a command.",
            "schema": {
              "type": "string"
            },
            "example": "idem_underwrite_example"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RequestReceipt"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "rcpt_example",
                        "object": "request_receipt",
                        "operation_id": "EP147",
                        "target_path": "/v1/workflow-runs",
                        "request_id": "req_example",
                        "status": "accepted",
                        "resource_type": "workflow_run",
                        "resource_id": "wfr_example",
                        "resource_path": "/v1/workflow-runs/wfr_example",
                        "original_http_status": 202,
                        "accepted_at": "2026-10-23T14:00:00Z",
                        "replay_expires_at": "2026-10-24T14:00:00Z"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/request-receipts/lookup?operation_id=EP147&target_path=%2Fv1%2Fworkflow-runs\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\" \\\n  --header 'Idempotency-Key: idem_underwrite_example'"
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json',\n 'Idempotency-Key': 'idem_underwrite_example'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/request-receipts/lookup?operation_id=EP147&target_path=%2Fv1%2Fworkflow-runs\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\",\n  \"Idempotency-Key\": \"idem_underwrite_example\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/request-receipts/lookup?operation_id=EP147&target_path=%2Fv1%2Fworkflow-runs\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/configuration": {
      "get": {
        "operationId": "IR007",
        "summary": "Retrieve environment configuration",
        "description": "Read accepted identifiers and actual operational limits for the key-bound workspace and environment. Numbers in saved examples are synthetic, not production defaults or SLA promises. Use workflow_versions[].id as workflow_version, rulesets[].id as ruleset_version and cadences[].id as cadence. Resource and attribute selection must be allowed by that ruleset. GET /v1/providers supplies enabled product IDs and resource mappings. Rates and workload limits remain in read-only billing rate cards and workload reports. Cache by revision and refresh on configuration-related 422 errors or before adopting a new workflow. Changes to configured limits or identifiers are communicated through the account manager before taking effect under the agreement; in-flight work retains its accepted workflow revision.",
        "tags": [
          "Platform"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "platform:read"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EnvironmentConfiguration"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "config_example",
                        "object": "environment_configuration",
                        "workspace_id": "wsp_example",
                        "environment": "sandbox",
                        "revision": "cfg_example",
                        "effective_at": "2026-10-23T14:00:00Z",
                        "workflow_versions": [
                          {
                            "id": "underwrite-v1",
                            "workflow_type": "underwrite",
                            "products": [
                              "insights"
                            ],
                            "verification_types": []
                          },
                          {
                            "id": "kyc-ca-v1",
                            "workflow_type": "verify",
                            "products": [
                              "insights",
                              "signal"
                            ],
                            "verification_types": [
                              "kyc"
                            ]
                          },
                          {
                            "id": "kyb-ca-v1",
                            "workflow_type": "verify",
                            "products": [
                              "insights",
                              "signal"
                            ],
                            "verification_types": [
                              "kyb"
                            ]
                          }
                        ],
                        "rulesets": [
                          {
                            "id": "monitoring-v1",
                            "attribute_keys": [
                              "cash_flow.net_monthly"
                            ],
                            "resource_types": [
                              "bank_transaction"
                            ]
                          }
                        ],
                        "cadences": [
                          {
                            "id": "daily",
                            "description": "Daily AMLOK evaluation subject to actual provider freshness and permission."
                          }
                        ],
                        "limits": {
                          "requests_per_minute": 120,
                          "burst_requests": 20,
                          "concurrent_jobs": 5,
                          "upload_bytes": 10485760,
                          "document_pages": 100,
                          "mime_types": [
                            "application/pdf"
                          ]
                        },
                        "webhooks": {
                          "event_retention_seconds": 2592000,
                          "delivery_timeout_seconds": 10,
                          "rotation_overlap_seconds": 86400,
                          "retained_from": "2026-09-23T14:00:00Z"
                        },
                        "idempotency_replay_seconds": 86400
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/configuration\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/configuration\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/configuration\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/subjects/{id}/readiness": {
      "get": {
        "operationId": "IR008",
        "summary": "Retrieve subject readiness",
        "description": "Explain whether this subject has a ready evidence set for Insights or an approved baseline for Signal. After source sync and evidence acceptance, AMLOK automatically builds a frozen manifest. Checks include consent, source coverage, at least 12 months of banking history for Insights, required evidence and agreed scope. preparing supplies retry_after_seconds; blocked supplies actionable checks and next_action. Do not treat an empty manifest/baseline list as a completed onboarding. A ready Insights result identifies the manifest; a ready Signal result identifies the approved snapshot. Existing-portfolio Signal onboarding can create the baseline without charging Insights and is arranged with the account manager. This read does not approve evidence, process an underwriting or spend credits. Signal readiness also requires monitoring:read. Initial Insights readiness covers intake evidence; staged owner KYC can remain a requirement on the subsequently accepted underwriting, avoiding a circular prerequisite.",
        "tags": [
          "Risk"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "risk:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized identifier in this workspace.",
            "schema": {
              "type": "string"
            },
            "example": "biz_example"
          },
          {
            "name": "product",
            "in": "query",
            "required": true,
            "description": "Product being initialized.",
            "schema": {
              "type": "string",
              "enum": [
                "insights",
                "signal"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SubjectReadiness"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "subject_id": "biz_example",
                        "product": "insights",
                        "status": "ready",
                        "checks": [
                          {
                            "code": "bank_history_12_months",
                            "status": "passed",
                            "message": "At least 12 months of permitted banking evidence included."
                          }
                        ],
                        "input_manifest_id": "manifest_example",
                        "baseline_snapshot_id": null,
                        "next_action": "start_underwriting",
                        "retry_after_seconds": null,
                        "updated_at": "2026-10-23T14:00:00Z"
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/subjects/biz_example/readiness?product=insights\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/subjects/biz_example/readiness?product=insights\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/subjects/biz_example/readiness?product=insights\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/webhook-events": {
      "get": {
        "operationId": "IR009",
        "summary": "List webhook events",
        "description": "Discover generated events even when none reached your receiver. Filter by creation time and type; order by (created_at, id), ascending. First page freezes the upper boundary; cursor retains it. Retention and retained_from are provided by configuration. A requested interval earlier than retained_from returns 410 event_history_expired, never a misleading empty success. Reconcile current state using checkpoints and the change feed after expiry. Event availability still requires the key's underlying resource read scopes. Polling events is read-only and does not redeliver them.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "webhooks:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and the first page snapshot. Do not change filters during pagination.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "created_from",
            "in": "query",
            "required": false,
            "description": "Inclusive UTC lower boundary.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "created_to",
            "in": "query",
            "required": false,
            "description": "Exclusive UTC upper boundary.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "description": "Event type.",
            "schema": {
              "type": "string",
              "enum": [
                "business.created",
                "person.created",
                "connection.updated",
                "consent.updated",
                "sync.completed",
                "sync.failed",
                "verification.updated",
                "verification.completed",
                "document.processed",
                "lien_search.completed",
                "lien_search.failed",
                "lien.updated",
                "application.updated",
                "decision.created",
                "loan.updated",
                "repayment.updated",
                "attributes.calculated",
                "risk_snapshot.created",
                "monitor.updated",
                "alert.created",
                "alert.updated",
                "workflow.completed",
                "workflow.failed",
                "resource.deleted",
                "billing.usage.posted",
                "billing.report.updated",
                "billing.statement.finalized"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookEvent"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "id": "evt_example",
                          "type": "verification.completed",
                          "created_at": "2026-10-23T14:00:00Z",
                          "schema_version": "1.4.2",
                          "resource_type": "verification",
                          "resource_id": "ver_example",
                          "resource_version": 2,
                          "data": {
                            "status": "in_review"
                          }
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/webhook-events\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/webhook-events\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/webhook-events\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/webhook-events/{id}": {
      "get": {
        "operationId": "IR010",
        "summary": "Retrieve webhook event",
        "description": "Retrieve a retained event with its original ID and minimal payload. No provider credentials or signing secrets are returned. Enforce the original resource authorization. Expired known events return 410 event_history_expired; unknown or unauthorized IDs return 404. Retrieve the authoritative resource separately for current data.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "webhooks:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Authorized identifier in this workspace.",
            "schema": {
              "type": "string"
            },
            "example": "evt_example"
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WebhookEvent"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": {
                        "id": "evt_example",
                        "type": "verification.completed",
                        "created_at": "2026-10-23T14:00:00Z",
                        "schema_version": "1.4.2",
                        "resource_type": "verification",
                        "resource_id": "ver_example",
                        "resource_version": 2,
                        "data": {
                          "status": "in_review"
                        }
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/webhook-events/evt_example\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/webhook-events/evt_example\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/webhook-events/evt_example\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/webhook-deliveries": {
      "get": {
        "operationId": "IR011",
        "summary": "List webhook deliveries",
        "description": "Read one row per delivery attempt in ascending attempt time and ID order. Cursor freezes filters and upper boundary. Filter by endpoint_id or event_id to diagnose missed events, retries and replays. No receiver response body, authentication header or signing secret is retained in this public report. Queued attempts have null attempted_at. Final automatic failure is exhausted. Retention follows webhook event retention; earlier requested time returns 410 event_history_expired. Endpoint disablement cancels queued attempts without deleting retained events.",
        "tags": [
          "Webhooks"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "webhooks:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and the first page snapshot. Do not change filters during pagination.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "endpoint_id",
            "in": "query",
            "required": false,
            "description": "Registered destination.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "event_id",
            "in": "query",
            "required": false,
            "description": "Original event ID.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Delivery state.",
            "schema": {
              "type": "string",
              "enum": [
                "queued",
                "delivered",
                "failed",
                "exhausted"
              ]
            }
          },
          {
            "name": "created_from",
            "in": "query",
            "required": false,
            "description": "Inclusive attempt creation time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/WebhookDelivery"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "id": "delivery_example",
                          "object": "webhook_delivery",
                          "endpoint_id": "whe_example",
                          "event_id": "evt_example",
                          "attempt": 1,
                          "status": "failed",
                          "created_at": "2026-10-23T14:00:00Z",
                          "attempted_at": "2026-10-23T14:00:00Z",
                          "next_attempt_at": "2026-10-23T14:01:00Z",
                          "http_status": 503,
                          "failure_code": "http_error",
                          "replay_request_id": null
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/webhook-deliveries\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/webhook-deliveries\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/webhook-deliveries\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    },
    "/v1/sandbox/scenarios": {
      "get": {
        "operationId": "IR012",
        "summary": "List sandbox scenarios",
        "description": "Return only synthetic fixtures provisioned in this sandbox workspace. Production returns 404; there are no production fault-injection or time-control commands. The account manager provides sandbox access and the fixture pack through the client portal. A portal administrator selects/reset scenarios before a test run; resetting discards only sandbox fixtures and test credits. GET never resets or mutates a scenario. Returned IDs and approved configuration are authoritative; do not use saved example IDs. Sandbox funding and simulated time controls stay in the portal, cannot move money, and cannot change production. Billing assertions use the real product rules with test credits.",
        "tags": [
          "Platform"
        ],
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "x-required-scopes": [
          "platform:read"
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 100; maximum 200.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 100
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "Opaque cursor bound to filters and the first page snapshot. Do not change filters during pagination.",
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Authorized response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SandboxScenario"
                      }
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/ResponseMeta"
                    }
                  },
                  "required": [
                    "data",
                    "page",
                    "meta"
                  ]
                },
                "examples": {
                  "synthetic": {
                    "value": {
                      "data": [
                        {
                          "id": "insights_success",
                          "object": "sandbox_scenario",
                          "name": "Completed full underwriting",
                          "subject_id": "biz_sandbox_insights_success",
                          "application_id": "app_sandbox_insights_success",
                          "input_manifest_id": "manifest_sandbox_insights_success",
                          "baseline_snapshot_id": null,
                          "connection_id": "cnn_sandbox_insights_success",
                          "person_id": "per_sandbox_insights_success",
                          "association_id": "assoc_sandbox_insights_success",
                          "document_id": "doc_sandbox_insights_success",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 202,
                          "expected_state": "completed",
                          "instructions": "Run the Insights journey. Includes two bank accounts, five business systems and at least twelve months of synthetic banking history. Expect one Standard Insights charge."
                        },
                        {
                          "id": "signal_success",
                          "object": "sandbox_scenario",
                          "name": "Monitoring and reassessment",
                          "subject_id": "biz_sandbox_signal_success",
                          "application_id": "app_sandbox_signal_success",
                          "input_manifest_id": "manifest_sandbox_signal_success",
                          "baseline_snapshot_id": "rsk_sandbox_signal_success",
                          "connection_id": "cnn_sandbox_signal_success",
                          "person_id": "per_sandbox_signal_success",
                          "association_id": "assoc_sandbox_signal_success",
                          "document_id": "doc_sandbox_signal_success",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 201,
                          "expected_state": "active",
                          "instructions": "Run the Signal journey. A pre-approved existing-portfolio baseline and scheduled synthetic source update produce reassessment and an alert. Expect one Standard Signal charge and no Insights charge."
                        },
                        {
                          "id": "insufficient_credits",
                          "object": "sandbox_scenario",
                          "name": "Insufficient available credits",
                          "subject_id": "biz_sandbox_insufficient_credits",
                          "application_id": "app_sandbox_insufficient_credits",
                          "input_manifest_id": "manifest_sandbox_insufficient_credits",
                          "baseline_snapshot_id": null,
                          "connection_id": "cnn_sandbox_insufficient_credits",
                          "person_id": "per_sandbox_insufficient_credits",
                          "association_id": "assoc_sandbox_insufficient_credits",
                          "document_id": "doc_sandbox_insufficient_credits",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 402,
                          "expected_state": "insufficient_credits",
                          "instructions": "Submit the Insights request; expect no accepted run or debit. Use portal sandbox funding to restore test credits, then retry the identical key."
                        },
                        {
                          "id": "authorization_expired",
                          "object": "sandbox_scenario",
                          "name": "Expired connection authorization",
                          "subject_id": "biz_sandbox_authorization_expired",
                          "application_id": "app_sandbox_authorization_expired",
                          "input_manifest_id": "manifest_sandbox_authorization_expired",
                          "baseline_snapshot_id": null,
                          "connection_id": "cnn_sandbox_authorization_expired",
                          "person_id": "per_sandbox_authorization_expired",
                          "association_id": "assoc_sandbox_authorization_expired",
                          "document_id": "doc_sandbox_authorization_expired",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 201,
                          "expected_state": "reauth_required",
                          "instructions": "Renew the supplied connection authorization; complete the sandbox hosted flow. Retrieve the same connection ID as active and then sync."
                        },
                        {
                          "id": "rejected_evidence",
                          "object": "sandbox_scenario",
                          "name": "Rejected evidence",
                          "subject_id": "biz_sandbox_rejected_evidence",
                          "application_id": "app_sandbox_rejected_evidence",
                          "input_manifest_id": "manifest_sandbox_rejected_evidence",
                          "baseline_snapshot_id": null,
                          "connection_id": "cnn_sandbox_rejected_evidence",
                          "person_id": "per_sandbox_rejected_evidence",
                          "association_id": "assoc_sandbox_rejected_evidence",
                          "document_id": "doc_sandbox_rejected_evidence",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 202,
                          "expected_state": "waiting_for_data",
                          "instructions": "Start underwriting; the sandbox evidence validator rejects the seeded document and returns a rejected requirement with a reason. Upload its replacement from the portal-provided fixture pack using requirement_id; the same run resumes."
                        },
                        {
                          "id": "workload_limit",
                          "object": "sandbox_scenario",
                          "name": "Known workload limit exceeded",
                          "subject_id": "biz_sandbox_workload_limit",
                          "application_id": "app_sandbox_workload_limit",
                          "input_manifest_id": "manifest_sandbox_workload_limit",
                          "baseline_snapshot_id": null,
                          "connection_id": "cnn_sandbox_workload_limit",
                          "person_id": "per_sandbox_workload_limit",
                          "association_id": "assoc_sandbox_workload_limit",
                          "document_id": "doc_sandbox_workload_limit",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 422,
                          "expected_state": "workload_limit_exceeded",
                          "instructions": "Submit the Insights request with over-limit evidence; expect no debit and no automatic tier change."
                        },
                        {
                          "id": "retryable_failure",
                          "object": "sandbox_scenario",
                          "name": "Retryable processing failure",
                          "subject_id": "biz_sandbox_retryable_failure",
                          "application_id": "app_sandbox_retryable_failure",
                          "input_manifest_id": "manifest_sandbox_retryable_failure",
                          "baseline_snapshot_id": null,
                          "connection_id": "cnn_sandbox_retryable_failure",
                          "person_id": "per_sandbox_retryable_failure",
                          "association_id": "assoc_sandbox_retryable_failure",
                          "document_id": "doc_sandbox_retryable_failure",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 202,
                          "expected_state": "failed",
                          "instructions": "Start the run and poll until failure.retryable is true. Retry that same run; its second attempt completes with one total Insights charge."
                        },
                        {
                          "id": "owner_kyc",
                          "object": "sandbox_scenario",
                          "name": "Related owner verification",
                          "subject_id": "biz_sandbox_owner_kyc",
                          "application_id": "app_sandbox_owner_kyc",
                          "input_manifest_id": "manifest_sandbox_owner_kyc",
                          "baseline_snapshot_id": null,
                          "connection_id": "cnn_sandbox_owner_kyc",
                          "person_id": "per_sandbox_owner_kyc",
                          "association_id": "assoc_sandbox_owner_kyc",
                          "document_id": "doc_sandbox_owner_kyc",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 201,
                          "expected_state": "approved",
                          "instructions": "Use an unfinished waiting-for-data business run from the fixture pack and its active association to request person KYC. The included check has no separate charge."
                        },
                        {
                          "id": "duplicate_delivery",
                          "object": "sandbox_scenario",
                          "name": "Duplicate webhook delivery",
                          "subject_id": "biz_sandbox_duplicate_delivery",
                          "application_id": "app_sandbox_duplicate_delivery",
                          "input_manifest_id": "manifest_sandbox_duplicate_delivery",
                          "baseline_snapshot_id": null,
                          "connection_id": "cnn_sandbox_duplicate_delivery",
                          "person_id": "per_sandbox_duplicate_delivery",
                          "association_id": "assoc_sandbox_duplicate_delivery",
                          "document_id": "doc_sandbox_duplicate_delivery",
                          "workflow_version": "underwrite-v1",
                          "ruleset_version": "monitoring-v1",
                          "cadence": "daily",
                          "expected_http_status": 201,
                          "expected_state": "delivered",
                          "instructions": "Register a sandbox receiver; its seeded event is delivered twice with one event ID and fresh signatures. Reconcile attempts and replay using that ID; your consumer must apply the event once."
                        }
                      ],
                      "page": {
                        "has_more": false,
                        "next_cursor": null,
                        "limit": 100
                      },
                      "meta": {
                        "request_id": "req_example",
                        "schema_version": "1.4.2",
                        "generated_at": "2026-10-23T14:00:00Z",
                        "data_status": "complete"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "410": {
            "$ref": "#/components/responses/Error410"
          },
          "422": {
            "$ref": "#/components/responses/Error422"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        },
        "x-codeSamples": [
          {
            "lang": "Shell",
            "label": "cURL",
            "source": "curl --request GET --fail-with-body --max-time 30 \\\n  \"${AMLOK_API_BASE_URL}/v1/sandbox/scenarios\" \\\n  --header \"Authorization: Bearer ${AMLOK_API_KEY}\" \\\n  --header \"Accept: application/json\""
          },
          {
            "lang": "Python",
            "source": "import os\nimport requests\n\nbase_url = os.environ[\"AMLOK_API_BASE_URL\"].rstrip(\"/\")\nheaders = {'Accept': 'application/json'}\nheaders[\"Authorization\"] = \"Bearer \" + os.environ[\"AMLOK_API_KEY\"]\n\nresponse = requests.request(\n    \"GET\", base_url + \"/v1/sandbox/scenarios\",\n    headers=headers, timeout=30, allow_redirects=False,\n)\nresponse.raise_for_status()\nprint(response.json())"
          },
          {
            "lang": "JavaScript",
            "label": "Node.js",
            "source": "\nconst baseUrl = process.env.AMLOK_API_BASE_URL;\nconst apiKey = process.env.AMLOK_API_KEY;\nif (!baseUrl || !apiKey) throw new Error(\"Configure AMLOK_API_BASE_URL and AMLOK_API_KEY\");\nconst headers = {\n  \"Accept\": \"application/json\"\n};\nheaders.Authorization = `Bearer ${apiKey}`;\nconst response = await fetch(baseUrl.replace(/\\/$/, \"\") + \"/v1/sandbox/scenarios\", {\n  method: \"GET\", headers,\n  redirect: \"error\", signal: AbortSignal.timeout(30000),\n});\nif (!response.ok) throw new Error(`AMLOK returned HTTP ${response.status}`);\nconsole.log(await response.json());"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "Server-to-server API key bound to exactly one workspace, institution tenant and environment. No caller-supplied workspace override is accepted. Do not use in public browser code."
      }
    },
    "schemas": {
      "Enum_connection_status": {
        "type": "string",
        "enum": [
          "pending",
          "active",
          "reauth_required",
          "revoked",
          "disconnected",
          "error"
        ]
      },
      "Enum_consent_status": {
        "type": "string",
        "enum": [
          "pending",
          "granted",
          "revoked",
          "expired"
        ]
      },
      "Enum_sync_status": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "completed",
          "partial",
          "failed",
          "cancelled"
        ]
      },
      "Enum_source_kind": {
        "type": "string",
        "enum": [
          "provider",
          "client",
          "document",
          "registry",
          "amlok"
        ]
      },
      "Enum_data_status": {
        "type": "string",
        "enum": [
          "complete",
          "partial",
          "unavailable",
          "pending"
        ]
      },
      "Enum_null_reason": {
        "type": "string",
        "enum": [
          "not_provided",
          "not_supported",
          "not_authorized",
          "not_applicable",
          "pending",
          "redacted",
          "source_error",
          "invalid",
          "insufficient_history"
        ]
      },
      "Enum_legal_status": {
        "type": "string",
        "enum": [
          "active",
          "inactive",
          "dissolved",
          "struck_off",
          "liquidation",
          "dormant",
          "unknown"
        ]
      },
      "Enum_party_type": {
        "type": "string",
        "enum": [
          "business",
          "person"
        ]
      },
      "Enum_verification_status": {
        "type": "string",
        "enum": [
          "not_started",
          "in_progress",
          "awaiting_user",
          "in_review",
          "approved",
          "declined",
          "resubmission_requested",
          "expired",
          "abandoned",
          "verification_expired",
          "unknown",
          "cancelled"
        ]
      },
      "Enum_check_status": {
        "type": "string",
        "enum": [
          "not_run",
          "pending",
          "passed",
          "failed",
          "review",
          "unavailable",
          "unknown"
        ]
      },
      "Enum_match_disposition": {
        "type": "string",
        "enum": [
          "unreviewed",
          "false_positive",
          "possible_match",
          "confirmed_match"
        ]
      },
      "Enum_screening_type": {
        "type": "string",
        "enum": [
          "sanctions",
          "pep",
          "adverse_media",
          "watchlist"
        ]
      },
      "Enum_relationship_type": {
        "type": "string",
        "enum": [
          "beneficial_owner",
          "shareholder",
          "director",
          "officer",
          "guarantor",
          "subsidiary",
          "parent",
          "authorized_signatory",
          "account_holder",
          "related_party",
          "unknown"
        ]
      },
      "Enum_account_type": {
        "type": "string",
        "enum": [
          "depository",
          "credit",
          "loan",
          "investment",
          "other",
          "unknown"
        ]
      },
      "Enum_account_ownership": {
        "type": "string",
        "enum": [
          "business",
          "personal",
          "joint",
          "trust",
          "unknown"
        ]
      },
      "Enum_balance_basis": {
        "type": "string",
        "enum": [
          "asset",
          "liability",
          "unknown"
        ]
      },
      "Enum_transaction_status": {
        "type": "string",
        "enum": [
          "pending",
          "posted",
          "removed",
          "unknown"
        ]
      },
      "Enum_direction": {
        "type": "string",
        "enum": [
          "inflow",
          "outflow",
          "neutral",
          "unknown"
        ]
      },
      "Enum_cashflow_category": {
        "type": "string",
        "enum": [
          "sales_receipt",
          "payroll",
          "operating_expense",
          "tax",
          "debt_proceeds",
          "debt_service",
          "owner_contribution",
          "owner_distribution",
          "internal_transfer",
          "refund",
          "chargeback",
          "interest",
          "fee",
          "investment",
          "other",
          "unknown"
        ]
      },
      "Enum_payment_status": {
        "type": "string",
        "enum": [
          "pending",
          "authorized",
          "captured",
          "settled",
          "failed",
          "cancelled",
          "partially_refunded",
          "refunded",
          "unknown"
        ]
      },
      "Enum_payout_status": {
        "type": "string",
        "enum": [
          "pending",
          "in_transit",
          "paid",
          "failed",
          "cancelled",
          "unknown"
        ]
      },
      "Enum_dispute_status": {
        "type": "string",
        "enum": [
          "needs_response",
          "under_review",
          "won",
          "lost",
          "closed",
          "unknown"
        ]
      },
      "Enum_order_status": {
        "type": "string",
        "enum": [
          "open",
          "completed",
          "cancelled",
          "closed",
          "unknown"
        ]
      },
      "Enum_fulfillment_status": {
        "type": "string",
        "enum": [
          "unfulfilled",
          "partial",
          "fulfilled",
          "returned",
          "unknown"
        ]
      },
      "Enum_invoice_status": {
        "type": "string",
        "enum": [
          "draft",
          "open",
          "partially_paid",
          "paid",
          "void",
          "uncollectible",
          "unknown"
        ]
      },
      "Enum_gl_type": {
        "type": "string",
        "enum": [
          "asset",
          "liability",
          "equity",
          "revenue",
          "expense",
          "other",
          "unknown"
        ]
      },
      "Enum_debit_credit": {
        "type": "string",
        "enum": [
          "debit",
          "credit"
        ]
      },
      "Enum_statement_type": {
        "type": "string",
        "enum": [
          "balance_sheet",
          "income_statement",
          "cash_flow",
          "trial_balance"
        ]
      },
      "Enum_accounting_basis": {
        "type": "string",
        "enum": [
          "cash",
          "accrual",
          "unknown"
        ]
      },
      "Enum_stock_ownership": {
        "type": "string",
        "enum": [
          "owned",
          "consigned",
          "third_party",
          "unknown"
        ]
      },
      "Enum_movement_type": {
        "type": "string",
        "enum": [
          "receipt",
          "sale",
          "return",
          "transfer",
          "adjustment",
          "production",
          "consumption",
          "write_off",
          "unknown"
        ]
      },
      "Enum_purchase_status": {
        "type": "string",
        "enum": [
          "draft",
          "issued",
          "partially_received",
          "received",
          "cancelled",
          "closed",
          "unknown"
        ]
      },
      "Enum_application_status": {
        "type": "string",
        "enum": [
          "draft",
          "submitted",
          "in_review",
          "conditional",
          "approved",
          "declined",
          "withdrawn",
          "expired",
          "unknown"
        ]
      },
      "Enum_credit_product": {
        "type": "string",
        "enum": [
          "term_loan",
          "line_of_credit",
          "revolving",
          "invoice_finance",
          "merchant_finance",
          "equipment_finance",
          "auto",
          "mortgage",
          "consumer_installment",
          "bnpl",
          "other"
        ]
      },
      "Enum_loan_status": {
        "type": "string",
        "enum": [
          "pending",
          "active",
          "delinquent",
          "defaulted",
          "restructured",
          "paid_off",
          "charged_off",
          "closed",
          "unknown"
        ]
      },
      "Enum_rate_type": {
        "type": "string",
        "enum": [
          "fixed",
          "variable",
          "unknown"
        ]
      },
      "Enum_repayment_status": {
        "type": "string",
        "enum": [
          "scheduled",
          "pending",
          "completed",
          "failed",
          "reversed",
          "waived",
          "unknown"
        ]
      },
      "Enum_collateral_type": {
        "type": "string",
        "enum": [
          "real_estate",
          "vehicle",
          "equipment",
          "inventory",
          "receivables",
          "cash",
          "securities",
          "all_assets",
          "other",
          "unknown"
        ]
      },
      "Enum_decision_outcome": {
        "type": "string",
        "enum": [
          "approve",
          "decline",
          "refer",
          "conditional",
          "no_decision"
        ]
      },
      "Enum_lien_type": {
        "type": "string",
        "enum": [
          "ucc",
          "ppsa",
          "rdprm",
          "tax",
          "judgment",
          "other",
          "unknown"
        ]
      },
      "Enum_lien_status": {
        "type": "string",
        "enum": [
          "active",
          "lapsed",
          "terminated",
          "discharged",
          "unknown"
        ]
      },
      "Enum_filing_event_type": {
        "type": "string",
        "enum": [
          "initial",
          "amendment",
          "continuation",
          "assignment",
          "termination",
          "discharge",
          "renewal",
          "unknown"
        ]
      },
      "Enum_severity": {
        "type": "string",
        "enum": [
          "info",
          "low",
          "medium",
          "high",
          "critical"
        ]
      },
      "Enum_alert_status": {
        "type": "string",
        "enum": [
          "open",
          "resolved"
        ]
      },
      "Enum_workflow_type": {
        "type": "string",
        "enum": [
          "verify",
          "underwrite",
          "monitor",
          "investigate"
        ]
      },
      "Enum_workflow_status": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "waiting_for_data",
          "completed",
          "failed",
          "cancelled",
          "waiting_for_credits",
          "blocked_by_limit"
        ]
      },
      "Enum_value_type": {
        "type": "string",
        "enum": [
          "decimal",
          "integer",
          "boolean",
          "string",
          "date"
        ]
      },
      "Enum_trend_direction": {
        "type": "string",
        "enum": [
          "increasing",
          "decreasing",
          "stable",
          "unknown"
        ]
      },
      "Enum_metric_status": {
        "type": "string",
        "enum": [
          "available",
          "unavailable",
          "stale"
        ]
      },
      "Enum_evidence_level": {
        "type": "string",
        "enum": [
          "source_record",
          "document_extracted",
          "client_asserted",
          "derived",
          "model_inferred"
        ]
      },
      "Enum_reconciliation_status": {
        "type": "string",
        "enum": [
          "unmatched",
          "matched",
          "partial",
          "conflict"
        ]
      },
      "Enum_document_type": {
        "type": "string",
        "enum": [
          "identity",
          "proof_of_address",
          "bank_statement",
          "financial_statement",
          "tax_return",
          "corporate_registry",
          "ownership",
          "loan_agreement",
          "lien_report",
          "invoice",
          "other"
        ]
      },
      "Enum_monitor_status": {
        "type": "string",
        "enum": [
          "active",
          "paused",
          "cancelled",
          "blocked"
        ]
      },
      "Enum_requirement_status": {
        "type": "string",
        "enum": [
          "missing",
          "requested",
          "received",
          "accepted",
          "rejected",
          "waived"
        ]
      },
      "Enum_frequency": {
        "type": "string",
        "enum": [
          "daily",
          "weekly",
          "biweekly",
          "semimonthly",
          "monthly",
          "quarterly",
          "annually",
          "irregular",
          "unknown"
        ]
      },
      "Enum_signature_status": {
        "type": "string",
        "enum": [
          "not_requested",
          "pending",
          "signed",
          "declined",
          "expired",
          "unknown"
        ]
      },
      "Enum_guarantee_type": {
        "type": "string",
        "enum": [
          "personal",
          "corporate",
          "limited",
          "unlimited",
          "unknown"
        ]
      },
      "Enum_covenant_status": {
        "type": "string",
        "enum": [
          "compliant",
          "breached",
          "waived",
          "not_evaluated",
          "unknown"
        ]
      },
      "Enum_search_status": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "completed",
          "partial",
          "failed",
          "cancelled"
        ]
      },
      "Enum_event_action": {
        "type": "string",
        "enum": [
          "created",
          "updated",
          "deleted"
        ]
      },
      "Enum_review_status": {
        "type": "string",
        "enum": [
          "not_reviewed",
          "accepted",
          "rejected",
          "needs_review"
        ]
      },
      "Enum_field_evidence": {
        "type": "string",
        "enum": [
          "documented",
          "candidate",
          "amlok_defined"
        ]
      },
      "Enum_receivable_kind": {
        "type": "string",
        "enum": [
          "invoice",
          "bill",
          "credit_note"
        ]
      },
      "Enum_balance_date_basis": {
        "type": "string",
        "enum": [
          "source_observed",
          "reconstructed",
          "unknown"
        ]
      },
      "Enum_manufacturing_status": {
        "type": "string",
        "enum": [
          "planned",
          "released",
          "in_progress",
          "completed",
          "cancelled",
          "unknown"
        ]
      },
      "Enum_project_status": {
        "type": "string",
        "enum": [
          "planned",
          "active",
          "on_hold",
          "completed",
          "cancelled",
          "unknown"
        ]
      },
      "Address": {
        "type": "object",
        "properties": {
          "line1": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Street or delivery address line one."
          },
          "line2": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Suite, unit or second address line."
          },
          "city": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Locality."
          },
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Subdivision or province code/name; preserve raw when unmapped."
          },
          "postal_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Postal code as a string with leading zeroes preserved."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "ISO 3166-1 alpha-2 country when established."
          },
          "raw_address": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unparsed source address if structured fields are unavailable."
          }
        }
      },
      "SourceRef": {
        "type": "object",
        "properties": {
          "provider_id": {
            "type": "string",
            "description": "Inventory or supplemental provider identifier; AMLOK or CLIENT for internal evidence."
          },
          "connection_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized provider connection."
          },
          "source_record_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream record identifier scoped by provider, connection and record type."
          },
          "source_record_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider object or report type."
          },
          "source_updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source update time; do not replace with retrieval time."
          },
          "retrieved_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK retrieved this evidence."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence document when applicable."
          },
          "source_api_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Version of provider API/schema used."
          }
        },
        "required": [
          "provider_id",
          "retrieved_at"
        ]
      },
      "FieldProvenance": {
        "type": "object",
        "properties": {
          "field_path": {
            "type": "string",
            "description": "Relative path in the normalized resource."
          },
          "source_ref_index": {
            "type": "integer",
            "description": "Zero-based index into source_refs."
          },
          "source_field_path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual field path or document locator."
          },
          "transformation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Versioned conversion/mapping rule."
          },
          "evidence_level": {
            "$ref": "#/components/schemas/Enum_evidence_level",
            "description": "Provenance class for the resulting value."
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibrated extraction or matching confidence, if available."
          },
          "source_timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original timezone where needed to interpret local time."
          }
        },
        "required": [
          "field_path",
          "source_ref_index",
          "evidence_level"
        ]
      },
      "MissingField": {
        "type": "object",
        "properties": {
          "field_path": {
            "type": "string",
            "description": "Unavailable relative field path."
          },
          "reason": {
            "$ref": "#/components/schemas/Enum_null_reason",
            "description": "Specific reason the field has no value."
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sanitized explanation useful to the caller."
          }
        },
        "required": [
          "field_path",
          "reason"
        ]
      },
      "Identifier": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Identifier scheme such as CA_BN or US_EIN."
          },
          "value_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault token for restricted identifiers."
          },
          "masked_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Masked identifier for an authorized caller."
          },
          "country": {
            "type": "string",
            "description": "Issuing country code."
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry or subdivision when necessary."
          }
        },
        "required": [
          "type",
          "country"
        ]
      },
      "IndustryCode": {
        "type": "object",
        "properties": {
          "taxonomy": {
            "type": "string",
            "description": "Classification system; NAICS, SIC, MCC, NACE or named local scheme."
          },
          "version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Edition of the classification system."
          },
          "code": {
            "type": "string",
            "description": "Identifier preserved as a string."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Label supplied by source or a versioned dictionary."
          },
          "is_primary": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-designated primary industry."
          }
        },
        "required": [
          "taxonomy",
          "code"
        ]
      },
      "Money": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
            "description": "Exact decimal string in major units; signed only where field definition specifies."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Uppercase ISO 4217 currency when known; null blocks monetary aggregation and requires missing_fields reason."
          }
        },
        "required": [
          "amount",
          "currency"
        ]
      },
      "InvoiceLine": {
        "type": "object",
        "properties": {
          "id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line identifier within parent document."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized item if resolved."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original line description."
          },
          "quantity": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Line quantity in the supplied unit."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity unit."
          },
          "unit_price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit charge under document tax convention."
          },
          "tax_amount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line tax amount."
          },
          "line_total": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source extended amount; retain whether tax is included."
          },
          "ledger_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source ledger classification if exposed."
          },
          "tax_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Jurisdiction-specific source tax code."
          }
        }
      },
      "PurchaseLine": {
        "type": "object",
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ordered item."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchase line description."
          },
          "quantity_ordered": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Ordered quantity."
          },
          "quantity_received": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Recorded received quantity."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity unit."
          },
          "unit_price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ],
            "description": "Price per ordered unit."
          },
          "line_total": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Money"
              },
              {
                "type": "null"
              }
            ],
            "description": "Total ordered line amount."
          }
        }
      },
      "ShipmentLine": {
        "type": "object",
        "properties": {
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Item shipped or received."
          },
          "quantity": {
            "type": "string",
            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
            "description": "Quantity in this shipment."
          },
          "unit_of_measure": {
            "type": "string",
            "description": "Unit for the quantity."
          },
          "order_line_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sales line being fulfilled."
          }
        },
        "required": [
          "quantity",
          "unit_of_measure"
        ]
      },
      "Allocation": {
        "type": "object",
        "properties": {
          "resource_type": {
            "$ref": "#/components/schemas/Enum_receivable_kind",
            "description": "Type of accounting document receiving allocation."
          },
          "resource_id": {
            "type": "string",
            "description": "Normalized accounting document."
          },
          "amount": {
            "$ref": "#/components/schemas/Money",
            "description": "Amount applied in the target document currency."
          }
        },
        "required": [
          "resource_type",
          "resource_id",
          "amount"
        ]
      },
      "LienParty": {
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "description": "Recorded debtor, secured party, assignee or other role."
          },
          "name": {
            "type": "string",
            "description": "Party name exactly as recorded."
          },
          "entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Resolved AMLOK party only when established."
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Address in registry evidence."
          },
          "source_party_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source identifier if provided."
          }
        },
        "required": [
          "role",
          "name"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable machine-readable error code."
          },
          "message": {
            "type": "string",
            "description": "Safe caller-facing explanation."
          },
          "field": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Invalid request field when relevant."
          },
          "retryable": {
            "type": "boolean",
            "description": "Whether retry may succeed without changing the request."
          },
          "request_id": {
            "type": "string",
            "description": "Correlation identifier for support."
          }
        },
        "required": [
          "code",
          "message",
          "retryable",
          "request_id"
        ]
      },
      "Page": {
        "type": "object",
        "properties": {
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque cursor for subsequent page; null after final page."
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more authorized records remain."
          },
          "limit": {
            "type": "integer",
            "description": "Applied result limit, from 1 to 200 in this contract.",
            "minimum": 1,
            "maximum": 200
          }
        },
        "required": [
          "has_more",
          "limit"
        ]
      },
      "ResponseMeta": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "description": "AMLOK request correlation ID."
          },
          "schema_version": {
            "type": "string",
            "description": "Serialization contract version."
          },
          "generated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Response generation time, not source data freshness."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Completeness of this response within its declared scope."
          },
          "coverage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Coverage"
              },
              {
                "type": "null"
              }
            ],
            "description": "Requested and achieved source/time coverage."
          }
        },
        "required": [
          "request_id",
          "schema_version",
          "generated_at",
          "data_status"
        ]
      },
      "Coverage": {
        "type": "object",
        "properties": {
          "requested_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inclusive start requested."
          },
          "requested_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exclusive end requested."
          },
          "available_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earliest actual coverage."
          },
          "available_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exclusive end of actual coverage."
          },
          "source_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sources actually contributing."
          },
          "missing_intervals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Interval"
            },
            "description": "Known gaps within requested scope."
          },
          "jurisdictions_completed": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Completed geographic search scope when applicable."
          }
        },
        "required": [
          "source_ids",
          "missing_intervals"
        ]
      },
      "Interval": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date",
            "description": "Inclusive interval start."
          },
          "to": {
            "type": "string",
            "format": "date",
            "description": "Exclusive interval end."
          }
        },
        "required": [
          "from",
          "to"
        ]
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Globally unique event ID within tenant for deduplication."
          },
          "type": {
            "type": "string",
            "enum": [
              "business.created",
              "person.created",
              "connection.updated",
              "consent.updated",
              "sync.completed",
              "sync.failed",
              "verification.updated",
              "verification.completed",
              "document.processed",
              "lien_search.completed",
              "lien_search.failed",
              "lien.updated",
              "application.updated",
              "decision.created",
              "loan.updated",
              "repayment.updated",
              "attributes.calculated",
              "risk_snapshot.created",
              "monitor.updated",
              "alert.created",
              "alert.updated",
              "workflow.completed",
              "workflow.failed",
              "resource.deleted",
              "billing.usage.posted",
              "billing.report.updated",
              "billing.statement.finalized"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Event creation time."
          },
          "schema_version": {
            "type": "string",
            "description": "Webhook contract version."
          },
          "resource_type": {
            "type": "string",
            "description": "Type of changed object."
          },
          "resource_id": {
            "type": "string",
            "description": "Object to retrieve for full authorized detail."
          },
          "resource_version": {
            "type": "integer",
            "description": "Version that triggered the event."
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Minimal event details; sensitive evidence retrieved separately."
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "schema_version",
          "resource_type",
          "resource_id",
          "resource_version",
          "data"
        ]
      },
      "Action": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Next applicant interaction such as authorize_connection."
          },
          "url": {
            "type": "string",
            "description": "Short-lived authorized HTTPS interaction URL."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Expiry of interaction URL."
          }
        },
        "required": [
          "type",
          "url",
          "expires_at"
        ]
      },
      "DownloadLink": {
        "type": "object",
        "properties": {
          "document_id": {
            "type": "string",
            "description": "Evidence document requested."
          },
          "url": {
            "type": "string",
            "description": "Short-lived signed download URL returned only to an authorized caller."
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "description": "Expiry of download capability."
          }
        },
        "required": [
          "document_id",
          "url",
          "expires_at"
        ]
      },
      "CalculationJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Calculation job identifier."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_sync_status",
            "description": "Calculation execution state."
          },
          "subject_id": {
            "type": "string",
            "description": "Subject assessed."
          },
          "attribute_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Resulting values, including unavailable outputs."
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Error"
            },
            "description": "Calculation failures."
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          }
        },
        "required": [
          "id",
          "status",
          "subject_id",
          "attribute_ids",
          "errors",
          "stop_reason",
          "processing_context"
        ]
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tenant event destination identifier."
          },
          "url": {
            "type": "string",
            "description": "Validated HTTPS delivery destination."
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Subscribed event keys."
          },
          "status": {
            "type": "string",
            "description": "active or disabled."
          },
          "secret": {
            "type": "string",
            "description": "Signing secret returned once at creation only; omitted thereafter."
          }
        },
        "required": [
          "id",
          "url",
          "event_types",
          "status"
        ]
      },
      "WebhookReplay": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Original event being redelivered."
          },
          "endpoint_id": {
            "type": "string",
            "description": "Authorized destination."
          },
          "status": {
            "type": "string",
            "description": "queued, delivered or failed."
          }
        },
        "required": [
          "event_id",
          "endpoint_id",
          "status"
        ]
      },
      "ProviderCapability": {
        "type": "object",
        "properties": {
          "provider_id": {
            "type": "string",
            "description": "Configured integration ID."
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Resources actually enabled for this tenant."
          },
          "countries": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Validated country availability for this entitlement."
          },
          "status": {
            "type": "string",
            "description": "enabled, unavailable or pending_setup."
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Account/product-specific constraints."
          },
          "products": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ProviderProduct"
            }
          }
        },
        "required": [
          "provider_id",
          "resources",
          "countries",
          "status",
          "limitations",
          "products"
        ]
      },
      "ChangePage": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Change"
            },
            "description": "Ordered authorized normalized changes."
          },
          "page": {
            "$ref": "#/components/schemas/Page",
            "description": "Tenant-scoped continuation information."
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta",
            "description": "Response context and completeness."
          },
          "resume_cursor": {
            "type": "string",
            "minLength": 1,
            "description": "Durable position after every change in this response; returned even for an empty page. Persist atomically with processed changes."
          },
          "cursor_expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "data",
          "page",
          "meta",
          "resume_cursor",
          "cursor_expires_at"
        ]
      },
      "Change": {
        "type": "object",
        "properties": {
          "resource_type": {
            "type": "string",
            "description": "Changed resource type."
          },
          "resource_id": {
            "type": "string",
            "description": "Changed resource ID."
          },
          "resource_version": {
            "type": "integer",
            "description": "Version changed."
          },
          "action": {
            "$ref": "#/components/schemas/Enum_event_action",
            "description": "created, updated or deleted."
          },
          "changed_at": {
            "type": "string",
            "format": "date-time",
            "description": "AMLOK change timestamp."
          },
          "sequence": {
            "type": "integer",
            "minimum": 1,
            "description": "Monotonic workspace change sequence. Gaps are valid when filtering resource types."
          }
        },
        "required": [
          "resource_type",
          "resource_id",
          "resource_version",
          "action",
          "changed_at",
          "sequence"
        ]
      },
      "MoneyInput": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
            "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "additionalProperties": false
      },
      "WebhookEndpointPublic": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tenant event destination identifier."
          },
          "url": {
            "type": "string",
            "description": "Validated HTTPS delivery destination."
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Subscribed event keys."
          },
          "status": {
            "type": "string",
            "description": "active or disabled."
          }
        },
        "required": [
          "id",
          "url",
          "event_types",
          "status"
        ],
        "additionalProperties": false
      },
      "WebhookEndpointCreated": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Tenant event destination identifier."
          },
          "url": {
            "type": "string",
            "description": "Validated HTTPS delivery destination."
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Subscribed event keys."
          },
          "status": {
            "type": "string",
            "description": "active or disabled."
          },
          "secret": {
            "type": "string",
            "description": "Signing secret returned once at creation only; omitted thereafter."
          }
        },
        "required": [
          "id",
          "url",
          "event_types",
          "status",
          "secret"
        ]
      },
      "ResourceMetadata": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "description": "Resource type corresponding to the Entities tab. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0002",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ]
      },
      "Connection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "connection"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "provider_id": {
            "type": "string",
            "description": "Integration catalog identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0017",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "provider_tenant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque external organization or item identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0018",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_connection_status",
            "description": "Current connection usability. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0019",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "institution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-specific institution identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0020",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "institution_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution display name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0021",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution country when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0022",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "products": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Data products enabled for this connection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0023",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Granted read/write entitlements. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0024",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "consent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Consent record authorizing the connection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0025",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "last_successful_sync_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest fully successful retrieval. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0026",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "next_refresh_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled next refresh if known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0027",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "history_available_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earliest date actually returned for the selected resource. Do not infer from a provider's maximum advertised history.",
            "x-field-id": "F0028",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reauth_required_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When renewed user authorization became necessary. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0029",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sanitized connection error code. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0030",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "sync_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque AMLOK change cursor for authorized synchronization. Never expose a provider secret or access token.",
            "x-field-id": "F0031",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "provider_id",
          "status",
          "products",
          "scopes"
        ],
        "title": "connection",
        "description": "One authorized link to a provider tenant or financial institution. Population depends on source and tenant entitlement."
      },
      "Consent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "consent"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "subject_type": {
            "$ref": "#/components/schemas/Enum_party_type",
            "description": "Whether the authorization concerns a business or person. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0032",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_consent_status",
            "description": "Recorded authorization state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0033",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "purposes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Documented purposes for processing the linked data. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0034",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Permitted data and actions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0035",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time authorization was granted. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0036",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expiry when the authorization specifies one. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0037",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Revocation time if revoked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0038",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "policy_version": {
            "type": "string",
            "description": "Version of the text or authority recorded. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0039",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "evidence_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stored evidence of authorization. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0040",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "authorized_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Person or client principal granting authorization. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0041",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "subject_type",
          "status",
          "purposes",
          "scopes",
          "policy_version"
        ],
        "title": "consent",
        "description": "Authorization and permitted use linked to a subject and client. Population depends on source and tenant entitlement."
      },
      "SyncJob": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "sync_job"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "connection_id": {
            "type": "string",
            "description": "Connection being synchronized. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0042",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Requested resource types. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0043",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_sync_status",
            "description": "Ingestion run state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0044",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Processing start time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0045",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Completion or terminal failure time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0046",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "requested_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inclusive source date requested. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0047",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "requested_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exclusive source date requested. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0048",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "records_added": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "New records accepted. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0049",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "records_updated": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing records revised. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0050",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "records_removed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstones processed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0051",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "coverage_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earliest successfully retrieved date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0052",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "coverage_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exclusive end of successfully retrieved interval. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0053",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "errors": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-resource retrieval or validation failures. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0054",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "connection_id",
          "resources",
          "status"
        ],
        "title": "sync_job",
        "description": "Bounded ingestion run, including partial results and source outages. Population depends on source and tenant entitlement."
      },
      "Business": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "business"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name recorded as the legal business name. Retain accents and source spelling; normalized matching key is separate.",
            "x-field-id": "F0055",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "trade_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Trading or DBA names separately identified by the source. Do not split an unstructured list without evidence.",
            "x-field-id": "F0056",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "former_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Historical legal names explicitly identified by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0057",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "registration_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company or registry registration identifier. Preserve leading zeroes and jurisdiction-specific punctuation.",
            "x-field-id": "F0058",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "registration_jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry jurisdiction for the identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0059",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "incorporation_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Country of formation. Normalize documented alpha-3 source codes to alpha-2 using a versioned lookup.",
            "x-field-id": "F0060",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "incorporation_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legal formation date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0061",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "legal_form": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source legal form, normalized only where an approved mapping exists. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0062",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "legal_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_legal_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry legal standing category. Active does not imply solvency or all compliance obligations satisfied.",
            "x-field-id": "F0063",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "raw_legal_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unmodified status supplied by the registry. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0064",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tax_identifiers": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Identifier"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Jurisdiction-qualified business tax identifiers. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0065",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "lei": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legal Entity Identifier when assigned. Do not invent an LEI from a registration number.",
            "x-field-id": "F0066",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "registered_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registered office address. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0067",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "operating_addresses": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Address"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Known trading or operating locations. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0068",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business website reported by a source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0069",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business contact email. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0070",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business contact telephone. E.164 when parseable with country context; otherwise preserve raw value.",
            "x-field-id": "F0071",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "industry_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/IndustryCode"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Classification codes with explicit taxonomy and version. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0072",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "business_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source description of business activity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0073",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Employee count reported for the stated observation date. Registry or source observation; not a live payroll count.",
            "x-field-id": "F0074",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "fiscal_year_end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fiscal year-end month and day. MM-DD; not a financial statement date.",
            "x-field-id": "F0075",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reporting_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Home currency of the business accounting system. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0076",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_registry_sourced": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the profile came from a registry rather than self-report. Retain any subsequent user edits in field provenance.",
            "x-field-id": "F0077",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "registry_retrieved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When registry evidence was obtained. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0078",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "last_annual_return_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date of annual corporate return filing when reported. Distinct from financial accounts and tax return filing dates.",
            "x-field-id": "F0079",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ownership_complete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the delivered ownership report meets the declared scope. Null if completeness cannot be established.",
            "x-field-id": "F0080",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "business",
        "description": "A legal organization or sole-proprietor business profile. Population depends on source and tenant entitlement."
      },
      "Person": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "person"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "given_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Given name as supplied or verified. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0081",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "middle_names": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Middle names when present. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0082",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "family_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Family name as supplied or verified. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0083",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full display name preserving local naming conventions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0084",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "date_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Birth date from authorized evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0085",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "nationalities": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Nationality country codes reported by source. Do not infer citizenship from address or birthplace.",
            "x-field-id": "F0086",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "residence_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current country of residence when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0087",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "addresses": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Address"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized address observations. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0088",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact email. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0089",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact telephone. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0090",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tax_identifier_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault reference for a permitted tax identifier. Default responses never include full SIN/SSN.",
            "x-field-id": "F0091",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occupation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Occupation provided for the declared workflow. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0092",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verification_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Most recent relevant verification session. Do not replace historic sessions.",
            "x-field-id": "F0093",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "person",
        "description": "Individual applicant, owner, officer, guarantor or authorized party. Population depends on source and tenant entitlement."
      },
      "Relationship": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "relationship"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "from_entity_id": {
            "type": "string",
            "description": "Entity at the source of the relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0094",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "to_entity_id": {
            "type": "string",
            "description": "Entity at the target of the relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0095",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "relationship_type": {
            "$ref": "#/components/schemas/Enum_relationship_type",
            "description": "Meaning and direction of the link. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0096",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "ownership_ratio": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact ownership share when supplied. Fraction 0 to 1; never convert an ownership band to an exact share.",
            "x-field-id": "F0097",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ownership_band_min": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Lower bound of an ownership band. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0098",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ownership_band_max": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Upper bound of an ownership band. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0099",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "voting_ratio": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Voting rights as a share of total rights. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0100",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_ultimate_owner": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the source resolves this party as ultimate owner. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0101",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "control_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence of control beyond share ownership. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0102",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "valid_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Relationship start date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0103",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "valid_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Relationship end date if known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0104",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Documents establishing the relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0105",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "AMLOK match confidence only when a calibrated model produces it. 0 to 1; not a legal ownership determination.",
            "x-field-id": "F0106",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_review_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human review of the relationship evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0107",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "from_entity_id",
          "to_entity_id",
          "relationship_type"
        ],
        "title": "relationship",
        "description": "Directed, evidenced link between two entities. Population depends on source and tenant entitlement."
      },
      "Verification": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "verification"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verification_type": {
            "type": "string",
            "description": "Verification purpose, such as KYC or KYB. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0108",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "provider_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream session identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0109",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_verification_status",
            "description": "Normalized verification state. Preserve the upstream status and individual check results.",
            "x-field-id": "F0110",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "raw_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact upstream verification status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0111",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "workflow_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or AMLOK verification configuration version. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0112",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "hosted_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time-limited applicant verification link. Use only provider-approved domains; never persist public credentials.",
            "x-field-id": "F0113",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Session link or verification expiry, when explicitly defined. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0114",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the verification reached its current completed result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0115",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "check_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Individual checks comprising the result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0116",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "warnings": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider warnings preserved with context. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0117",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_reason_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Reasons for required review. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0118",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "decision_actor_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the result was automated or manually reviewed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0119",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "report_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stored verification report. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0120",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "parent_verification_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent KYB session for a related person's check. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0121",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          },
          "subject_association_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "verification_type",
          "status",
          "stop_reason",
          "processing_context",
          "subject_association_version"
        ],
        "title": "verification",
        "description": "KYC or KYB session and its aggregate result. Population depends on source and tenant entitlement."
      },
      "VerificationCheck": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "verification_check"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verification_id": {
            "type": "string",
            "description": "Verification containing this check. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0122",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "check_type": {
            "type": "string",
            "description": "Specific feature run by the provider. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0123",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_check_status",
            "description": "Normalized outcome of this check. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0124",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "raw_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unmodified provider result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0125",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document, database, biometric, registry or other method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0126",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence document for this check. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0127",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identity document type when relevant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0128",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_number_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault reference for document number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0129",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_number_masked": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Masked identifier safe for the caller's scope. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0130",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issuing_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Country issuing the identity evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0131",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issue_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document issue date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0132",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expiry_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document expiry date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0133",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported name match result. Null if not tested; do not derive from overall approval.",
            "x-field-id": "F0134",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "date_of_birth_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported date-of-birth match result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0135",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "address_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported address match result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0136",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "liveness_result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_check_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Liveness feature outcome if run. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0137",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "face_match_score": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-native face match score. Retain score scale and version; never assume probability.",
            "x-field-id": "F0138",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "score_scale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Published interpretation and range of the provider score. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0139",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "warnings": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Feature-specific warnings. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0140",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "checked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the feature executed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0141",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "verification_id",
          "check_type",
          "status"
        ],
        "title": "verification_check",
        "description": "Individual document, biometric, address, registry or contact check. Population depends on source and tenant entitlement."
      },
      "ScreeningMatch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "screening_match"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verification_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Session associated with the screening result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0142",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "screening_type": {
            "$ref": "#/components/schemas/Enum_screening_type",
            "description": "Screening category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0143",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "list_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the dataset or watchlist. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0144",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "list_record_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier in the source dataset. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0145",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "matched_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name on the potential matching record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0146",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "aliases": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Known aliases of the source entry. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0147",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "countries": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Jurisdictions associated with the entry. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0148",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "match_score": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-native similarity measure. Scale and algorithm must be supplied; not a guilt probability.",
            "x-field-id": "F0149",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "score_scale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Score range and interpretation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0150",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "disposition": {
            "$ref": "#/components/schemas/Enum_match_disposition",
            "description": "Review outcome for this potential match. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0151",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "reason_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence driving match or review. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0152",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference supporting the screening result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0153",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "listed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Listing date when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0154",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "screened_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Screening execution time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0155",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time of analyst disposition. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0156",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reviewer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized reviewer identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0157",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "screening_type",
          "disposition"
        ],
        "title": "screening_match",
        "description": "Candidate watchlist, sanctions, PEP or adverse-media match. Population depends on source and tenant entitlement."
      },
      "Document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "document"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_type": {
            "$ref": "#/components/schemas/Enum_document_type",
            "description": "Category of evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0158",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "file_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original or normalized file name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0159",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "mime_type": {
            "type": "string",
            "description": "Validated media type. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0160",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "byte_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "File size in bytes. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0161",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Checksum of the retained evidence bytes. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0162",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "storage_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque controlled evidence reference. No permanent public object-store URL.",
            "x-field-id": "F0163",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "First date covered by the document. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0164",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last date covered by the document, inclusive. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0165",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issued_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Issue date printed on the document. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0166",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issuer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document issuer. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0167",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "page_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Number of pages. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0168",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extraction_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "pending",
                  "running",
                  "completed",
                  "partial",
                  "failed",
                  "cancelled"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "extraction_model_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Version of parser or extraction model. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0170",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extraction_confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibrated extraction quality when available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0171",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_review_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human validation of extracted evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0172",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "retention_policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Applicable configured retention policy. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0173",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "document_type",
          "mime_type",
          "stop_reason"
        ],
        "title": "document",
        "description": "Evidence file metadata and extraction context. Population depends on source and tenant entitlement."
      },
      "BankAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "bank_account"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "connection_id": {
            "type": "string",
            "description": "Authorized bank connection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0175",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream account identifier within its connection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0176",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Account name supplied by institution or holder. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0177",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "official_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution's official account product name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0178",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_type": {
            "$ref": "#/components/schemas/Enum_account_type",
            "description": "Broad financial account class. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0179",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "account_subtype": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Detailed subtype with preserved raw value. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0180",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ownership_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_account_ownership"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business, personal, joint or trust classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0181",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "institution_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the institution holding the account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0182",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution jurisdiction established by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0183",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-supplied masked account suffix. May be 2 to 4 characters; not a unique key.",
            "x-field-id": "F0184",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Currency of the account balance. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0185",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "holder_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Names returned by an entitled ownership product. Account ownership data is not automatically a completed KYC check.",
            "x-field-id": "F0186",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "holder_entity_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Resolved AMLOK holders. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0187",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_closed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit account closure indicator. Disappearance from an API response alone does not prove closure.",
            "x-field-id": "F0188",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "opened_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Account opening date when actually returned. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0189",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "closed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit closure date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0190",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution routing identifier, when entitled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0191",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "branch_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Branch or transit identifier, when entitled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0192",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_number_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault reference for the full account number. Raw account numbers require a separately authorized product and scope.",
            "x-field-id": "F0193",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "connection_id",
          "account_type"
        ],
        "title": "bank_account",
        "description": "Permissioned bank, credit or loan account identity. Population depends on source and tenant entitlement."
      },
      "AccountBalance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "account_balance"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_id": {
            "type": "string",
            "description": "Account for the balance. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0194",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "current": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current balance reported by the institution. Amount in major currency units. Positive depository amounts are assets; positive loan/credit amounts normally represent debt.",
                "x-field-id": "F0195",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for current. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0196",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "available": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Funds available under the institution's calculation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0197",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for available. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0198",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "credit_limit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Authorized credit or overdraft limit where explicitly reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0199",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for credit limit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0200",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "balance_basis": {
            "$ref": "#/components/schemas/Enum_balance_basis",
            "description": "Whether current balance represents an asset or liability. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0201",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "as_of": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source balance timestamp if supplied. Never substitute ingestion time as a source balance timestamp.",
            "x-field-id": "F0202",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "retrieved_at": {
            "type": "string",
            "format": "date-time",
            "description": "AMLOK balance retrieval time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0203",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "is_realtime": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether this observation was retrieved by a verified live-balance route. Cached account responses are not real-time.",
            "x-field-id": "F0204",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "date_basis": {
            "$ref": "#/components/schemas/Enum_balance_date_basis",
            "description": "How balance timing was established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0205",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "account_id",
          "balance_basis",
          "retrieved_at",
          "date_basis"
        ],
        "title": "account_balance",
        "description": "Timestamped balance snapshot; asset and liability meanings remain explicit. Population depends on source and tenant entitlement."
      },
      "BankTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "bank_transaction"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_id": {
            "type": "string",
            "description": "Financial account carrying the transaction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0206",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider transaction identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0207",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Absolute transaction magnitude. Amount in major currency units. Nonnegative; direction is separate. Preserve original signed amount in provenance.",
                "x-field-id": "F0208",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0209",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "direction": {
            "$ref": "#/components/schemas/Enum_direction",
            "description": "Movement into or out of the financial account. For Plaid Transactions invert sign semantics; do not apply this rule to Plaid Income.",
            "x-field-id": "F0210",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_transaction_status",
            "description": "Pending, posted or removed state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0211",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "posted_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date the institution posted the transaction. For pending transactions leave null if only an occurrence date is known.",
            "x-field-id": "F0212",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "authorized_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date payment was authorized or initiated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0213",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occurred_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Timestamp of the transaction event if supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0214",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Transaction description supplied by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0215",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Merchant or counterparty label supplied by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0216",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "AMLOK counterparty resolved with evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0217",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_cashflow_category"
              },
              {
                "type": "null"
              }
            ],
            "description": "AMLOK cash-flow classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0218",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider's original category label/code. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0219",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "category_confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibrated classification confidence if available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0220",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source payment channel. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0221",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_category_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported merchant category code. Four-character string; not equivalent to NAICS.",
            "x-field-id": "F0222",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "pending_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earlier pending record superseded by this posting. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0223",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "related_transfer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched internal-transfer pair when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0224",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_internal_transfer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether evidence establishes movement between the subject's own accounts. Unknown is null, not false.",
            "x-field-id": "F0225",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_reversal": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether explicitly reversed or linked to a reversing record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0226",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reverses_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original transaction reversed by this one. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0227",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "running_balance": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source-reported balance immediately after the transaction. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0228",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for running balance. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0229",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "location": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported physical transaction location. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0230",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "check_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cheque number where explicitly reported. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0231",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "account_id",
          "direction",
          "status"
        ],
        "title": "bank_transaction",
        "description": "One movement on one financial account; no automatic cross-source deduplication. Population depends on source and tenant entitlement."
      },
      "RecurringStream": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "recurring_stream"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_id": {
            "type": "string",
            "description": "Account for the recurring stream. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0232",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "direction": {
            "$ref": "#/components/schemas/Enum_direction",
            "description": "Expected account movement direction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0233",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Description of the recurring pattern. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0234",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Resolved counterparty when available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0235",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_frequency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Observed or provider-reported cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0236",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "average_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Average amount over the stated observation interval. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0237",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for average amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0238",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "last_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Most recent observed amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0239",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for last amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0240",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "first_seen_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "First supporting transaction date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0241",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "last_seen_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Most recent supporting transaction date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0242",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "next_expected_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Predicted next occurrence date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0243",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "transaction_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting transaction records. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0244",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the stream remains active under its declared method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0245",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "method_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or AMLOK pattern method version. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0246",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "account_id",
          "direction"
        ],
        "title": "recurring_stream",
        "description": "Evidence-based grouping of repeated inflows or outflows. Population depends on source and tenant entitlement."
      },
      "IncomeObservation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "income_observation"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "person_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Person associated with the income evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0247",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "income_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Employer or other origin reported by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0248",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "income_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Wages, benefits, business income or other source category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0249",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "gross_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross income before deductions, only when established. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0250",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for gross amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0251",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "net_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Net amount received for the stated period. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0252",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for net amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0253",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inclusive income period start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0254",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inclusive income period end. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0255",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_frequency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Income payment cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0256",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_level": {
            "$ref": "#/components/schemas/Enum_evidence_level",
            "description": "Whether the amount is reported, extracted or inferred. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0257",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "transaction_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting bank transactions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0258",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting income evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0259",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time of verification, if a verification actually occurred. Bank deposit classification alone is not payroll-verified gross income.",
            "x-field-id": "F0260",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "evidence_level"
        ],
        "title": "income_observation",
        "description": "Income evidence from an entitled income product or an explicitly labeled inference. Population depends on source and tenant entitlement."
      },
      "MerchantAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "merchant_account"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "connection_id": {
            "type": "string",
            "description": "Provider connection for the merchant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0261",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "merchant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider merchant identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0262",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Merchant name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0263",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "processor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment processor or acquirer name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0264",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Merchant account jurisdiction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0265",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "settlement_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Settlement currency. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0266",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider merchant account status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0267",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "settlement_schedule": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported settlement cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0268",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payout_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched bank destination account when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0269",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reserve_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Provider-reported withheld reserve. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0270",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for reserve amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0271",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "reserve_policy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reserve terms when explicitly provided. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0272",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "connection_id"
        ],
        "title": "merchant_account",
        "description": "Merchant processing relationship and settlement context. Population depends on source and tenant entitlement."
      },
      "Payment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "payment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Merchant processing account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0273",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related commerce order when matched. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0274",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related commercial counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0275",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_payment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream payment identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0276",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_payment_status",
            "description": "Normalized payment state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0277",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross payment amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0278",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0279",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "captured_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount captured by the merchant. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0280",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for captured amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0281",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "refunded_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cumulative refund amount in the payment's currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0282",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for refunded amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0283",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fee_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Provider-reported fee attributable to this payment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0284",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fee amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0285",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "net_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Provider-reported net settlement contribution. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0286",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for net amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0287",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "method_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment method category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0288",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "card_brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Card network if supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0289",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "card_last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last four digits only, when required for the workflow. Never expose PAN, CVV or magnetic-stripe data.",
            "x-field-id": "F0290",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "authorized_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorization timestamp. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0291",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "captured_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Capture timestamp. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0292",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "settled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Settlement timestamp when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0293",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sanitized failure reason. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0294",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payout_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payout containing this payment if the source supplies a linkage. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0295",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "status"
        ],
        "title": "payment",
        "description": "Payment authorization, capture or collection record. Population depends on source and tenant entitlement."
      },
      "ProcessorTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "processor_transaction"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_account_id": {
            "type": "string",
            "description": "Merchant balance associated with this event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0296",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider ledger-event identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0297",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "event_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider ledger type, such as charge, refund or payout. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0298",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "gross": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Signed gross processor-balance movement. Amount in major currency units. Positive increases balance; retain source semantics in mapping.",
                "x-field-id": "F0299",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for gross. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0300",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fee": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Fee assessed by the processor for this event. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0301",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fee. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0302",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "net": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Signed net balance impact. Amount in major currency units. For Stripe balance transactions, net equals amount minus fee.",
                "x-field-id": "F0303",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for net. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0304",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "reporting_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider accounting classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0305",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "availability_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider fund availability state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0306",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "available_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date funds become available in the processor balance. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0307",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occurred_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider ledger-event creation time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0308",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_object_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream object linked to this event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0309",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized payment link when resolved. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0310",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "merchant_account_id"
        ],
        "title": "processor_transaction",
        "description": "Ledger event on a processor balance, separate from bank movements. Population depends on source and tenant entitlement."
      },
      "Payout": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "payout"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_account_id": {
            "type": "string",
            "description": "Merchant account initiating settlement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0311",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_payout_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider payout identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0312",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_payout_status",
            "description": "Normalized settlement state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0313",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "gross": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross settled amount before deductions, if separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0314",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for gross. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0315",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fees": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Settlement deductions explicitly identified as fees. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0316",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fees. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0317",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "net": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount remitted to the destination. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0318",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for net. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0319",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "created_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payout initiation date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0320",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expected_arrival_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expected arrival, if provided. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0321",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported completion time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0322",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "destination_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched destination bank account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0323",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matching deposit or debit record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0324",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reconciliation_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_reconciliation_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Match state between settlement and bank movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0325",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider failure reason if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0326",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "merchant_account_id",
          "status"
        ],
        "title": "payout",
        "description": "Settlement from a processor or marketplace to a destination account. Population depends on source and tenant entitlement."
      },
      "Refund": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "refund"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_id": {
            "type": "string",
            "description": "Original payment being refunded. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0327",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related order when known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0328",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Refund magnitude, nonnegative. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0329",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0330",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or mapped refund status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0331",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Refund reason supplied by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0332",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "requested_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Refund initiation time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0333",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Completion time if confirmed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0334",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "processor_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ledger event representing the refund. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0335",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "payment_id"
        ],
        "title": "refund",
        "description": "Return of money linked to a payment or order. Population depends on source and tenant entitlement."
      },
      "Dispute": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "dispute"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_id": {
            "type": "string",
            "description": "Disputed payment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0336",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Disputed amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0337",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0338",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or network dispute category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0339",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_dispute_status",
            "description": "Dispute process state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0340",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "opened_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Dispute opening time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0341",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "response_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-specified evidence deadline. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0342",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Dispute closure time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0343",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_submitted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether a response was submitted. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0344",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "fee_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Dispute fee if separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0345",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fee amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0346",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "payment_id",
          "status"
        ],
        "title": "dispute",
        "description": "Chargeback or payment dispute and its evidence deadlines. Population depends on source and tenant entitlement."
      },
      "Counterparty": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "counterparty"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_type": {
            "type": "string",
            "description": "Customer, supplier or both. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0347",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commercial record's display name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0348",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legal name when explicitly provided. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0349",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "resolved_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched AMLOK business or person. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0350",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized contact email. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0351",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized contact number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0352",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Billing address used by the source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0353",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "shipping_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Shipping address used by the source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0354",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tax_identifier_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault reference for a tax identifier when permitted. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0355",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual payment term where supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0356",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "credit_limit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source-managed trade-credit limit. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0357",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for credit limit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0358",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit active status in the source system. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0359",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "counterparty_type"
        ],
        "title": "counterparty",
        "description": "Customer or supplier in a commercial source system; not automatically a verified legal entity. Population depends on source and tenant entitlement."
      },
      "Order": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "order"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "order_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable order reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0360",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider order identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0361",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchasing counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0362",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Store or sales location. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0363",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sales channel or marketplace. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0364",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_order_status",
            "description": "Order lifecycle state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0365",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "payment_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commercial order payment state from source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0366",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "fulfillment_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_fulfillment_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Order fulfillment progress. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0367",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "placed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Order creation or placement time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0368",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cancellation time when cancelled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0369",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "subtotal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Line subtotal before tax under the specified source convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0370",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for subtotal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0371",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "discount_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Discounts applied to the order. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0372",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for discount total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0373",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "tax_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Tax attributed to the order. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0374",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for tax total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0375",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "shipping_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Shipping charged on the order. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0376",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for shipping total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0377",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Original total including taxes and discounts, before subsequent returns. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0378",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0379",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "current_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current adjusted order total after changes under source semantics. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0380",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for current total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0381",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "refunded_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cumulative refunded order amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0382",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for refunded total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0383",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "presentment_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Currency shown to the buyer. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0384",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "taxes_included": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether listed prices already include tax. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0385",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_test": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit test-order indicator. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0386",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized order lines. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0387",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "status"
        ],
        "title": "order",
        "description": "Commercial sale order with amounts distinct from payment and accounting revenue. Population depends on source and tenant entitlement."
      },
      "OrderLine": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "order_line"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "order_id": {
            "type": "string",
            "description": "Parent order. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0388",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized product reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0389",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source stock-keeping unit. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0390",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line item label. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0391",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity ordered. Units must be interpreted with unit_of_measure.",
            "x-field-id": "F0392",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit used for quantity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0393",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_price": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Price per unit under source tax convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0394",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unit price. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0395",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "discount_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Line discount amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0396",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for discount amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0397",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "tax_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Line tax amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0398",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for tax amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0399",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "line_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Extended line total with stated tax convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0400",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for line total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0401",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "quantity_fulfilled": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity fulfilled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0402",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity_refunded": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity returned or refunded when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0403",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "order_id"
        ],
        "title": "order_line",
        "description": "Product or service line belonging to an order. Population depends on source and tenant entitlement."
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "subscription"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "customer_id": {
            "type": "string",
            "description": "Subscriber counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0404",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Recurring product or plan. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0405",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider subscription status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0406",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_frequency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual billing cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0407",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "recurring_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current recurring charge for one billing cycle. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0408",
                "x-classification": "Confidential",
                "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for recurring amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0409",
                "x-classification": "Confidential",
                "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
              }
            }
          },
          "started_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contract start date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0410",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "current_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Start of current billing period. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0411",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "current_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "End of current billing period, exclusive. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0412",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "cancelled_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cancellation date when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0413",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "next_billing_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next scheduled charge date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0414",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "customer_id"
        ],
        "title": "subscription",
        "description": "Recurring commercial contract when the source exposes subscription records. Population depends on source and tenant entitlement."
      },
      "LedgerAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "ledger_account"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source account code. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0415",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Account label. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0416",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_type": {
            "$ref": "#/components/schemas/Enum_gl_type",
            "description": "AMLOK accounting classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0417",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_account_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unmodified source account classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0418",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "parent_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent in the chart of accounts. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0419",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "normal_balance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_debit_credit"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normal ledger balance direction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0420",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Account-specific currency if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0421",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit chart-of-accounts active state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0422",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_trust_account": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether account holds third-party trust money. Do not include client trust balances in available operating liquidity.",
            "x-field-id": "F0423",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "account_type"
        ],
        "title": "ledger_account",
        "description": "Chart-of-accounts entry and classification. Population depends on source and tenant entitlement."
      },
      "Journal": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "journal"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "journal_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source journal reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0424",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "posted_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Accounting posting date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0425",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Journal narrative. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0426",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source posting state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0427",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_document_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Originating record type. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0428",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized originating transaction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0429",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reverses_journal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Journal being reversed if supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0430",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Journal lines belonging to this posting. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0431",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "journal",
        "description": "Accounting posting header or source journal entry. Population depends on source and tenant entitlement."
      },
      "JournalLine": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "journal_line"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "journal_id": {
            "type": "string",
            "description": "Parent posting. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0432",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "ledger_account_id": {
            "type": "string",
            "description": "Affected ledger account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0433",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "debit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Debit amount; nonnegative. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0434",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for debit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0435",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "credit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credit amount; nonnegative. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0436",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for credit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0437",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "base_debit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Debit in the company's reporting currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0438",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for base debit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0439",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "base_credit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credit in the company's reporting currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0440",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for base credit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0441",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line narrative. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0442",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source department or dimension. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0443",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Project/job reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0444",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commercial party if linked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0445",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "journal_id",
          "ledger_account_id"
        ],
        "title": "journal_line",
        "description": "One debit or credit posting to a ledger account. Population depends on source and tenant entitlement."
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "invoice"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Printable document number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0446",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "type": "string",
            "description": "Customer for invoices or supplier for bills. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0447",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "issued_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document issue date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0448",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual payment due date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0449",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_invoice_status",
            "description": "Normalized receivable/payable state. Do not infer void status solely from a zero balance.",
            "x-field-id": "F0450",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "subtotal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount before tax under the source convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0451",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for subtotal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0452",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "tax_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total tax charged. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0453",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for tax total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0454",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Document total including tax. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0455",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0456",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Outstanding document amount after source-applied allocations. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0457",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0458",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_paid": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Payments applied, where separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0459",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount paid. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0460",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_credited": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credits or prepayments applied, separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0461",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount credited. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0462",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fully_paid_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date full payment was completed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0463",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual term when explicitly reported. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0464",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_items": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceLine"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Itemized quantities, prices, account codes and tax amounts. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0465",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence document for the record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0466",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "home_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total translated to the ledger's home currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0467",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for home total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0468",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Home-currency units per document-currency unit. Use source rate and effective date; do not silently reverse the quote.",
            "x-field-id": "F0469",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "counterparty_id",
          "status"
        ],
        "title": "invoice",
        "description": "Accounts receivable invoice; sale made on credit. Population depends on source and tenant entitlement."
      },
      "Bill": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "bill"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Printable document number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0470",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "type": "string",
            "description": "Customer for invoices or supplier for bills. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0471",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "issued_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document issue date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0472",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual payment due date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0473",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_invoice_status",
            "description": "Normalized receivable/payable state. Do not infer void status solely from a zero balance.",
            "x-field-id": "F0474",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "subtotal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount before tax under the source convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0475",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for subtotal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0476",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "tax_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total tax charged. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0477",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for tax total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0478",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Document total including tax. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0479",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0480",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Outstanding document amount after source-applied allocations. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0481",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0482",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_paid": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Payments applied, where separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0483",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount paid. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0484",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_credited": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credits or prepayments applied, separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0485",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount credited. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0486",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fully_paid_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date full payment was completed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0487",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual term when explicitly reported. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0488",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_items": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceLine"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Itemized quantities, prices, account codes and tax amounts. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0489",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence document for the record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0490",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "home_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total translated to the ledger's home currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0491",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for home total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0492",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Home-currency units per document-currency unit. Use source rate and effective date; do not silently reverse the quote.",
            "x-field-id": "F0493",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "counterparty_id",
          "status"
        ],
        "title": "bill",
        "description": "Accounts payable invoice; amount owed to a supplier. Population depends on source and tenant entitlement."
      },
      "CreditNote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "credit_note"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credit note reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0494",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "type": "string",
            "description": "Customer or supplier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0495",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related receivable if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0496",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bill_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related payable if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0497",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issued_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credit note date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0498",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source credit note state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0499",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Absolute credit note amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0500",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0501",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "remaining_credit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credit still available for allocation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0502",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for remaining credit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0503",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source adjustment explanation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0504",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "counterparty_id"
        ],
        "title": "credit_note",
        "description": "Adjustment reducing a receivable or payable. Population depends on source and tenant entitlement."
      },
      "AccountingPayment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "accounting_payment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Customer or supplier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0505",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "direction": {
            "$ref": "#/components/schemas/Enum_direction",
            "description": "Receipt or disbursement from the business perspective. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0506",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total allocated cash payment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0507",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0508",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "paid_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Accounting payment date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0509",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched financial account when known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0510",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ledger_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ledger cash or clearing account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0511",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "allocations": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Allocation"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Amounts allocated to invoices, bills or credits. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0512",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched financial-account movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0513",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reconciliation_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_reconciliation_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "State of matching ledger payment to bank movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0514",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "direction"
        ],
        "title": "accounting_payment",
        "description": "Ledger allocation of a customer receipt or supplier payment. Population depends on source and tenant entitlement."
      },
      "FinancialStatement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "financial_statement"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "statement_type": {
            "$ref": "#/components/schemas/Enum_statement_type",
            "description": "Financial report kind. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0515",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Start of reporting period for flow statements. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0516",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "description": "Inclusive reporting end or balance-sheet date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0517",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "accounting_basis": {
            "$ref": "#/components/schemas/Enum_accounting_basis",
            "description": "Cash or accrual basis. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0518",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "currency": {
            "type": "string",
            "description": "Presentation currency of the report. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0519",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "is_consolidated": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether multiple legal entities are consolidated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0520",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_audited": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether an audit opinion is actually evidenced. Software-generated reports are not automatically audited.",
            "x-field-id": "F0521",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_report_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the upstream report. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0522",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "generated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source report generation time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0523",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence copy of the statement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0524",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Standardized report lines. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0525",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "statement_type",
          "period_end",
          "accounting_basis",
          "currency"
        ],
        "title": "financial_statement",
        "description": "Financial report with explicit period, basis and source. Population depends on source and tenant entitlement."
      },
      "StatementLine": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "statement_line"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "statement_id": {
            "type": "string",
            "description": "Parent financial statement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0526",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "line_code": {
            "type": "string",
            "description": "AMLOK normalized statement concept. Mapping depends on account chart and reporting basis.",
            "x-field-id": "F0527",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original report line label. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0528",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "parent_line_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent subtotal or grouping line. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0529",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Reported line amount in statement currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0530",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0531",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "is_total": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether this line is a subtotal or total. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0532",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ledger_account_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Accounts contributing to the line when exposed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0533",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "mapping_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How source lines were assigned to the normalized concept. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0534",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "statement_id",
          "line_code"
        ],
        "title": "statement_line",
        "description": "One classified line of a financial report. Population depends on source and tenant entitlement."
      },
      "TaxObligation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "tax_obligation"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tax_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Jurisdiction-specific tax category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0535",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Relevant taxing jurisdiction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0536",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tax reporting period start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0537",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tax reporting period end. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0538",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment or filing deadline when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0539",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "amount_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Reported tax payable. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0540",
                "x-classification": "Confidential",
                "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0541",
                "x-classification": "Confidential",
                "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
              }
            }
          },
          "amount_paid": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Recorded payment against the obligation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0542",
                "x-classification": "Confidential",
                "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount paid. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0543",
                "x-classification": "Confidential",
                "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
              }
            }
          },
          "filing_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-reported filing status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0544",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "filed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual filing date when evidenced. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0545",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting return or receipt. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0546",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "tax_obligation",
        "description": "Tax payable or reported obligation from an accounting system or supplied return. Population depends on source and tenant entitlement."
      },
      "Product": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "product"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stock-keeping identifier within the source tenant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0547",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product or service name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0548",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source item description. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0549",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Goods, service, bundle or source-specific category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0550",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product category supplied by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0551",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Base stock unit. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0552",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source active status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0553",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_inventory_tracked": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether source maintains stock quantities. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0554",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source carrying cost per unit; not market value. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0555",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unit cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0556",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "sale_price": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current catalog selling price; not realized revenue. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0557",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for sale price. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0558",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "costing_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source valuation policy. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0559",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "barcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Barcode or GTIN when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0560",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "supplier_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Preferred supplier counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0561",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "product",
        "description": "Catalog item or inventory SKU with ownership and costing context. Population depends on source and tenant entitlement."
      },
      "Location": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "location"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location display name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0562",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "location_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Warehouse, store, branch or source-specific type. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0563",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Physical location address. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0564",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location active state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0565",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "owner_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Owner or operator if established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0566",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "IANA timezone used for operational dates. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0567",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "location",
        "description": "Store, warehouse, branch or operating location. Population depends on source and tenant entitlement."
      },
      "InventoryBalance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "inventory_balance"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_id": {
            "type": "string",
            "description": "Item represented by the stock balance. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0568",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Warehouse or store holding the stock. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0569",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "owner_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Entity owning the stock, distinct from its custodian. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0570",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "ownership_type": {
            "$ref": "#/components/schemas/Enum_stock_ownership",
            "description": "Owned, consigned or third-party stock. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0571",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "quantity_on_hand": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Physical stock recorded at the observation time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0572",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "quantity_available": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-defined unreserved quantity available to sell. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0573",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "quantity_reserved": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity committed or allocated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0574",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "quantity_on_order": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity expected from purchase orders. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0575",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit for all quantities on this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0576",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "carrying_value": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Book valuation of the represented stock. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0577",
                "x-classification": "Confidential",
                "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for carrying value. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0578",
                "x-classification": "Confidential",
                "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
              }
            }
          },
          "unit_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Unit valuation used for this snapshot. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0579",
                "x-classification": "Confidential",
                "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unit cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0580",
                "x-classification": "Confidential",
                "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
              }
            }
          },
          "costing_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source costing policy. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0581",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "lot_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Batch or lot identifier when tracked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0582",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "serial_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit serial number when tracked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0583",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "expiry_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product or lot expiry date when tracked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0584",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "as_of": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time represented by the stock observation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0585",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "product_id",
          "ownership_type"
        ],
        "title": "inventory_balance",
        "description": "Quantity and value snapshot by item, location and owner. Population depends on source and tenant entitlement."
      },
      "InventoryMovement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "inventory_movement"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_id": {
            "type": "string",
            "description": "Affected item. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0586",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location affected by this movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0587",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "movement_type": {
            "$ref": "#/components/schemas/Enum_movement_type",
            "description": "Reason for stock movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0588",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "quantity_delta": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Signed change in stock at this location. Positive adds stock; negative removes stock.",
            "x-field-id": "F0589",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit for quantity_delta. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0590",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occurred_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Operational event time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0591",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cost per unit recorded for the movement. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0592",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unit cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0593",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Signed carrying-value change associated with movement. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0594",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0595",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related sales order if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0596",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "purchase_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related purchase order if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0597",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "transfer_pair_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Correlation between paired inter-location movements. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0598",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting receipt or adjustment evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0599",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "product_id",
          "movement_type"
        ],
        "title": "inventory_movement",
        "description": "A receipt, issue, transfer or adjustment to stock. Population depends on source and tenant entitlement."
      },
      "PurchaseOrder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "purchase_order"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchase order number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0600",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "supplier_id": {
            "type": "string",
            "description": "Supplier commercial counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0601",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_purchase_status",
            "description": "Purchase order state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0602",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "ordered_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchase order date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0603",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expected_delivery_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expected receipt date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0604",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Ordered value under source tax convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0605",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0606",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_received": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Value of goods or services received if reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0607",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount received. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0608",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "line_items": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PurchaseLine"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Ordered and received quantities, prices and item references. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0609",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Receiving location. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0610",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "supplier_id",
          "status"
        ],
        "title": "purchase_order",
        "description": "Supplier purchase commitment, separate from invoices and cash payments. Population depends on source and tenant entitlement."
      },
      "Shipment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "shipment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "direction": {
            "type": "string",
            "description": "Inbound receipt or outbound dispatch. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0611",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related sales order. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0612",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "purchase_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related purchase order for inbound receipts. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0613",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Origin or receiving warehouse. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0614",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source shipment state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0615",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Logistics carrier when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0616",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tracking_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source tracking reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0617",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "shipped_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Dispatch time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0618",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Confirmed delivery time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0619",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_items": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ShipmentLine"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Product quantities shipped or received. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0620",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "direction"
        ],
        "title": "shipment",
        "description": "Physical receipt or dispatch linked to orders and stock. Population depends on source and tenant entitlement."
      },
      "ProductionOrder": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "production_order"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Production or work order identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0621",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Finished item to produce. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0622",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_manufacturing_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Manufacturing work order state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0623",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity_planned": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Target output quantity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0624",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity_completed": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Recorded good output quantity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0625",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity_scrapped": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Recorded scrapped output quantity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0626",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit for output quantities. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0627",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "planned_start_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled work start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0628",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "planned_end_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled completion. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0629",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual completion date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0630",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "material_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Material cost incurred under source accounting. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0631",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for material cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0632",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "labor_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Labor cost charged to the work order. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0633",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for labor cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0634",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "overhead_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Overhead assigned by the source. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0635",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for overhead cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0636",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "work_in_progress_value": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source carrying value of incomplete production. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0637",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for work in progress value. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0638",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "production_order",
        "description": "Manufacturing work order when licensed ERP/MES modules expose it. Population depends on source and tenant entitlement."
      },
      "Project": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "project"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source project or job identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0639",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Project name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0640",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Customer commissioning the project. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0641",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_project_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Project execution state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0642",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "started_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual or reported start date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0643",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expected_end_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current expected completion date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0644",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "contract_value": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current contract amount, where supplied. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0645",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for contract value. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0646",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "budget_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Approved cost budget. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0647",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for budget cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0648",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "actual_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cost posted to the project to date. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0649",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for actual cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0650",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_billed": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cumulative invoicing assigned to the project. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0651",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount billed. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0652",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "retainage_receivable": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Contractually withheld receivable if exposed. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0653",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for retainage receivable. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0654",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "percent_complete": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-reported completion fraction. 0 to 1; retain method; billed fraction is not physical completion.",
            "x-field-id": "F0655",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "project",
        "description": "Construction or service job with cost and billing information. Population depends on source and tenant entitlement."
      },
      "Application": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "application"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "applicant_entity_id": {
            "type": "string",
            "description": "Business or person applying for credit. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0656",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "product_type": {
            "$ref": "#/components/schemas/Enum_credit_product",
            "description": "Requested financial product. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0657",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_application_status",
            "description": "Application state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0658",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "requested_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Requested principal or limit. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0659",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for requested amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0660",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "requested_term_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Requested contractual term in months. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0661",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Declared use of funds. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0662",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Application submission time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0663",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "decision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current decision artifact. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0664",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Resulting funded loan when one exists. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0665",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "guarantor_entity_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Proposed guarantors. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0666",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "collateral_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Offered collateral. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0667",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Submitted application evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0668",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Broker, direct, embedded or other source channel. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0669",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "institution_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lender's application reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0670",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "applicant_entity_id",
          "product_type",
          "status"
        ],
        "title": "application",
        "description": "Credit request and its lifecycle. Population depends on source and tenant entitlement."
      },
      "CreditFacility": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "credit_facility"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "borrower_entity_id": {
            "type": "string",
            "description": "Obligated borrower. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0671",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "product_type": {
            "$ref": "#/components/schemas/Enum_credit_product",
            "description": "Facility product. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0672",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contract currency. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0673",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "approved_limit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current approved facility limit. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0674",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for approved limit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0675",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "drawn_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Outstanding utilization reported by source. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0676",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for drawn amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0677",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "available_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Undrawn availability under the contract. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0678",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for available amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0679",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "committed_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Committed portion of the facility. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0680",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for committed amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0681",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "effective_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Facility effective date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0682",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "maturity_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual end date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0683",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next scheduled credit review. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0684",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source facility state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0685",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Individual loans or draws governed by the facility. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0686",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "covenant_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual monitoring covenants. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0687",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "borrower_entity_id",
          "product_type"
        ],
        "title": "credit_facility",
        "description": "Approved credit agreement and aggregate exposure. Population depends on source and tenant entitlement."
      },
      "Loan": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "loan"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "borrower_entity_id": {
            "type": "string",
            "description": "Primary borrower. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0688",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Originating application if available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0689",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "facility_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent facility if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0690",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_type": {
            "$ref": "#/components/schemas/Enum_credit_product",
            "description": "Credit product type. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0691",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_loan_status",
            "description": "Servicing lifecycle state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0692",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "original_principal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Principal at origination. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0693",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for original principal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0694",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "outstanding_principal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Principal still owed as of the balance date. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0695",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for outstanding principal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0696",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "accrued_interest": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Accrued unpaid interest separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0697",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for accrued interest. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0698",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fees_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Unpaid fees separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0699",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fees due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0700",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total_payoff": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source payoff quote including its calculation date. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0701",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total payoff. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0702",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "annual_interest_rate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual annual rate expressed as a fraction. 9.5 percent is 0.095; not automatically APR.",
            "x-field-id": "F0703",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "apr": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Disclosed APR if explicitly supplied. Do not relabel nominal rate as APR.",
            "x-field-id": "F0704",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "rate_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_rate_type"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fixed or variable interest arrangement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0705",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "benchmark": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference rate for variable pricing. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0706",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "spread": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Margin above benchmark, as a fraction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0707",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "interest_day_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual day-count convention. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0708",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_frequency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled payment cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0709",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "scheduled_payment": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current regular installment amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0710",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for scheduled payment. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0711",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "funded_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Initial funding date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0712",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "maturity_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contract maturity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0713",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "next_payment_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next due installment date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0714",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "days_past_due": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source days-past-due under its servicing policy. Preserve policy and as-of date; no automatic recalculation from one missed item.",
            "x-field-id": "F0715",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "past_due_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Contractual amount overdue. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0716",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for past due amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0717",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "charged_off_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount written off by the lender. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0718",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for charged off amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0719",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date represented by balances and delinquency status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0720",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "autopay_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-reported authorized automatic repayment setting. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0721",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "borrower_entity_id",
          "product_type",
          "status",
          "as_of"
        ],
        "title": "loan",
        "description": "Loan contract and current servicing state. Population depends on source and tenant entitlement."
      },
      "Installment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "installment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "type": "string",
            "description": "Parent loan. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0722",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "sequence_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contract schedule sequence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0723",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "due_on": {
            "type": "string",
            "format": "date",
            "description": "Installment due date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0724",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "principal_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Principal due for this installment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0725",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for principal due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0726",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "interest_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Interest due for this installment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0727",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for interest due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0728",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fees_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Fees due for this installment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0729",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fees due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0730",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total contractual obligation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0731",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0732",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_paid": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Applied repayments against this obligation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0733",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount paid. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0734",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "remaining_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Unpaid scheduled obligation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0735",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for remaining due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0736",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_repayment_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Schedule or repayment state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0737",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "loan_id",
          "due_on"
        ],
        "title": "installment",
        "description": "One scheduled repayment obligation. Population depends on source and tenant entitlement."
      },
      "Repayment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "repayment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "type": "string",
            "description": "Loan receiving the repayment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0738",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "installment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled obligation if explicitly linked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0739",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_repayment_status",
            "description": "Payment execution state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0740",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total repayment amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0741",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0742",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "principal_applied": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount applied to principal. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0743",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for principal applied. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0744",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "interest_applied": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount applied to interest. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0745",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for interest applied. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0746",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fees_applied": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount applied to fees. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0747",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fees applied. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0748",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "unapplied_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cash received but not yet allocated. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0749",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unapplied amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0750",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "received_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time funds were received. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0751",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Servicing value date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0752",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment rail or method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0753",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Return or failure reason when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0754",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched bank movement when authorized. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0755",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reverses_repayment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Repayment reversed by this event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0756",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "loan_id",
          "status"
        ],
        "title": "repayment",
        "description": "A servicing payment event and its allocation. Population depends on source and tenant entitlement."
      },
      "Collateral": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "collateral"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Loan secured or proposed to be secured. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0757",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "facility_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related credit facility. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0758",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "collateral_type": {
            "$ref": "#/components/schemas/Enum_collateral_type",
            "description": "Asset class. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0759",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Description identifying the pledged asset. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0760",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "owner_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Owner evidenced for the asset. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0761",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "serial_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Equipment or asset serial number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0762",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "vin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vehicle identification number when relevant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0763",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "property_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Land parcel or title identifier when relevant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0764",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location or real-property address. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0765",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "valuation": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Value established by a specified valuation source. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0766",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for valuation. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0767",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "valuation_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date of the valuation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0768",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "valuation_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Appraisal, book value or other stated method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0769",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "appraiser": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Appraiser or valuation provider. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0770",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "lien_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Related registrations or filings. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0771",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "advance_rate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Lender-approved fraction eligible for borrowing base. Contract parameter, not inferred from a registry filing.",
            "x-field-id": "F0772",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "insurance_expiry_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expiry of supporting insurance evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0773",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "collateral_type"
        ],
        "title": "collateral",
        "description": "Asset pledged or proposed to secure an obligation. Population depends on source and tenant entitlement."
      },
      "Guarantee": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "guarantee"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Guaranteed loan. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0774",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "facility_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Guaranteed facility. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0775",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "guarantor_entity_id": {
            "type": "string",
            "description": "Person or entity providing the guarantee. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0776",
            "x-classification": "Restricted",
            "x-availability": "Required when resource exists"
          },
          "guarantee_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_guarantee_type"
              },
              {
                "type": "null"
              }
            ],
            "description": "Nature of the guarantee. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0777",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "maximum_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Explicit guarantee cap, if applicable. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0778",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for maximum amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0779",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "signed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Execution date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0780",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expires_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual expiry if one exists. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0781",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Executed guarantee evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0782",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "guarantor_entity_id"
        ],
        "title": "guarantee",
        "description": "Documented personal or corporate guarantee. Population depends on source and tenant entitlement."
      },
      "Covenant": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "covenant"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "facility_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Facility subject to this covenant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0783",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Loan subject to this covenant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0784",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "type": "string",
            "description": "Covenant label. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0785",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "attribute_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Metric used by the test. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0786",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "operator": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Comparison operator. Allowed: gt, gte, lt, lte, eq; compare only compatible types and units.",
            "x-field-id": "F0787",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "threshold": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual threshold. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0788",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "threshold_unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit of threshold. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0789",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "observed_value": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Value evaluated on this test date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0790",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "observed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date the covenant was evaluated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0791",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_covenant_status",
            "description": "Test outcome under the agreement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0792",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "waived_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Documented waiver expiry. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0793",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Agreement or waiver establishing the rule. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0794",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "name",
          "status"
        ],
        "title": "covenant",
        "description": "Contractual test with a versioned threshold and observed result. Population depends on source and tenant entitlement."
      },
      "Decision": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "decision"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credit application assessed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0795",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing loan being reassessed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0796",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "outcome": {
            "$ref": "#/components/schemas/Enum_decision_outcome",
            "description": "Recorded outcome or recommendation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0797",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "is_recommendation": {
            "type": "boolean",
            "description": "True if this is advisory and not an executed lender decision. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0798",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution policy applied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0799",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Policy revision applied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0800",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "approved_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Approved or recommended amount with actor context. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0801",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for approved amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0802",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "approved_term_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Approved or recommended term. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0803",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reason_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Structured reasons supporting the outcome. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0804",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "conditions": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Conditions that must be satisfied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0805",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "attribute_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable risk evidence used in decisioning. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0806",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "actor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution user, service or agent responsible. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0807",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "decided_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Decision timestamp. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0808",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "supersedes_decision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earlier decision superseded by this one. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0809",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "outcome",
          "is_recommendation"
        ],
        "title": "decision",
        "description": "Versioned lender decision or AMLOK recommendation with attributable evidence. Population depends on source and tenant entitlement."
      },
      "LienSearch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "lien_search"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "debtor_name": {
            "type": "string",
            "description": "Exact debtor name submitted for search. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0810",
            "x-classification": "Restricted",
            "x-availability": "Required when resource exists"
          },
          "debtor_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Resolved AMLOK debtor entity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0811",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "debtor_type": {
            "$ref": "#/components/schemas/Enum_party_type",
            "description": "Person or business search subject. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0812",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "search_type": {
            "type": "string",
            "description": "Name, registration number, VIN or serial search when supported. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0813",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Search identifier if the chosen mode requires it. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0814",
            "x-classification": "Restricted",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "jurisdictions_requested": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Jurisdictions explicitly requested. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0815",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "jurisdictions_completed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Jurisdictions actually completed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0816",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_search_status",
            "description": "Search execution state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0817",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "searched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider search execution time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0818",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "effective_through": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry's stated effective coverage time. Unknown does not mean current to the request time.",
            "x-field-id": "F0819",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "is_certified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether an official certified search was returned. API search output is not automatically certified.",
            "x-field-id": "F0820",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "search_logic": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or registry matching method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0821",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "result_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Number of returned filings within completed scope. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0822",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "lien_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized filing results. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0823",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "report_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original report or certificate. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0824",
            "x-classification": "Restricted",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "debtor_name",
          "debtor_type",
          "search_type",
          "jurisdictions_requested",
          "jurisdictions_completed",
          "status",
          "stop_reason",
          "processing_context"
        ],
        "title": "lien_search",
        "description": "A search request with explicit debtor, jurisdiction and coverage. Population depends on source and tenant entitlement."
      },
      "Lien": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "lien"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "search_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Search that returned this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0825",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "filing_number": {
            "type": "string",
            "description": "Registry-assigned filing or registration number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0826",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "original_filing_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Initial registration in the filing chain. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0827",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "lien_type": {
            "$ref": "#/components/schemas/Enum_lien_type",
            "description": "Legal registry category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0828",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "jurisdiction": {
            "type": "string",
            "description": "Filing jurisdiction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0829",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "registry_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry of record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0830",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_lien_status",
            "description": "Source-supported registration state. Status is not a legal determination of enforceability or priority.",
            "x-field-id": "F0831",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "raw_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unmodified registry or provider status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0832",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "filed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filing or registration date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0833",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "lapse_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported lapse date, if known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0834",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "terminated_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported termination or discharge date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0835",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "debtors": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LienParty"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Debtors exactly as recorded, including unresolved parties. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0836",
            "x-classification": "Restricted",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "secured_parties": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LienParty"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Secured parties exactly as recorded. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0837",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "collateral_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry's collateral text when available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0838",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "collateral_categories": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Source or reviewed collateral classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0839",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "is_blanket_lien": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether evidence supports an all-assets description. Null if collateral text is unavailable or ambiguous.",
            "x-field-id": "F0840",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "registered_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount explicitly recorded by the registry, where applicable. Amount in major currency units. A UCC filing often has no debt amount; never treat missing amount as zero.",
                "x-field-id": "F0841",
                "x-classification": "Confidential",
                "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for registered amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0842",
                "x-classification": "Confidential",
                "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
              }
            }
          },
          "currency_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Meaning of registered amount and currency as stated by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0843",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Images or reports supporting the filing. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0844",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "match_disposition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_match_disposition"
              },
              {
                "type": "null"
              }
            ],
            "description": "Debtor identity review result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0845",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "priority_assessment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Separately reviewed priority conclusion, if commissioned. Never infer legal priority from filing date alone.",
            "x-field-id": "F0846",
            "x-classification": "Restricted",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "filing_number",
          "lien_type",
          "jurisdiction",
          "status"
        ],
        "title": "lien",
        "description": "A security registration or other lien record from a stated registry. Population depends on source and tenant entitlement."
      },
      "FilingEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "filing_event"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "lien_id": {
            "type": "string",
            "description": "Registration chain affected. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0847",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "event_type": {
            "$ref": "#/components/schemas/Enum_filing_event_type",
            "description": "Type of filing event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0848",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "filing_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the specific event filing. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0849",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Effective or recorded filing date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0850",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "previous_filing_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Prior linked filing identifier if provided. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0851",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "new_lapse_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated lapse date explicitly reported after this event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0852",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source event narrative. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0853",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence image or filing document. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0854",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "lien_id",
          "event_type"
        ],
        "title": "filing_event",
        "description": "Amendment, continuation, assignment or termination in a registration chain. Population depends on source and tenant entitlement."
      },
      "Attribute": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "attribute"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "key": {
            "type": "string",
            "description": "Stable attribute name defined in Derived Attributes. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0855",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "value_type": {
            "$ref": "#/components/schemas/Enum_value_type",
            "description": "Type of the value. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0856",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Serialized scalar value matching value_type. Null if required inputs or coverage are missing.",
            "x-field-id": "F0857",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit": {
            "type": "string",
            "description": "Currency, ratio, days, count or other explicit unit. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0858",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_metric_status",
            "description": "Whether this value is usable for its stated interval. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0859",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "window_start": {
            "type": "string",
            "format": "date",
            "description": "Inclusive measurement interval start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0860",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "window_end": {
            "type": "string",
            "format": "date",
            "description": "Exclusive measurement interval end. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0861",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "Latest evidence included in calculation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0862",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "calculation_version": {
            "type": "string",
            "description": "Versioned formula or feature definition. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0863",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "input_resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Supporting records or immutable manifest reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0864",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "coverage_ratio": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Fraction of expected time/account coverage actually available. 0 to 1; null when denominator cannot be defined.",
            "x-field-id": "F0865",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "missing_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_null_reason"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reason value is null. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0866",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "provider_score_scale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Native scale for licensed scores, if relevant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0867",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "key",
          "value_type",
          "unit",
          "status",
          "window_start",
          "window_end",
          "as_of",
          "calculation_version",
          "input_resource_ids"
        ],
        "title": "attribute",
        "description": "Computed or provider-supplied risk attribute with transparent inputs. Population depends on source and tenant entitlement."
      },
      "RiskSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "risk_snapshot"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "assessment_type": {
            "type": "string",
            "description": "Assessment purpose or workflow. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0868",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "Evidence cutoff used by this assessment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0869",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "attribute_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Values used in the assessment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0870",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "previous_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earlier comparable assessment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0871",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Model used if a score was generated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0872",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "model_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact model revision. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0873",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "score": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Model-specific score; unavailable until model is validated and entitled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0874",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "score_scale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Meaning and allowed range of the model score. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0875",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "rating": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Policy-specific risk category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0876",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reason_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Explanatory factors tied to evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0877",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_manifest_id": {
            "type": "string",
            "description": "Immutable list of input record versions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0878",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "workflow_run_id": {
            "type": "string",
            "minLength": 1
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_usage_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "assessment_type",
          "as_of",
          "attribute_ids",
          "evidence_manifest_id",
          "workflow_run_id",
          "application_id",
          "billing_usage_id"
        ],
        "title": "risk_snapshot",
        "description": "Immutable assessment at a point in time, preserving subsequent changes separately. Population depends on source and tenant entitlement."
      },
      "Monitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "monitor"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "baseline_snapshot_id": {
            "type": "string",
            "description": "Original assessment used for change detection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0879",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resource_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Resources monitored under this subscription. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0880",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "attribute_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tracked calculated attributes. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0881",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_monitor_status",
            "description": "Monitoring subscription state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0882",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "cadence": {
            "type": "string",
            "description": "Requested refresh schedule, subject to source capability. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0883",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "ruleset_version": {
            "type": "string",
            "description": "Version of alert thresholds and conditions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0884",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "last_evaluated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest successful evaluation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0885",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "next_evaluation_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next planned evaluation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0886",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "insufficient_credits",
                  "workload_limit_exceeded",
                  "missing_evidence",
                  "consent_unavailable"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "monitoring_period_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "baseline_snapshot_id",
          "resource_types",
          "attribute_keys",
          "status",
          "cadence",
          "ruleset_version",
          "blocked_reason",
          "monitoring_period_id"
        ],
        "title": "monitor",
        "description": "Configured monitoring scope, baseline and refresh policy. Population depends on source and tenant entitlement."
      },
      "Alert": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "alert"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "monitor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Monitoring configuration generating the alert. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0887",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "alert_type": {
            "type": "string",
            "description": "Versioned signal key. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0888",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "severity": {
            "$ref": "#/components/schemas/Enum_severity",
            "description": "Policy-assigned severity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0889",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_alert_status",
            "description": "System-derived signal state. Open until comparable fresh evidence shows the triggering condition has cleared. No acknowledgement, case or borrower-contact workflow."
          },
          "detected_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the signal was detected. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0891",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "baseline_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference assessment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0892",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "current_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Assessment showing the change. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0893",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "attribute_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Metric underlying the signal. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0894",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "previous_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Prior comparable scalar value. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0895",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "current_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current comparable scalar value. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0896",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "threshold": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rule threshold that was crossed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0897",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence-based explanation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0898",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting records or documents. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0899",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the alert was resolved or dismissed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0901",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "alert_type",
          "severity",
          "status",
          "detected_at"
        ],
        "title": "alert",
        "description": "Material change or risk signal with evidence and review state. Population depends on source and tenant entitlement."
      },
      "WorkflowRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "workflow_run"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "workflow_type": {
            "$ref": "#/components/schemas/Enum_workflow_type",
            "description": "Risk workflow category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0946",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "workflow_version": {
            "type": "string",
            "description": "Version of the orchestration definition. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0947",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_workflow_status",
            "description": "Execution state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0948",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Application context if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0949",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Loan context if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0950",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "input_resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Immutable input references. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0951",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "output_resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Produced assessments, checks, risk findings or reports. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0952",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Execution start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0954",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Terminal completion time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0955",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "parent_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Run that triggered this one, such as Monitor re-entering Underwrite. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0956",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product": {
            "type": "string",
            "enum": [
              "insights",
              "signal"
            ]
          },
          "input_manifest_id": {
            "type": "string",
            "minLength": 1
          },
          "initial_input_manifest_id": {
            "type": "string",
            "minLength": 1
          },
          "workload_id": {
            "type": "string",
            "minLength": 1
          },
          "billing_usage_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "monitoring_period_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "insufficient_credits",
                  "workload_limit_exceeded",
                  "missing_evidence"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProcessingFailure"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempt": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "workflow_type",
          "workflow_version",
          "status",
          "input_resource_ids",
          "output_resource_ids",
          "product",
          "input_manifest_id",
          "initial_input_manifest_id",
          "workload_id",
          "billing_usage_id",
          "monitoring_period_id",
          "blocked_reason",
          "stop_reason",
          "failure",
          "attempt"
        ],
        "title": "workflow_run",
        "description": "Coordinated execution of Verify, Underwrite, Monitor or Investigate. Population depends on source and tenant entitlement.",
        "allOf": [
          {
            "if": {
              "properties": {
                "status": {
                  "const": "failed"
                }
              },
              "required": [
                "status"
              ]
            },
            "then": {
              "properties": {
                "failure": {
                  "$ref": "#/components/schemas/ProcessingFailure"
                },
                "billing_usage_id": {
                  "type": "null"
                },
                "output_resource_ids": {
                  "maxItems": 0
                }
              }
            },
            "else": {
              "properties": {
                "failure": {
                  "type": "null"
                }
              }
            }
          }
        ]
      },
      "Requirement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "requirement"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "workflow_run_id": {
            "type": "string",
            "description": "Run requiring this evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0958",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "requirement_type": {
            "type": "string",
            "description": "Requested evidence category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0959",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "description": {
            "type": "string",
            "description": "Specific evidence requirement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0960",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_requirement_status",
            "description": "Collection and review status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0961",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Requested completion date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0962",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence submitted for this requirement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0963",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reviewer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reviewer accepting or rejecting evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0964",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "waiver_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Documented basis for a permitted waiver. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0965",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "rejection": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvidenceRejection"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "workflow_run_id",
          "requirement_type",
          "description",
          "status",
          "rejection"
        ],
        "title": "requirement",
        "description": "Evidence required to complete an assessment workflow. Population depends on source and tenant entitlement.",
        "allOf": [
          {
            "if": {
              "properties": {
                "status": {
                  "const": "rejected"
                }
              },
              "required": [
                "status"
              ]
            },
            "then": {
              "properties": {
                "rejection": {
                  "$ref": "#/components/schemas/EvidenceRejection"
                }
              }
            },
            "else": {
              "properties": {
                "rejection": {
                  "type": "null"
                }
              }
            }
          }
        ]
      },
      "AuditEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "audit_event"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "actor_id": {
            "type": "string",
            "description": "User, API client or agent responsible. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0966",
            "x-classification": "Restricted",
            "x-availability": "Required when resource exists"
          },
          "actor_type": {
            "type": "string",
            "description": "Class of principal. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0967",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "action": {
            "type": "string",
            "description": "Action performed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0968",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resource_type": {
            "type": "string",
            "description": "Type of affected object. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0969",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resource_id": {
            "type": "string",
            "description": "Affected object. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0970",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resource_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Version observed or produced. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0971",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "Action timestamp. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0972",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "request_id": {
            "type": "string",
            "description": "Request correlation identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0973",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "workflow_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related orchestration run. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0974",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "outcome": {
            "type": "string",
            "description": "Success, denial or failure result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0975",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "change_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Description of changed fields without sensitive raw values. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0976",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "actor_id",
          "actor_type",
          "action",
          "resource_type",
          "resource_id",
          "occurred_at",
          "request_id",
          "outcome"
        ],
        "title": "audit_event",
        "description": "Append-only record of actions, versions and access. Population depends on source and tenant entitlement."
      },
      "ReconciliationLink": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "reconciliation_link"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "from_resource_type": {
            "type": "string",
            "description": "Source side of the reconciliation relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0977",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "from_resource_id": {
            "type": "string",
            "description": "Record being linked or allocated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0978",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "to_resource_type": {
            "type": "string",
            "description": "Target side of the relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0979",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "to_resource_id": {
            "type": "string",
            "description": "Record receiving the linkage or allocation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0980",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "link_type": {
            "type": "string",
            "description": "Relationship such as settlement, payment_allocation or duplicate_evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0981",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "allocated_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount attributed to this linkage where the relationship is monetary. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0982",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for allocated amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0983",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "status": {
            "$ref": "#/components/schemas/Enum_reconciliation_status",
            "description": "Matching/reconciliation state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0984",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "method_version": {
            "type": "string",
            "description": "Version of deterministic or reviewed match process. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0985",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibrated probabilistic match confidence if used. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0986",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_review_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human disposition of uncertain matches. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0987",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version",
          "from_resource_type",
          "from_resource_id",
          "to_resource_type",
          "to_resource_id",
          "link_type",
          "status",
          "method_version"
        ],
        "title": "reconciliation_link",
        "description": "Evidence-based allocation connecting records without collapsing distinct economic events. Population depends on source and tenant entitlement."
      },
      "ConnectionRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "connection"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "provider_id": {
            "type": "string",
            "description": "Integration catalog identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0017",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "provider_tenant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque external organization or item identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0018",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_connection_status",
            "description": "Current connection usability. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0019",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "institution_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-specific institution identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0020",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "institution_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution display name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0021",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution country when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0022",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "products": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Data products enabled for this connection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0023",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Granted read/write entitlements. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0024",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "consent_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Consent record authorizing the connection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0025",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "last_successful_sync_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest fully successful retrieval. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0026",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "next_refresh_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled next refresh if known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0027",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "history_available_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earliest date actually returned for the selected resource. Do not infer from a provider's maximum advertised history.",
            "x-field-id": "F0028",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reauth_required_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When renewed user authorization became necessary. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0029",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "error_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sanitized connection error code. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0030",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "sync_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque AMLOK change cursor for authorized synchronization. Never expose a provider secret or access token.",
            "x-field-id": "F0031",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ConnectionRead",
        "description": "One authorized link to a provider tenant or financial institution. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ConsentRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "consent"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "subject_type": {
            "$ref": "#/components/schemas/Enum_party_type",
            "description": "Whether the authorization concerns a business or person. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0032",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_consent_status",
            "description": "Recorded authorization state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0033",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "purposes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Documented purposes for processing the linked data. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0034",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Permitted data and actions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0035",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "granted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time authorization was granted. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0036",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expiry when the authorization specifies one. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0037",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Revocation time if revoked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0038",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "policy_version": {
            "type": "string",
            "description": "Version of the text or authority recorded. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0039",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "evidence_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stored evidence of authorization. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0040",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "authorized_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Person or client principal granting authorization. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0041",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ConsentRead",
        "description": "Authorization and permitted use linked to a subject and client. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "SyncJobRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "sync_job"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "connection_id": {
            "type": "string",
            "description": "Connection being synchronized. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0042",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Requested resource types. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0043",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_sync_status",
            "description": "Ingestion run state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0044",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Processing start time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0045",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Completion or terminal failure time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0046",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "requested_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inclusive source date requested. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0047",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "requested_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exclusive source date requested. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0048",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "records_added": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "New records accepted. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0049",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "records_updated": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing records revised. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0050",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "records_removed": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstones processed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0051",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "coverage_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earliest successfully retrieved date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0052",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "coverage_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exclusive end of successfully retrieved interval. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0053",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "errors": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Error"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Per-resource retrieval or validation failures. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0054",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "SyncJobRead",
        "description": "Bounded ingestion run, including partial results and source outages. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "BusinessRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "business"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name recorded as the legal business name. Retain accents and source spelling; normalized matching key is separate.",
            "x-field-id": "F0055",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "trade_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Trading or DBA names separately identified by the source. Do not split an unstructured list without evidence.",
            "x-field-id": "F0056",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "former_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Historical legal names explicitly identified by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0057",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "registration_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Company or registry registration identifier. Preserve leading zeroes and jurisdiction-specific punctuation.",
            "x-field-id": "F0058",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "registration_jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry jurisdiction for the identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0059",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "incorporation_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Country of formation. Normalize documented alpha-3 source codes to alpha-2 using a versioned lookup.",
            "x-field-id": "F0060",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "incorporation_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legal formation date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0061",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "legal_form": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source legal form, normalized only where an approved mapping exists. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0062",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "legal_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_legal_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry legal standing category. Active does not imply solvency or all compliance obligations satisfied.",
            "x-field-id": "F0063",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "raw_legal_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unmodified status supplied by the registry. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0064",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tax_identifiers": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Identifier"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Jurisdiction-qualified business tax identifiers. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0065",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "lei": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legal Entity Identifier when assigned. Do not invent an LEI from a registration number.",
            "x-field-id": "F0066",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "registered_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registered office address. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0067",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "operating_addresses": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Address"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Known trading or operating locations. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0068",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "website": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business website reported by a source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0069",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business contact email. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0070",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business contact telephone. E.164 when parseable with country context; otherwise preserve raw value.",
            "x-field-id": "F0071",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "industry_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/IndustryCode"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Classification codes with explicit taxonomy and version. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0072",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "business_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source description of business activity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0073",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "employee_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Employee count reported for the stated observation date. Registry or source observation; not a live payroll count.",
            "x-field-id": "F0074",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "fiscal_year_end": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fiscal year-end month and day. MM-DD; not a financial statement date.",
            "x-field-id": "F0075",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reporting_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Home currency of the business accounting system. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0076",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_registry_sourced": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the profile came from a registry rather than self-report. Retain any subsequent user edits in field provenance.",
            "x-field-id": "F0077",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "registry_retrieved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "When registry evidence was obtained. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0078",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "last_annual_return_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date of annual corporate return filing when reported. Distinct from financial accounts and tax return filing dates.",
            "x-field-id": "F0079",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ownership_complete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the delivered ownership report meets the declared scope. Null if completeness cannot be established.",
            "x-field-id": "F0080",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "BusinessRead",
        "description": "A legal organization or sole-proprietor business profile. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "PersonRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "person"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "given_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Given name as supplied or verified. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0081",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "middle_names": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Middle names when present. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0082",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "family_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Family name as supplied or verified. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0083",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "full_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Full display name preserving local naming conventions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0084",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "date_of_birth": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Birth date from authorized evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0085",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "nationalities": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Nationality country codes reported by source. Do not infer citizenship from address or birthplace.",
            "x-field-id": "F0086",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "residence_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current country of residence when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0087",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "addresses": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Address"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized address observations. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0088",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact email. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0089",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contact telephone. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0090",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tax_identifier_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault reference for a permitted tax identifier. Default responses never include full SIN/SSN.",
            "x-field-id": "F0091",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occupation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Occupation provided for the declared workflow. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0092",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verification_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Most recent relevant verification session. Do not replace historic sessions.",
            "x-field-id": "F0093",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "PersonRead",
        "description": "Individual applicant, owner, officer, guarantor or authorized party. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "RelationshipRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "relationship"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "from_entity_id": {
            "type": "string",
            "description": "Entity at the source of the relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0094",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "to_entity_id": {
            "type": "string",
            "description": "Entity at the target of the relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0095",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "relationship_type": {
            "$ref": "#/components/schemas/Enum_relationship_type",
            "description": "Meaning and direction of the link. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0096",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "ownership_ratio": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact ownership share when supplied. Fraction 0 to 1; never convert an ownership band to an exact share.",
            "x-field-id": "F0097",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ownership_band_min": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Lower bound of an ownership band. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0098",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ownership_band_max": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Upper bound of an ownership band. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0099",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "voting_ratio": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Voting rights as a share of total rights. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0100",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_ultimate_owner": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the source resolves this party as ultimate owner. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0101",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "control_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence of control beyond share ownership. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0102",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "valid_from": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Relationship start date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0103",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "valid_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Relationship end date if known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0104",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Documents establishing the relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0105",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "AMLOK match confidence only when a calibrated model produces it. 0 to 1; not a legal ownership determination.",
            "x-field-id": "F0106",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_review_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human review of the relationship evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0107",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "RelationshipRead",
        "description": "Directed, evidenced link between two entities. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "VerificationRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "verification"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verification_type": {
            "type": "string",
            "description": "Verification purpose, such as KYC or KYB. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0108",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "provider_session_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream session identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0109",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_verification_status",
            "description": "Normalized verification state. Preserve the upstream status and individual check results.",
            "x-field-id": "F0110",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "raw_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact upstream verification status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0111",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "workflow_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or AMLOK verification configuration version. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0112",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "hosted_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time-limited applicant verification link. Use only provider-approved domains; never persist public credentials.",
            "x-field-id": "F0113",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Session link or verification expiry, when explicitly defined. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0114",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the verification reached its current completed result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0115",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "check_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Individual checks comprising the result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0116",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "warnings": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider warnings preserved with context. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0117",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_reason_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Reasons for required review. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0118",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "decision_actor_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the result was automated or manually reviewed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0119",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "report_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stored verification report. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0120",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "parent_verification_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent KYB session for a related person's check. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0121",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          },
          "subject_association_version": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "VerificationRead",
        "description": "KYC or KYB session and its aggregate result. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "VerificationCheckRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "verification_check"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verification_id": {
            "type": "string",
            "description": "Verification containing this check. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0122",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "check_type": {
            "type": "string",
            "description": "Specific feature run by the provider. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0123",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_check_status",
            "description": "Normalized outcome of this check. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0124",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "raw_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unmodified provider result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0125",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document, database, biometric, registry or other method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0126",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence document for this check. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0127",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identity document type when relevant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0128",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_number_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault reference for document number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0129",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_number_masked": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Masked identifier safe for the caller's scope. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0130",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issuing_country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Country issuing the identity evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0131",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issue_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document issue date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0132",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expiry_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document expiry date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0133",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported name match result. Null if not tested; do not derive from overall approval.",
            "x-field-id": "F0134",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "date_of_birth_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported date-of-birth match result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0135",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "address_match": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported address match result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0136",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "liveness_result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_check_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Liveness feature outcome if run. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0137",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "face_match_score": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-native face match score. Retain score scale and version; never assume probability.",
            "x-field-id": "F0138",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "score_scale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Published interpretation and range of the provider score. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0139",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "warnings": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Feature-specific warnings. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0140",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "checked_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the feature executed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0141",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "VerificationCheckRead",
        "description": "Individual document, biometric, address, registry or contact check. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ScreeningMatchRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "screening_match"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verification_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Session associated with the screening result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0142",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "screening_type": {
            "$ref": "#/components/schemas/Enum_screening_type",
            "description": "Screening category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0143",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "list_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the dataset or watchlist. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0144",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "list_record_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier in the source dataset. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0145",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "matched_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name on the potential matching record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0146",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "aliases": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Known aliases of the source entry. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0147",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "countries": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Jurisdictions associated with the entry. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0148",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "match_score": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-native similarity measure. Scale and algorithm must be supplied; not a guilt probability.",
            "x-field-id": "F0149",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "score_scale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Score range and interpretation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0150",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "disposition": {
            "$ref": "#/components/schemas/Enum_match_disposition",
            "description": "Review outcome for this potential match. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0151",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "reason_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence driving match or review. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0152",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference supporting the screening result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0153",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "listed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Listing date when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0154",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "screened_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Screening execution time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0155",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time of analyst disposition. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0156",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reviewer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized reviewer identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0157",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ScreeningMatchRead",
        "description": "Candidate watchlist, sanctions, PEP or adverse-media match. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "DocumentRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "document"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_type": {
            "$ref": "#/components/schemas/Enum_document_type",
            "description": "Category of evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0158",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "file_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original or normalized file name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0159",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "mime_type": {
            "type": "string",
            "description": "Validated media type. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0160",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "byte_size": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "File size in bytes. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0161",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Checksum of the retained evidence bytes. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0162",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "storage_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Opaque controlled evidence reference. No permanent public object-store URL.",
            "x-field-id": "F0163",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "First date covered by the document. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0164",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last date covered by the document, inclusive. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0165",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issued_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Issue date printed on the document. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0166",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issuer": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document issuer. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0167",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "page_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Number of pages. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0168",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extraction_status": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "pending",
                  "running",
                  "completed",
                  "partial",
                  "failed",
                  "cancelled"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "extraction_model_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Version of parser or extraction model. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0170",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extraction_confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibrated extraction quality when available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0171",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_review_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human validation of extracted evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0172",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "retention_policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Applicable configured retention policy. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0173",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "DocumentRead",
        "description": "Evidence file metadata and extraction context. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "BankAccountRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "bank_account"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "connection_id": {
            "type": "string",
            "description": "Authorized bank connection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0175",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream account identifier within its connection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0176",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Account name supplied by institution or holder. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0177",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "official_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution's official account product name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0178",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_type": {
            "$ref": "#/components/schemas/Enum_account_type",
            "description": "Broad financial account class. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0179",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "account_subtype": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Detailed subtype with preserved raw value. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0180",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ownership_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_account_ownership"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business, personal, joint or trust classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0181",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "institution_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the institution holding the account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0182",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution jurisdiction established by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0183",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "mask": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-supplied masked account suffix. May be 2 to 4 characters; not a unique key.",
            "x-field-id": "F0184",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Currency of the account balance. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0185",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "holder_names": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Names returned by an entitled ownership product. Account ownership data is not automatically a completed KYC check.",
            "x-field-id": "F0186",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "holder_entity_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Resolved AMLOK holders. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0187",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_closed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit account closure indicator. Disappearance from an API response alone does not prove closure.",
            "x-field-id": "F0188",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "opened_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Account opening date when actually returned. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0189",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "closed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit closure date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0190",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution routing identifier, when entitled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0191",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "branch_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Branch or transit identifier, when entitled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0192",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_number_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault reference for the full account number. Raw account numbers require a separately authorized product and scope.",
            "x-field-id": "F0193",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "BankAccountRead",
        "description": "Permissioned bank, credit or loan account identity. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "AccountBalanceRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "account_balance"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_id": {
            "type": "string",
            "description": "Account for the balance. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0194",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "current": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current balance reported by the institution. Amount in major currency units. Positive depository amounts are assets; positive loan/credit amounts normally represent debt.",
                "x-field-id": "F0195",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for current. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0196",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "available": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Funds available under the institution's calculation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0197",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for available. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0198",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "credit_limit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Authorized credit or overdraft limit where explicitly reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0199",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for credit limit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0200",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "balance_basis": {
            "$ref": "#/components/schemas/Enum_balance_basis",
            "description": "Whether current balance represents an asset or liability. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0201",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "as_of": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source balance timestamp if supplied. Never substitute ingestion time as a source balance timestamp.",
            "x-field-id": "F0202",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "retrieved_at": {
            "type": "string",
            "format": "date-time",
            "description": "AMLOK balance retrieval time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0203",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "is_realtime": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether this observation was retrieved by a verified live-balance route. Cached account responses are not real-time.",
            "x-field-id": "F0204",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "date_basis": {
            "$ref": "#/components/schemas/Enum_balance_date_basis",
            "description": "How balance timing was established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0205",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "AccountBalanceRead",
        "description": "Timestamped balance snapshot; asset and liability meanings remain explicit. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "BankTransactionRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "bank_transaction"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_id": {
            "type": "string",
            "description": "Financial account carrying the transaction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0206",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider transaction identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0207",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Absolute transaction magnitude. Amount in major currency units. Nonnegative; direction is separate. Preserve original signed amount in provenance.",
                "x-field-id": "F0208",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0209",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "direction": {
            "$ref": "#/components/schemas/Enum_direction",
            "description": "Movement into or out of the financial account. For Plaid Transactions invert sign semantics; do not apply this rule to Plaid Income.",
            "x-field-id": "F0210",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_transaction_status",
            "description": "Pending, posted or removed state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0211",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "posted_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date the institution posted the transaction. For pending transactions leave null if only an occurrence date is known.",
            "x-field-id": "F0212",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "authorized_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date payment was authorized or initiated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0213",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occurred_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Timestamp of the transaction event if supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0214",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Transaction description supplied by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0215",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Merchant or counterparty label supplied by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0216",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "AMLOK counterparty resolved with evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0217",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "category": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_cashflow_category"
              },
              {
                "type": "null"
              }
            ],
            "description": "AMLOK cash-flow classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0218",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider's original category label/code. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0219",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "category_confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibrated classification confidence if available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0220",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source payment channel. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0221",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_category_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported merchant category code. Four-character string; not equivalent to NAICS.",
            "x-field-id": "F0222",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "pending_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earlier pending record superseded by this posting. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0223",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "related_transfer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched internal-transfer pair when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0224",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_internal_transfer": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether evidence establishes movement between the subject's own accounts. Unknown is null, not false.",
            "x-field-id": "F0225",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_reversal": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether explicitly reversed or linked to a reversing record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0226",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reverses_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original transaction reversed by this one. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0227",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "running_balance": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source-reported balance immediately after the transaction. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0228",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for running balance. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0229",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "location": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported physical transaction location. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0230",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "check_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cheque number where explicitly reported. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0231",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "BankTransactionRead",
        "description": "One movement on one financial account; no automatic cross-source deduplication. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "RecurringStreamRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "recurring_stream"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_id": {
            "type": "string",
            "description": "Account for the recurring stream. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0232",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "direction": {
            "$ref": "#/components/schemas/Enum_direction",
            "description": "Expected account movement direction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0233",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Description of the recurring pattern. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0234",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Resolved counterparty when available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0235",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_frequency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Observed or provider-reported cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0236",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "average_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Average amount over the stated observation interval. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0237",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for average amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0238",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "last_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Most recent observed amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0239",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for last amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0240",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "first_seen_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "First supporting transaction date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0241",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "last_seen_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Most recent supporting transaction date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0242",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "next_expected_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Predicted next occurrence date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0243",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "transaction_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting transaction records. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0244",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether the stream remains active under its declared method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0245",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "method_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or AMLOK pattern method version. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0246",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "RecurringStreamRead",
        "description": "Evidence-based grouping of repeated inflows or outflows. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "IncomeObservationRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "income_observation"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "person_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Person associated with the income evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0247",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "income_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Employer or other origin reported by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0248",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "income_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Wages, benefits, business income or other source category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0249",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "gross_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross income before deductions, only when established. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0250",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for gross amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0251",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "net_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Net amount received for the stated period. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0252",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for net amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0253",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inclusive income period start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0254",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Inclusive income period end. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0255",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_frequency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Income payment cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0256",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_level": {
            "$ref": "#/components/schemas/Enum_evidence_level",
            "description": "Whether the amount is reported, extracted or inferred. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0257",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "transaction_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting bank transactions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0258",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting income evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0259",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "verified_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time of verification, if a verification actually occurred. Bank deposit classification alone is not payroll-verified gross income.",
            "x-field-id": "F0260",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "IncomeObservationRead",
        "description": "Income evidence from an entitled income product or an explicitly labeled inference. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "MerchantAccountRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "merchant_account"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "connection_id": {
            "type": "string",
            "description": "Provider connection for the merchant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0261",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "merchant_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider merchant identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0262",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Merchant name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0263",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "processor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment processor or acquirer name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0264",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "country": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Merchant account jurisdiction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0265",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "settlement_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Settlement currency. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0266",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider merchant account status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0267",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "settlement_schedule": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported settlement cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0268",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payout_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched bank destination account when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0269",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reserve_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Provider-reported withheld reserve. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0270",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for reserve amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0271",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "reserve_policy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reserve terms when explicitly provided. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0272",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "MerchantAccountRead",
        "description": "Merchant processing relationship and settlement context. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "PaymentRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "payment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Merchant processing account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0273",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related commerce order when matched. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0274",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related commercial counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0275",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_payment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream payment identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0276",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_payment_status",
            "description": "Normalized payment state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0277",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross payment amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0278",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0279",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "captured_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount captured by the merchant. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0280",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for captured amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0281",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "refunded_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cumulative refund amount in the payment's currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0282",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for refunded amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0283",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fee_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Provider-reported fee attributable to this payment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0284",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fee amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0285",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "net_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Provider-reported net settlement contribution. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0286",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for net amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0287",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "method_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment method category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0288",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "card_brand": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Card network if supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0289",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "card_last4": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Last four digits only, when required for the workflow. Never expose PAN, CVV or magnetic-stripe data.",
            "x-field-id": "F0290",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "authorized_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorization timestamp. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0291",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "captured_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Capture timestamp. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0292",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "settled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Settlement timestamp when established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0293",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sanitized failure reason. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0294",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payout_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payout containing this payment if the source supplies a linkage. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0295",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "PaymentRead",
        "description": "Payment authorization, capture or collection record. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ProcessorTransactionRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "processor_transaction"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_account_id": {
            "type": "string",
            "description": "Merchant balance associated with this event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0296",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider ledger-event identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0297",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "event_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider ledger type, such as charge, refund or payout. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0298",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "gross": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Signed gross processor-balance movement. Amount in major currency units. Positive increases balance; retain source semantics in mapping.",
                "x-field-id": "F0299",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for gross. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0300",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fee": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Fee assessed by the processor for this event. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0301",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fee. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0302",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "net": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Signed net balance impact. Amount in major currency units. For Stripe balance transactions, net equals amount minus fee.",
                "x-field-id": "F0303",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for net. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0304",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "reporting_category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider accounting classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0305",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "availability_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider fund availability state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0306",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "available_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date funds become available in the processor balance. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0307",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occurred_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider ledger-event creation time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0308",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_object_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Upstream object linked to this event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0309",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized payment link when resolved. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0310",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ProcessorTransactionRead",
        "description": "Ledger event on a processor balance, separate from bank movements. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "PayoutRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "payout"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "merchant_account_id": {
            "type": "string",
            "description": "Merchant account initiating settlement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0311",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_payout_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider payout identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0312",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_payout_status",
            "description": "Normalized settlement state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0313",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "gross": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Gross settled amount before deductions, if separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0314",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for gross. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0315",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fees": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Settlement deductions explicitly identified as fees. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0316",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fees. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0317",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "net": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount remitted to the destination. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0318",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for net. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0319",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "created_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payout initiation date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0320",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expected_arrival_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expected arrival, if provided. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0321",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "paid_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-reported completion time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0322",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "destination_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched destination bank account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0323",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matching deposit or debit record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0324",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reconciliation_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_reconciliation_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Match state between settlement and bank movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0325",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider failure reason if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0326",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "PayoutRead",
        "description": "Settlement from a processor or marketplace to a destination account. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "RefundRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "refund"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_id": {
            "type": "string",
            "description": "Original payment being refunded. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0327",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related order when known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0328",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Refund magnitude, nonnegative. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0329",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0330",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or mapped refund status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0331",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Refund reason supplied by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0332",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "requested_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Refund initiation time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0333",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Completion time if confirmed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0334",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "processor_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ledger event representing the refund. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0335",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "RefundRead",
        "description": "Return of money linked to a payment or order. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "DisputeRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "dispute"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_id": {
            "type": "string",
            "description": "Disputed payment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0336",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Disputed amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0337",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0338",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or network dispute category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0339",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_dispute_status",
            "description": "Dispute process state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0340",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "opened_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Dispute opening time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0341",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "response_due_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider-specified evidence deadline. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0342",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "closed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Dispute closure time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0343",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_submitted": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether a response was submitted. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0344",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "fee_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Dispute fee if separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0345",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fee amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0346",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "DisputeRead",
        "description": "Chargeback or payment dispute and its evidence deadlines. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "CounterpartyRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "counterparty"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_type": {
            "type": "string",
            "description": "Customer, supplier or both. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0347",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commercial record's display name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0348",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "legal_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Legal name when explicitly provided. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0349",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "resolved_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched AMLOK business or person. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0350",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized contact email. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0351",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "phone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Authorized contact number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0352",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "billing_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Billing address used by the source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0353",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "shipping_address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Shipping address used by the source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0354",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tax_identifier_token": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vault reference for a tax identifier when permitted. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0355",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual payment term where supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0356",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "credit_limit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source-managed trade-credit limit. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0357",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for credit limit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0358",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit active status in the source system. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0359",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "CounterpartyRead",
        "description": "Customer or supplier in a commercial source system; not automatically a verified legal entity. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "OrderRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "order"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "order_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human-readable order reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0360",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider order identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0361",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchasing counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0362",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Store or sales location. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0363",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sales channel or marketplace. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0364",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_order_status",
            "description": "Order lifecycle state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0365",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "payment_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commercial order payment state from source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0366",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "fulfillment_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_fulfillment_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Order fulfillment progress. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0367",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "placed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Order creation or placement time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0368",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "cancelled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cancellation time when cancelled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0369",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "subtotal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Line subtotal before tax under the specified source convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0370",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for subtotal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0371",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "discount_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Discounts applied to the order. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0372",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for discount total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0373",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "tax_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Tax attributed to the order. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0374",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for tax total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0375",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "shipping_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Shipping charged on the order. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0376",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for shipping total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0377",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Original total including taxes and discounts, before subsequent returns. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0378",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0379",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "current_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current adjusted order total after changes under source semantics. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0380",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for current total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0381",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "refunded_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cumulative refunded order amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0382",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for refunded total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0383",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "presentment_currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Currency shown to the buyer. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0384",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "taxes_included": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether listed prices already include tax. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0385",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_test": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit test-order indicator. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0386",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized order lines. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0387",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "OrderRead",
        "description": "Commercial sale order with amounts distinct from payment and accounting revenue. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "OrderLineRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "order_line"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "order_id": {
            "type": "string",
            "description": "Parent order. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0388",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized product reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0389",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source stock-keeping unit. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0390",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line item label. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0391",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity ordered. Units must be interpreted with unit_of_measure.",
            "x-field-id": "F0392",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit used for quantity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0393",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_price": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Price per unit under source tax convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0394",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unit price. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0395",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "discount_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Line discount amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0396",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for discount amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0397",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "tax_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Line tax amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0398",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for tax amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0399",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "line_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Extended line total with stated tax convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0400",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for line total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0401",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "quantity_fulfilled": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity fulfilled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0402",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity_refunded": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity returned or refunded when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0403",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "OrderLineRead",
        "description": "Product or service line belonging to an order. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "SubscriptionRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "subscription"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "customer_id": {
            "type": "string",
            "description": "Subscriber counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0404",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Recurring product or plan. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0405",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider subscription status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0406",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_frequency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual billing cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0407",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "recurring_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current recurring charge for one billing cycle. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0408",
                "x-classification": "Confidential",
                "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for recurring amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0409",
                "x-classification": "Confidential",
                "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
              }
            }
          },
          "started_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contract start date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0410",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "current_period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Start of current billing period. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0411",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "current_period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "End of current billing period, exclusive. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0412",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "cancelled_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Cancellation date when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0413",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          },
          "next_billing_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next scheduled charge date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0414",
            "x-classification": "Confidential",
            "x-availability": "Only if the connected provider and licensed module expose subscriptions; an order feed alone is insufficient."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "SubscriptionRead",
        "description": "Recurring commercial contract when the source exposes subscription records. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "LedgerAccountRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "ledger_account"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source account code. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0415",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Account label. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0416",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "account_type": {
            "$ref": "#/components/schemas/Enum_gl_type",
            "description": "AMLOK accounting classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0417",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_account_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unmodified source account classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0418",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "parent_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent in the chart of accounts. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0419",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "normal_balance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_debit_credit"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normal ledger balance direction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0420",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Account-specific currency if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0421",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Explicit chart-of-accounts active state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0422",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_trust_account": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether account holds third-party trust money. Do not include client trust balances in available operating liquidity.",
            "x-field-id": "F0423",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "LedgerAccountRead",
        "description": "Chart-of-accounts entry and classification. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "JournalRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "journal"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "journal_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source journal reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0424",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "posted_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Accounting posting date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0425",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Journal narrative. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0426",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source posting state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0427",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_document_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Originating record type. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0428",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized originating transaction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0429",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reverses_journal_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Journal being reversed if supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0430",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Journal lines belonging to this posting. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0431",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "JournalRead",
        "description": "Accounting posting header or source journal entry. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "JournalLineRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "journal_line"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "journal_id": {
            "type": "string",
            "description": "Parent posting. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0432",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "ledger_account_id": {
            "type": "string",
            "description": "Affected ledger account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0433",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "debit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Debit amount; nonnegative. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0434",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for debit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0435",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "credit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credit amount; nonnegative. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0436",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for credit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0437",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "base_debit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Debit in the company's reporting currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0438",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for base debit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0439",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "base_credit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credit in the company's reporting currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0440",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for base credit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0441",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line narrative. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0442",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "department": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source department or dimension. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0443",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "project_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Project/job reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0444",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Commercial party if linked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0445",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "JournalLineRead",
        "description": "One debit or credit posting to a ledger account. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "InvoiceRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "invoice"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Printable document number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0446",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "type": "string",
            "description": "Customer for invoices or supplier for bills. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0447",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "issued_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document issue date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0448",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual payment due date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0449",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_invoice_status",
            "description": "Normalized receivable/payable state. Do not infer void status solely from a zero balance.",
            "x-field-id": "F0450",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "subtotal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount before tax under the source convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0451",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for subtotal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0452",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "tax_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total tax charged. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0453",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for tax total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0454",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Document total including tax. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0455",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0456",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Outstanding document amount after source-applied allocations. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0457",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0458",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_paid": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Payments applied, where separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0459",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount paid. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0460",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_credited": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credits or prepayments applied, separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0461",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount credited. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0462",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fully_paid_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date full payment was completed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0463",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual term when explicitly reported. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0464",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_items": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceLine"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Itemized quantities, prices, account codes and tax amounts. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0465",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence document for the record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0466",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "home_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total translated to the ledger's home currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0467",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for home total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0468",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Home-currency units per document-currency unit. Use source rate and effective date; do not silently reverse the quote.",
            "x-field-id": "F0469",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "InvoiceRead",
        "description": "Accounts receivable invoice; sale made on credit. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "BillRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "bill"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Printable document number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0470",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "type": "string",
            "description": "Customer for invoices or supplier for bills. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0471",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "issued_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Document issue date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0472",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual payment due date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0473",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_invoice_status",
            "description": "Normalized receivable/payable state. Do not infer void status solely from a zero balance.",
            "x-field-id": "F0474",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "subtotal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount before tax under the source convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0475",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for subtotal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0476",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "tax_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total tax charged. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0477",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for tax total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0478",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Document total including tax. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0479",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0480",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Outstanding document amount after source-applied allocations. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0481",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0482",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_paid": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Payments applied, where separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0483",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount paid. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0484",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_credited": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credits or prepayments applied, separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0485",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount credited. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0486",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fully_paid_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date full payment was completed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0487",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_terms_days": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual term when explicitly reported. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0488",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_items": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceLine"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Itemized quantities, prices, account codes and tax amounts. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0489",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence document for the record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0490",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "home_total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total translated to the ledger's home currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0491",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for home total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0492",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "exchange_rate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Home-currency units per document-currency unit. Use source rate and effective date; do not silently reverse the quote.",
            "x-field-id": "F0493",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "BillRead",
        "description": "Accounts payable invoice; amount owed to a supplier. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "CreditNoteRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "credit_note"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credit note reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0494",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "type": "string",
            "description": "Customer or supplier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0495",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "invoice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related receivable if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0496",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bill_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related payable if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0497",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "issued_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credit note date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0498",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source credit note state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0499",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Absolute credit note amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0500",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0501",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "remaining_credit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Credit still available for allocation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0502",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for remaining credit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0503",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source adjustment explanation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0504",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "CreditNoteRead",
        "description": "Adjustment reducing a receivable or payable. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "AccountingPaymentRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "accounting_payment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "counterparty_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Customer or supplier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0505",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "direction": {
            "$ref": "#/components/schemas/Enum_direction",
            "description": "Receipt or disbursement from the business perspective. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0506",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total allocated cash payment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0507",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0508",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "paid_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Accounting payment date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0509",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched financial account when known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0510",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ledger_account_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Ledger cash or clearing account. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0511",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "allocations": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Allocation"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Amounts allocated to invoices, bills or credits. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0512",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched financial-account movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0513",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reconciliation_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_reconciliation_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "State of matching ledger payment to bank movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0514",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "AccountingPaymentRead",
        "description": "Ledger allocation of a customer receipt or supplier payment. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "FinancialStatementRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "financial_statement"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "statement_type": {
            "$ref": "#/components/schemas/Enum_statement_type",
            "description": "Financial report kind. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0515",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Start of reporting period for flow statements. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0516",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "description": "Inclusive reporting end or balance-sheet date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0517",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "accounting_basis": {
            "$ref": "#/components/schemas/Enum_accounting_basis",
            "description": "Cash or accrual basis. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0518",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "currency": {
            "type": "string",
            "description": "Presentation currency of the report. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0519",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "is_consolidated": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether multiple legal entities are consolidated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0520",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_audited": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether an audit opinion is actually evidenced. Software-generated reports are not automatically audited.",
            "x-field-id": "F0521",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_report_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Name of the upstream report. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0522",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "generated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source report generation time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0523",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence copy of the statement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0524",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Standardized report lines. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0525",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "FinancialStatementRead",
        "description": "Financial report with explicit period, basis and source. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "StatementLineRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "statement_line"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "statement_id": {
            "type": "string",
            "description": "Parent financial statement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0526",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "line_code": {
            "type": "string",
            "description": "AMLOK normalized statement concept. Mapping depends on account chart and reporting basis.",
            "x-field-id": "F0527",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "source_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original report line label. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0528",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "parent_line_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent subtotal or grouping line. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0529",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Reported line amount in statement currency. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0530",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0531",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "is_total": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether this line is a subtotal or total. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0532",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "ledger_account_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Accounts contributing to the line when exposed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0533",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "mapping_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "How source lines were assigned to the normalized concept. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0534",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "StatementLineRead",
        "description": "One classified line of a financial report. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "TaxObligationRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "tax_obligation"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tax_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Jurisdiction-specific tax category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0535",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "jurisdiction": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Relevant taxing jurisdiction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0536",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "period_start": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tax reporting period start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0537",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "period_end": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tax reporting period end. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0538",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment or filing deadline when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0539",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "amount_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Reported tax payable. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0540",
                "x-classification": "Confidential",
                "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0541",
                "x-classification": "Confidential",
                "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
              }
            }
          },
          "amount_paid": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Recorded payment against the obligation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0542",
                "x-classification": "Confidential",
                "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount paid. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0543",
                "x-classification": "Confidential",
                "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
              }
            }
          },
          "filing_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-reported filing status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0544",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "filed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual filing date when evidenced. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0545",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting return or receipt. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0546",
            "x-classification": "Confidential",
            "x-availability": "Accounting or supplied-return evidence only; no direct CRA/IRS account integration is established by the inventory."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "TaxObligationRead",
        "description": "Tax payable or reported obligation from an accounting system or supplied return. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ProductRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "product"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "sku": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Stock-keeping identifier within the source tenant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0547",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product or service name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0548",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source item description. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0549",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Goods, service, bundle or source-specific category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0550",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product category supplied by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0551",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Base stock unit. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0552",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source active status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0553",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_inventory_tracked": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether source maintains stock quantities. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0554",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source carrying cost per unit; not market value. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0555",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unit cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0556",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "sale_price": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current catalog selling price; not realized revenue. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0557",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for sale price. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0558",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "costing_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source valuation policy. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0559",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "barcode": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Barcode or GTIN when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0560",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "supplier_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Preferred supplier counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0561",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ProductRead",
        "description": "Catalog item or inventory SKU with ownership and costing context. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "LocationRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "location"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location display name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0562",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "location_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Warehouse, store, branch or source-specific type. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0563",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Physical location address. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0564",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "is_active": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location active state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0565",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "owner_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Owner or operator if established. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0566",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "timezone": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "IANA timezone used for operational dates. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0567",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "LocationRead",
        "description": "Store, warehouse, branch or operating location. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "InventoryBalanceRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "inventory_balance"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_id": {
            "type": "string",
            "description": "Item represented by the stock balance. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0568",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Warehouse or store holding the stock. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0569",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "owner_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Entity owning the stock, distinct from its custodian. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0570",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "ownership_type": {
            "$ref": "#/components/schemas/Enum_stock_ownership",
            "description": "Owned, consigned or third-party stock. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0571",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "quantity_on_hand": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Physical stock recorded at the observation time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0572",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "quantity_available": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-defined unreserved quantity available to sell. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0573",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "quantity_reserved": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity committed or allocated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0574",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "quantity_on_order": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Quantity expected from purchase orders. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0575",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit for all quantities on this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0576",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "carrying_value": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Book valuation of the represented stock. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0577",
                "x-classification": "Confidential",
                "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for carrying value. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0578",
                "x-classification": "Confidential",
                "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
              }
            }
          },
          "unit_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Unit valuation used for this snapshot. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0579",
                "x-classification": "Confidential",
                "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unit cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0580",
                "x-classification": "Confidential",
                "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
              }
            }
          },
          "costing_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source costing policy. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0581",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "lot_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Batch or lot identifier when tracked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0582",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "serial_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit serial number when tracked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0583",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "expiry_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Product or lot expiry date when tracked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0584",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          },
          "as_of": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time represented by the stock observation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0585",
            "x-classification": "Confidential",
            "x-availability": "Quantity, cost, history and stock ownership depend on product, module and tenant. A WMS balance need not be borrower-owned collateral."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "InventoryBalanceRead",
        "description": "Quantity and value snapshot by item, location and owner. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "InventoryMovementRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "inventory_movement"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_id": {
            "type": "string",
            "description": "Affected item. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0586",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location affected by this movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0587",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "movement_type": {
            "$ref": "#/components/schemas/Enum_movement_type",
            "description": "Reason for stock movement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0588",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "quantity_delta": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Signed change in stock at this location. Positive adds stock; negative removes stock.",
            "x-field-id": "F0589",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit for quantity_delta. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0590",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occurred_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Operational event time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0591",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cost per unit recorded for the movement. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0592",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unit cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0593",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Signed carrying-value change associated with movement. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0594",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0595",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related sales order if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0596",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "purchase_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related purchase order if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0597",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "transfer_pair_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Correlation between paired inter-location movements. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0598",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting receipt or adjustment evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0599",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "InventoryMovementRead",
        "description": "A receipt, issue, transfer or adjustment to stock. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "PurchaseOrderRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "purchase_order"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchase order number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0600",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "supplier_id": {
            "type": "string",
            "description": "Supplier commercial counterparty. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0601",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_purchase_status",
            "description": "Purchase order state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0602",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "ordered_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Purchase order date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0603",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expected_delivery_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expected receipt date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0604",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "total": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Ordered value under source tax convention. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0605",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0606",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_received": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Value of goods or services received if reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0607",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount received. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0608",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "line_items": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PurchaseLine"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Ordered and received quantities, prices and item references. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0609",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Receiving location. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0610",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "PurchaseOrderRead",
        "description": "Supplier purchase commitment, separate from invoices and cash payments. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ShipmentRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "shipment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "direction": {
            "type": "string",
            "description": "Inbound receipt or outbound dispatch. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0611",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related sales order. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0612",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "purchase_order_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related purchase order for inbound receipts. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0613",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "location_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Origin or receiving warehouse. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0614",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source shipment state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0615",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "carrier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Logistics carrier when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0616",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "tracking_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source tracking reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0617",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "shipped_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Dispatch time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0618",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "delivered_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Confirmed delivery time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0619",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "line_items": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ShipmentLine"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Product quantities shipped or received. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0620",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ShipmentRead",
        "description": "Physical receipt or dispatch linked to orders and stock. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ProductionOrderRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "production_order"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Production or work order identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0621",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Finished item to produce. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0622",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_manufacturing_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Manufacturing work order state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0623",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity_planned": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Target output quantity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0624",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity_completed": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Recorded good output quantity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0625",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "quantity_scrapped": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Recorded scrapped output quantity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0626",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit_of_measure": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit for output quantities. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0627",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "planned_start_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled work start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0628",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "planned_end_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled completion. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0629",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual completion date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0630",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "material_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Material cost incurred under source accounting. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0631",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for material cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0632",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "labor_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Labor cost charged to the work order. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0633",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for labor cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0634",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "overhead_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Overhead assigned by the source. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0635",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for overhead cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0636",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "work_in_progress_value": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source carrying value of incomplete production. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0637",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for work in progress value. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0638",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ProductionOrderRead",
        "description": "Manufacturing work order when licensed ERP/MES modules expose it. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ProjectRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "project"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source project or job identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0639",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Project name. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0640",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "customer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Customer commissioning the project. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0641",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_project_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Project execution state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0642",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "started_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Actual or reported start date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0643",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expected_end_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current expected completion date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0644",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "contract_value": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current contract amount, where supplied. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0645",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for contract value. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0646",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "budget_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Approved cost budget. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0647",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for budget cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0648",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "actual_cost": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cost posted to the project to date. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0649",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for actual cost. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0650",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_billed": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cumulative invoicing assigned to the project. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0651",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount billed. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0652",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "retainage_receivable": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Contractually withheld receivable if exposed. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0653",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for retainage receivable. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0654",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "percent_complete": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-reported completion fraction. 0 to 1; retain method; billed fraction is not physical completion.",
            "x-field-id": "F0655",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ProjectRead",
        "description": "Construction or service job with cost and billing information. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ApplicationRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "application"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "applicant_entity_id": {
            "type": "string",
            "description": "Business or person applying for credit. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0656",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "product_type": {
            "$ref": "#/components/schemas/Enum_credit_product",
            "description": "Requested financial product. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0657",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_application_status",
            "description": "Application state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0658",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "requested_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Requested principal or limit. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0659",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for requested amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0660",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "requested_term_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Requested contractual term in months. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0661",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "purpose": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Declared use of funds. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0662",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Application submission time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0663",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "decision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current decision artifact. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0664",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Resulting funded loan when one exists. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0665",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "guarantor_entity_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Proposed guarantors. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0666",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "collateral_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Offered collateral. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0667",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Submitted application evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0668",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "channel": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Broker, direct, embedded or other source channel. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0669",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "institution_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Lender's application reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0670",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ApplicationRead",
        "description": "Credit request and its lifecycle. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "CreditFacilityRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "credit_facility"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "borrower_entity_id": {
            "type": "string",
            "description": "Obligated borrower. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0671",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "product_type": {
            "$ref": "#/components/schemas/Enum_credit_product",
            "description": "Facility product. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0672",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "currency": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contract currency. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0673",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "approved_limit": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current approved facility limit. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0674",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for approved limit. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0675",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "drawn_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Outstanding utilization reported by source. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0676",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for drawn amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0677",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "available_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Undrawn availability under the contract. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0678",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for available amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0679",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "committed_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Committed portion of the facility. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0680",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for committed amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0681",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "effective_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Facility effective date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0682",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "maturity_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual end date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0683",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next scheduled credit review. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0684",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source facility state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0685",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Individual loans or draws governed by the facility. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0686",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "covenant_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual monitoring covenants. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0687",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "CreditFacilityRead",
        "description": "Approved credit agreement and aggregate exposure. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "LoanRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "loan"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "borrower_entity_id": {
            "type": "string",
            "description": "Primary borrower. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0688",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Originating application if available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0689",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "facility_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Parent facility if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0690",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product_type": {
            "$ref": "#/components/schemas/Enum_credit_product",
            "description": "Credit product type. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0691",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_loan_status",
            "description": "Servicing lifecycle state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0692",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "original_principal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Principal at origination. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0693",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for original principal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0694",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "outstanding_principal": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Principal still owed as of the balance date. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0695",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for outstanding principal. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0696",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "accrued_interest": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Accrued unpaid interest separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0697",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for accrued interest. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0698",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fees_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Unpaid fees separately reported. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0699",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fees due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0700",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total_payoff": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Source payoff quote including its calculation date. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0701",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total payoff. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0702",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "annual_interest_rate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual annual rate expressed as a fraction. 9.5 percent is 0.095; not automatically APR.",
            "x-field-id": "F0703",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "apr": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Disclosed APR if explicitly supplied. Do not relabel nominal rate as APR.",
            "x-field-id": "F0704",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "rate_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_rate_type"
              },
              {
                "type": "null"
              }
            ],
            "description": "Fixed or variable interest arrangement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0705",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "benchmark": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference rate for variable pricing. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0706",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "spread": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Margin above benchmark, as a fraction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0707",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "interest_day_count": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual day-count convention. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0708",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "payment_frequency": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_frequency"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled payment cadence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0709",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "scheduled_payment": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Current regular installment amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0710",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for scheduled payment. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0711",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "funded_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Initial funding date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0712",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "maturity_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contract maturity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0713",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "next_payment_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next due installment date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0714",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "days_past_due": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source days-past-due under its servicing policy. Preserve policy and as-of date; no automatic recalculation from one missed item.",
            "x-field-id": "F0715",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "past_due_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Contractual amount overdue. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0716",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for past due amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0717",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "charged_off_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount written off by the lender. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0718",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for charged off amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0719",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "as_of": {
            "type": "string",
            "format": "date",
            "description": "Date represented by balances and delinquency status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0720",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "autopay_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source-reported authorized automatic repayment setting. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0721",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "LoanRead",
        "description": "Loan contract and current servicing state. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "InstallmentRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "installment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "type": "string",
            "description": "Parent loan. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0722",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "sequence_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contract schedule sequence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0723",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "due_on": {
            "type": "string",
            "format": "date",
            "description": "Installment due date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0724",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "principal_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Principal due for this installment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0725",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for principal due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0726",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "interest_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Interest due for this installment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0727",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for interest due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0728",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fees_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Fees due for this installment. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0729",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fees due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0730",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "total_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total contractual obligation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0731",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for total due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0732",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "amount_paid": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Applied repayments against this obligation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0733",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount paid. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0734",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "remaining_due": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Unpaid scheduled obligation. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0735",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for remaining due. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0736",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_repayment_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Schedule or repayment state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0737",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "InstallmentRead",
        "description": "One scheduled repayment obligation. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "RepaymentRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "repayment"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "type": "string",
            "description": "Loan receiving the repayment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0738",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "installment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Scheduled obligation if explicitly linked. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0739",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_repayment_status",
            "description": "Payment execution state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0740",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Total repayment amount. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0741",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0742",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "principal_applied": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount applied to principal. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0743",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for principal applied. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0744",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "interest_applied": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount applied to interest. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0745",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for interest applied. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0746",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "fees_applied": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount applied to fees. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0747",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for fees applied. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0748",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "unapplied_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Cash received but not yet allocated. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0749",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for unapplied amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0750",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "received_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time funds were received. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0751",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Servicing value date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0752",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Payment rail or method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0753",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Return or failure reason when supplied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0754",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "bank_transaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Matched bank movement when authorized. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0755",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reverses_repayment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Repayment reversed by this event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0756",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "RepaymentRead",
        "description": "A servicing payment event and its allocation. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "CollateralRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "collateral"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Loan secured or proposed to be secured. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0757",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "facility_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related credit facility. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0758",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "collateral_type": {
            "$ref": "#/components/schemas/Enum_collateral_type",
            "description": "Asset class. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0759",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Description identifying the pledged asset. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0760",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "owner_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Owner evidenced for the asset. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0761",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "serial_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Equipment or asset serial number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0762",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "vin": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Vehicle identification number when relevant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0763",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "property_identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Land parcel or title identifier when relevant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0764",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "address": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Address"
              },
              {
                "type": "null"
              }
            ],
            "description": "Location or real-property address. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0765",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "valuation": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Value established by a specified valuation source. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0766",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for valuation. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0767",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "valuation_date": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date of the valuation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0768",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "valuation_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Appraisal, book value or other stated method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0769",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "appraiser": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Appraiser or valuation provider. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0770",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "lien_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Related registrations or filings. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0771",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "advance_rate": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Lender-approved fraction eligible for borrowing base. Contract parameter, not inferred from a registry filing.",
            "x-field-id": "F0772",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "insurance_expiry_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Expiry of supporting insurance evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0773",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "CollateralRead",
        "description": "Asset pledged or proposed to secure an obligation. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "GuaranteeRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "guarantee"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Guaranteed loan. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0774",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "facility_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Guaranteed facility. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0775",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "guarantor_entity_id": {
            "type": "string",
            "description": "Person or entity providing the guarantee. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0776",
            "x-classification": "Restricted",
            "x-availability": "Required when resource exists"
          },
          "guarantee_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_guarantee_type"
              },
              {
                "type": "null"
              }
            ],
            "description": "Nature of the guarantee. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0777",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "maximum_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Explicit guarantee cap, if applicable. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0778",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for maximum amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0779",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "signed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Execution date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0780",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "expires_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual expiry if one exists. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0781",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Executed guarantee evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0782",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "GuaranteeRead",
        "description": "Documented personal or corporate guarantee. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "CovenantRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "covenant"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "facility_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Facility subject to this covenant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0783",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Loan subject to this covenant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0784",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "name": {
            "type": "string",
            "description": "Covenant label. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0785",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "attribute_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Metric used by the test. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0786",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "operator": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Comparison operator. Allowed: gt, gte, lt, lte, eq; compare only compatible types and units.",
            "x-field-id": "F0787",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "threshold": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Contractual threshold. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0788",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "threshold_unit": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit of threshold. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0789",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "observed_value": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Value evaluated on this test date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0790",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "observed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Date the covenant was evaluated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0791",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_covenant_status",
            "description": "Test outcome under the agreement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0792",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "waived_until": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Documented waiver expiry. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0793",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Agreement or waiver establishing the rule. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0794",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "CovenantRead",
        "description": "Contractual test with a versioned threshold and observed result. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "DecisionRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "decision"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Credit application assessed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0795",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Existing loan being reassessed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0796",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "outcome": {
            "$ref": "#/components/schemas/Enum_decision_outcome",
            "description": "Recorded outcome or recommendation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0797",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "is_recommendation": {
            "type": "boolean",
            "description": "True if this is advisory and not an executed lender decision. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0798",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "policy_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution policy applied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0799",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "policy_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Policy revision applied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0800",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "approved_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Approved or recommended amount with actor context. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0801",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for approved amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0802",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "approved_term_months": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Approved or recommended term. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0803",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reason_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Structured reasons supporting the outcome. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0804",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "conditions": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Conditions that must be satisfied. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0805",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "attribute_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Immutable risk evidence used in decisioning. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0806",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "actor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Institution user, service or agent responsible. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0807",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "decided_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Decision timestamp. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0808",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "supersedes_decision_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earlier decision superseded by this one. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0809",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "DecisionRead",
        "description": "Versioned lender decision or AMLOK recommendation with attributable evidence. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "LienSearchRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "lien_search"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "debtor_name": {
            "type": "string",
            "description": "Exact debtor name submitted for search. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0810",
            "x-classification": "Restricted",
            "x-availability": "Required when resource exists"
          },
          "debtor_entity_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Resolved AMLOK debtor entity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0811",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "debtor_type": {
            "$ref": "#/components/schemas/Enum_party_type",
            "description": "Person or business search subject. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0812",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "search_type": {
            "type": "string",
            "description": "Name, registration number, VIN or serial search when supported. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0813",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "identifier": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Search identifier if the chosen mode requires it. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0814",
            "x-classification": "Restricted",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "jurisdictions_requested": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Jurisdictions explicitly requested. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0815",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "jurisdictions_completed": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Jurisdictions actually completed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0816",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_search_status",
            "description": "Search execution state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0817",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "searched_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider search execution time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0818",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "effective_through": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry's stated effective coverage time. Unknown does not mean current to the request time.",
            "x-field-id": "F0819",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "is_certified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether an official certified search was returned. API search output is not automatically certified.",
            "x-field-id": "F0820",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "search_logic": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Provider or registry matching method. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0821",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "result_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Number of returned filings within completed scope. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0822",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "lien_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Normalized filing results. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0823",
            "x-classification": "Confidential",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "report_document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Original report or certificate. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0824",
            "x-classification": "Restricted",
            "x-availability": "US UCC and Canadian provincial PPSA/RDPRM are separate products. Contract, jurisdiction, search type and redistribution rights must be established."
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "LienSearchRead",
        "description": "A search request with explicit debtor, jurisdiction and coverage. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "LienRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "lien"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "search_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Search that returned this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0825",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "filing_number": {
            "type": "string",
            "description": "Registry-assigned filing or registration number. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0826",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "original_filing_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Initial registration in the filing chain. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0827",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "lien_type": {
            "$ref": "#/components/schemas/Enum_lien_type",
            "description": "Legal registry category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0828",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "jurisdiction": {
            "type": "string",
            "description": "Filing jurisdiction. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0829",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "registry_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry of record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0830",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "status": {
            "$ref": "#/components/schemas/Enum_lien_status",
            "description": "Source-supported registration state. Status is not a legal determination of enforceability or priority.",
            "x-field-id": "F0831",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "raw_status": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unmodified registry or provider status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0832",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "filed_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Filing or registration date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0833",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "lapse_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported lapse date, if known. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0834",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "terminated_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reported termination or discharge date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0835",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "debtors": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LienParty"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Debtors exactly as recorded, including unresolved parties. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0836",
            "x-classification": "Restricted",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "secured_parties": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/LienParty"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Secured parties exactly as recorded. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0837",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "collateral_description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Registry's collateral text when available. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0838",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "collateral_categories": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Source or reviewed collateral classification. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0839",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "is_blanket_lien": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "description": "Whether evidence supports an all-assets description. Null if collateral text is unavailable or ambiguous.",
            "x-field-id": "F0840",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "registered_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount explicitly recorded by the registry, where applicable. Amount in major currency units. A UCC filing often has no debt amount; never treat missing amount as zero.",
                "x-field-id": "F0841",
                "x-classification": "Confidential",
                "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for registered amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0842",
                "x-classification": "Confidential",
                "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
              }
            }
          },
          "currency_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Meaning of registered amount and currency as stated by source. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0843",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Images or reports supporting the filing. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0844",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "match_disposition": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_match_disposition"
              },
              {
                "type": "null"
              }
            ],
            "description": "Debtor identity review result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0845",
            "x-classification": "Confidential",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          },
          "priority_assessment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Separately reviewed priority conclusion, if commissioned. Never infer legal priority from filing date alone.",
            "x-field-id": "F0846",
            "x-classification": "Restricted",
            "x-availability": "Registry and provider dependent; no guaranteed balance, collateral detail, priority or certified coverage."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "LienRead",
        "description": "A security registration or other lien record from a stated registry. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "FilingEventRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "filing_event"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "lien_id": {
            "type": "string",
            "description": "Registration chain affected. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0847",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "event_type": {
            "$ref": "#/components/schemas/Enum_filing_event_type",
            "description": "Type of filing event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0848",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "filing_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Identifier of the specific event filing. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0849",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Effective or recorded filing date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0850",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "previous_filing_number": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Prior linked filing identifier if provided. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0851",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "new_lapse_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Updated lapse date explicitly reported after this event. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0852",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source event narrative. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0853",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence image or filing document. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0854",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "FilingEventRead",
        "description": "Amendment, continuation, assignment or termination in a registration chain. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "AttributeRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "attribute"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "key": {
            "type": "string",
            "description": "Stable attribute name defined in Derived Attributes. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0855",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "value_type": {
            "$ref": "#/components/schemas/Enum_value_type",
            "description": "Type of the value. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0856",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Serialized scalar value matching value_type. Null if required inputs or coverage are missing.",
            "x-field-id": "F0857",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "unit": {
            "type": "string",
            "description": "Currency, ratio, days, count or other explicit unit. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0858",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_metric_status",
            "description": "Whether this value is usable for its stated interval. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0859",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "window_start": {
            "type": "string",
            "format": "date",
            "description": "Inclusive measurement interval start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0860",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "window_end": {
            "type": "string",
            "format": "date",
            "description": "Exclusive measurement interval end. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0861",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "Latest evidence included in calculation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0862",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "calculation_version": {
            "type": "string",
            "description": "Versioned formula or feature definition. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0863",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "input_resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Supporting records or immutable manifest reference. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0864",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "coverage_ratio": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Fraction of expected time/account coverage actually available. 0 to 1; null when denominator cannot be defined.",
            "x-field-id": "F0865",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "missing_reason": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_null_reason"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reason value is null. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0866",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "provider_score_scale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Native scale for licensed scores, if relevant. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0867",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "AttributeRead",
        "description": "Computed or provider-supplied risk attribute with transparent inputs. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "RiskSnapshotRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "risk_snapshot"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "assessment_type": {
            "type": "string",
            "description": "Assessment purpose or workflow. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0868",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "as_of": {
            "type": "string",
            "format": "date-time",
            "description": "Evidence cutoff used by this assessment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0869",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "attribute_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Values used in the assessment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0870",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "previous_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Earlier comparable assessment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0871",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "model_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Model used if a score was generated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0872",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "model_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Exact model revision. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0873",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "score": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Model-specific score; unavailable until model is validated and entitled. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0874",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "score_scale": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Meaning and allowed range of the model score. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0875",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "rating": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Policy-specific risk category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0876",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reason_codes": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Explanatory factors tied to evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0877",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_manifest_id": {
            "type": "string",
            "description": "Immutable list of input record versions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0878",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "workflow_run_id": {
            "type": "string",
            "minLength": 1
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_usage_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "RiskSnapshotRead",
        "description": "Immutable assessment at a point in time, preserving subsequent changes separately. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "MonitorRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "monitor"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "baseline_snapshot_id": {
            "type": "string",
            "description": "Original assessment used for change detection. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0879",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resource_types": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Resources monitored under this subscription. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0880",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "attribute_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tracked calculated attributes. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0881",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_monitor_status",
            "description": "Monitoring subscription state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0882",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "cadence": {
            "type": "string",
            "description": "Requested refresh schedule, subject to source capability. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0883",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "ruleset_version": {
            "type": "string",
            "description": "Version of alert thresholds and conditions. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0884",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "last_evaluated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest successful evaluation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0885",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "next_evaluation_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Next planned evaluation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0886",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "insufficient_credits",
                  "workload_limit_exceeded",
                  "missing_evidence",
                  "consent_unavailable"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "monitoring_period_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "MonitorRead",
        "description": "Configured monitoring scope, baseline and refresh policy. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "AlertRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "alert"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "monitor_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Monitoring configuration generating the alert. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0887",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "alert_type": {
            "type": "string",
            "description": "Versioned signal key. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0888",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "severity": {
            "$ref": "#/components/schemas/Enum_severity",
            "description": "Policy-assigned severity. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0889",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_alert_status",
            "description": "System-derived signal state. Open until comparable fresh evidence shows the triggering condition has cleared. No acknowledgement, case or borrower-contact workflow."
          },
          "detected_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the signal was detected. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0891",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "baseline_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reference assessment. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0892",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "current_snapshot_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Assessment showing the change. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0893",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "attribute_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Metric underlying the signal. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0894",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "previous_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Prior comparable scalar value. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0895",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "current_value": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Current comparable scalar value. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0896",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "threshold": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Rule threshold that was crossed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0897",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence-based explanation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0898",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "evidence_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Supporting records or documents. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0899",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the alert was resolved or dismissed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0901",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "AlertRead",
        "description": "Material change or risk signal with evidence and review state. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "WorkflowRunRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "workflow_run"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "workflow_type": {
            "$ref": "#/components/schemas/Enum_workflow_type",
            "description": "Risk workflow category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0946",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "workflow_version": {
            "type": "string",
            "description": "Version of the orchestration definition. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0947",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_workflow_status",
            "description": "Execution state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0948",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Application context if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0949",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "loan_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Loan context if applicable. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0950",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "input_resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Immutable input references. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0951",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "output_resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Produced assessments, checks, risk findings or reports. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0952",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Execution start. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0954",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Terminal completion time. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0955",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "parent_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Run that triggered this one, such as Monitor re-entering Underwrite. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0956",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "product": {
            "type": "string",
            "enum": [
              "insights",
              "signal"
            ]
          },
          "input_manifest_id": {
            "type": "string",
            "minLength": 1
          },
          "initial_input_manifest_id": {
            "type": "string",
            "minLength": 1
          },
          "workload_id": {
            "type": "string",
            "minLength": 1
          },
          "billing_usage_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "monitoring_period_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "insufficient_credits",
                  "workload_limit_exceeded",
                  "missing_evidence"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "stop_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "account_cancellation",
                  "parent_cancelled",
                  "consent_revoked"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProcessingFailure"
              },
              {
                "type": "null"
              }
            ]
          },
          "attempt": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "WorkflowRunRead",
        "description": "Coordinated execution of Verify, Underwrite, Monitor or Investigate. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "RequirementRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "requirement"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "workflow_run_id": {
            "type": "string",
            "description": "Run requiring this evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0958",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "requirement_type": {
            "type": "string",
            "description": "Requested evidence category. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0959",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "description": {
            "type": "string",
            "description": "Specific evidence requirement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0960",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "status": {
            "$ref": "#/components/schemas/Enum_requirement_status",
            "description": "Collection and review status. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0961",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "due_on": {
            "anyOf": [
              {
                "type": "string",
                "format": "date"
              },
              {
                "type": "null"
              }
            ],
            "description": "Requested completion date. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0962",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "document_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Evidence submitted for this requirement. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0963",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "reviewer_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Reviewer accepting or rejecting evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0964",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "waiver_reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Documented basis for a permitted waiver. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0965",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "rejection": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/EvidenceRejection"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "RequirementRead",
        "description": "Evidence required to complete an assessment workflow. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "AuditEventRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "audit_event"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "actor_id": {
            "type": "string",
            "description": "User, API client or agent responsible. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0966",
            "x-classification": "Restricted",
            "x-availability": "Required when resource exists"
          },
          "actor_type": {
            "type": "string",
            "description": "Class of principal. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0967",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "action": {
            "type": "string",
            "description": "Action performed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0968",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resource_type": {
            "type": "string",
            "description": "Type of affected object. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0969",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resource_id": {
            "type": "string",
            "description": "Affected object. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0970",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "resource_version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "description": "Version observed or produced. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0971",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "Action timestamp. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0972",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "request_id": {
            "type": "string",
            "description": "Request correlation identifier. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0973",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "workflow_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Related orchestration run. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0974",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "outcome": {
            "type": "string",
            "description": "Success, denial or failure result. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0975",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "change_summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Description of changed fields without sensitive raw values. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0976",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "AuditEventRead",
        "description": "Append-only record of actions, versions and access. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ReconciliationLinkRead": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Stable identifier scoped to the client tenant. Never use a provider ID as the public primary key.",
            "x-field-id": "F0001",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "object": {
            "type": "string",
            "const": "reconciliation_link"
          },
          "subject_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Business or person to which this record relates. Null for tenant-level configuration and unresolved subjects.",
            "x-field-id": "F0003",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time AMLOK first stored this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0004",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Time the normalized representation last changed. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0005",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source was observed by AMLOK. Do not imply this is the economic event time.",
            "x-field-id": "F0006",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "effective_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Time the source states this version became valid. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0007",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "record_version": {
            "type": "integer",
            "description": "Monotonically increasing AMLOK version for this resource. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0008",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "deleted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tombstone timestamp for a source or AMLOK deletion. Null for records not deleted; retain only under the configured policy.",
            "x-field-id": "F0009",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "source_refs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceRef"
            },
            "description": "Evidence references contributing to this record. A known empty array is valid for a newly client-created record.",
            "x-field-id": "F0010",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "field_provenance": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FieldProvenance"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "Field-level source, extraction, transformation and quality details. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0011",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "data_status": {
            "$ref": "#/components/schemas/Enum_data_status",
            "description": "Whether the requested resource is complete for its stated scope. Completeness is relative to declared fields, sources and time interval.",
            "x-field-id": "F0012",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "missing_fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MissingField"
            },
            "description": "Unavailable field paths and their explicit reasons. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0013",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "schema_version": {
            "type": "string",
            "description": "Contract version used to serialize this record. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0014",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Optional caller-owned correlation identifier. Scoped to tenant; uniqueness only when explicitly contracted.",
            "x-field-id": "F0015",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "extensions": {
            "anyOf": [
              {
                "type": "object",
                "additionalProperties": true
              },
              {
                "type": "null"
              }
            ],
            "description": "Namespaced extra provider fields without changing the core schema. Access-controlled and documented per provider; no provider tokens.",
            "x-field-id": "F0016",
            "x-classification": "Restricted",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "from_resource_type": {
            "type": "string",
            "description": "Source side of the reconciliation relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0977",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "from_resource_id": {
            "type": "string",
            "description": "Record being linked or allocated. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0978",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "to_resource_type": {
            "type": "string",
            "description": "Target side of the relationship. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0979",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "to_resource_id": {
            "type": "string",
            "description": "Record receiving the linkage or allocation. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0980",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "link_type": {
            "type": "string",
            "description": "Relationship such as settlement, payment_allocation or duplicate_evidence. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0981",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "allocated_amount": {
            "type": "object",
            "properties": {
              "amount": {
                "anyOf": [
                  {
                    "type": "string",
                    "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                    "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Amount attributed to this linkage where the relationship is monetary. Amount in major currency units. Pair with currency; preserve precision; zero differs from unavailable.",
                "x-field-id": "F0982",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              },
              "currency": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Currency for allocated amount. Uppercase ISO 4217 code when known; null for unsupported/unidentified currency, retain source code.",
                "x-field-id": "F0983",
                "x-classification": "Confidential",
                "x-availability": "Source, module, country, consent and contracted permissions determine population."
              }
            }
          },
          "status": {
            "$ref": "#/components/schemas/Enum_reconciliation_status",
            "description": "Matching/reconciliation state. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0984",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "method_version": {
            "type": "string",
            "description": "Version of deterministic or reviewed match process. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0985",
            "x-classification": "Confidential",
            "x-availability": "Required when resource exists"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$",
                "description": "Exact decimal string in major units. Do not use binary floating-point arithmetic."
              },
              {
                "type": "null"
              }
            ],
            "description": "Calibrated probabilistic match confidence if used. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0986",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          },
          "review_status": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Enum_review_status"
              },
              {
                "type": "null"
              }
            ],
            "description": "Human disposition of uncertain matches. Preserve original evidence; do not invent missing values.",
            "x-field-id": "F0987",
            "x-classification": "Confidential",
            "x-availability": "Source, module, country, consent and contracted permissions determine population."
          }
        },
        "required": [
          "id",
          "object",
          "created_at",
          "updated_at",
          "record_version",
          "source_refs",
          "data_status",
          "missing_fields",
          "schema_version"
        ],
        "title": "ReconciliationLinkRead",
        "description": "Evidence-based allocation connecting records without collapsing distinct economic events. Population depends on source and tenant entitlement. Read representation: fields selects top-level domain fields. Required metadata is always returned. Selected nested objects retain their complete schema. Without fields, return the full authorized representation."
      },
      "ErrorEnvelope": {
        "type": "object",
        "properties": {
          "error": {
            "$ref": "#/components/schemas/Error"
          },
          "meta": {
            "$ref": "#/components/schemas/ResponseMeta"
          }
        },
        "required": [
          "error",
          "meta"
        ]
      },
      "EP135Request": {
        "type": "object",
        "properties": {
          "legal_name": {
            "type": "string",
            "minLength": 1,
            "description": "Client-asserted legal name."
          },
          "client_reference": {
            "type": "string",
            "minLength": 1,
            "description": "Optional caller-owned correlation identifier."
          },
          "registration_number": {
            "type": "string",
            "minLength": 1,
            "description": "Company or registry registration identifier."
          },
          "incorporation_country": {
            "type": "string",
            "minLength": 1,
            "description": "Country of formation."
          }
        },
        "required": [
          "legal_name"
        ],
        "additionalProperties": false
      },
      "EP136Request": {
        "type": "object",
        "properties": {
          "given_name": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized individual given name."
          },
          "family_name": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized individual family name."
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "description": "Contact email."
          },
          "phone": {
            "type": "string",
            "minLength": 1,
            "description": "Contact telephone."
          },
          "residence_country": {
            "type": "string",
            "minLength": 1,
            "description": "Current country of residence when established."
          }
        },
        "required": [
          "given_name",
          "family_name"
        ],
        "additionalProperties": false
      },
      "EP137Request": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Subject granting or represented by authorization."
          },
          "subject_type": {
            "$ref": "#/components/schemas/Enum_party_type",
            "description": "Business or person."
          },
          "purposes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Permitted documented purposes."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Data/action permissions."
          },
          "policy_version": {
            "type": "string",
            "minLength": 1,
            "description": "Text or authority version captured."
          },
          "evidence_document_id": {
            "type": "string",
            "minLength": 1,
            "description": "Evidence of real authorization."
          }
        },
        "required": [
          "subject_id",
          "subject_type",
          "purposes",
          "scopes",
          "policy_version",
          "evidence_document_id"
        ],
        "additionalProperties": false
      },
      "EP138Request": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "description": "Request field from the endpoint contract."
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "EP139Request": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Subject whose source will be linked."
          },
          "provider_id": {
            "type": "string",
            "minLength": 1,
            "description": "An enabled provider identifier."
          },
          "products": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Product IDs from this provider's products[].id in GET /v1/providers. Resource names are not interchangeable with product IDs. Reject unsupported values with 422 validation_error."
          },
          "consent_id": {
            "type": "string",
            "minLength": 1,
            "description": "Active authorization."
          },
          "redirect_uri": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "pattern": "^https://",
            "description": "Registered allowed return URL."
          },
          "state": {
            "type": "string",
            "minLength": 32,
            "maxLength": 256
          }
        },
        "required": [
          "subject_id",
          "provider_id",
          "products",
          "consent_id",
          "redirect_uri",
          "state"
        ],
        "additionalProperties": false
      },
      "EP140Request": {
        "type": "object",
        "properties": {
          "resources": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "connection",
                "consent",
                "sync_job",
                "business",
                "person",
                "relationship",
                "verification",
                "verification_check",
                "screening_match",
                "document",
                "bank_account",
                "account_balance",
                "bank_transaction",
                "recurring_stream",
                "income_observation",
                "merchant_account",
                "payment",
                "processor_transaction",
                "payout",
                "refund",
                "dispute",
                "counterparty",
                "order",
                "order_line",
                "subscription",
                "ledger_account",
                "journal",
                "journal_line",
                "invoice",
                "bill",
                "credit_note",
                "accounting_payment",
                "financial_statement",
                "statement_line",
                "tax_obligation",
                "product",
                "location",
                "inventory_balance",
                "inventory_movement",
                "purchase_order",
                "shipment",
                "production_order",
                "project",
                "application",
                "credit_facility",
                "loan",
                "installment",
                "repayment",
                "collateral",
                "guarantee",
                "covenant",
                "decision",
                "lien_search",
                "lien",
                "filing_event",
                "attribute",
                "risk_snapshot",
                "monitor",
                "alert",
                "workflow_run",
                "requirement",
                "audit_event",
                "reconciliation_link"
              ]
            },
            "minItems": 1,
            "description": "Resource types to retrieve."
          },
          "from": {
            "type": "string",
            "format": "date",
            "description": "Inclusive requested history start."
          },
          "to": {
            "type": "string",
            "format": "date",
            "description": "Exclusive requested history end."
          }
        },
        "required": [
          "resources"
        ],
        "additionalProperties": false
      },
      "EP141Request": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1,
            "description": "Request field from the endpoint contract."
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "EP142Request": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized person or business."
          },
          "verification_type": {
            "type": "string",
            "enum": [
              "kyc",
              "kyb"
            ],
            "description": "kyc or kyb."
          },
          "workflow_version": {
            "type": "string",
            "minLength": 1,
            "description": "Approved ID from GET /v1/configuration workflow_versions, matching this workflow type and product."
          },
          "return_url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "pattern": "^https://",
            "description": "Registered browser redirect after applicant flow; not a webhook URL."
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          }
        },
        "required": [
          "subject_id",
          "verification_type",
          "workflow_version",
          "processing_context"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "verification_type": {
                  "const": "kyb"
                }
              }
            },
            "then": {
              "properties": {
                "processing_context": {
                  "not": {
                    "required": [
                      "subject_association_id"
                    ]
                  }
                }
              }
            }
          }
        ]
      },
      "EP143Request": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Debtor context."
          },
          "debtor_name": {
            "type": "string",
            "minLength": 1,
            "description": "Exact legal search name."
          },
          "debtor_type": {
            "$ref": "#/components/schemas/Enum_party_type",
            "description": "Business or person."
          },
          "search_type": {
            "type": "string",
            "enum": [
              "name",
              "identifier",
              "vin",
              "serial"
            ],
            "description": "Enabled name, identifier, VIN or serial search mode."
          },
          "jurisdictions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Explicit requested search jurisdictions."
          },
          "identifier": {
            "type": "string",
            "minLength": 1,
            "description": "Required for identifier, VIN or serial search modes."
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          }
        },
        "required": [
          "subject_id",
          "debtor_name",
          "debtor_type",
          "search_type",
          "jurisdictions",
          "processing_context"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "search_type": {
                  "enum": [
                    "identifier",
                    "vin",
                    "serial"
                  ]
                }
              },
              "required": [
                "search_type"
              ]
            },
            "then": {
              "required": [
                "identifier"
              ]
            }
          },
          {
            "properties": {
              "processing_context": {
                "not": {
                  "required": [
                    "subject_association_id"
                  ]
                }
              }
            }
          }
        ]
      },
      "EP144Request": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "description": "Request field from the endpoint contract."
          },
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Business or person to which this record relates."
          },
          "document_type": {
            "$ref": "#/components/schemas/Enum_document_type",
            "description": "Category of evidence."
          },
          "period_start": {
            "type": "string",
            "format": "date",
            "description": "First date covered by the document."
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "description": "Last date covered by the document, inclusive."
          },
          "requirement_id": {
            "type": "string",
            "minLength": 1,
            "description": "Optional missing-evidence requirement in this subject and workspace. The upload is attached to the requirement; AMLOK validates evidence and resumes the parent when accepted."
          }
        },
        "required": [
          "file",
          "subject_id",
          "document_type"
        ],
        "additionalProperties": false
      },
      "EP145Request": {
        "type": "object",
        "properties": {
          "purpose": {
            "type": "string",
            "minLength": 1,
            "description": "Request field from the endpoint contract."
          },
          "manifest_id": {
            "type": "string",
            "minLength": 1,
            "description": "Return the exact document bytes referenced by this manifest. Never substitute the latest document version."
          }
        },
        "required": [
          "purpose"
        ],
        "additionalProperties": false
      },
      "EP146Request": {
        "type": "object",
        "properties": {
          "applicant_entity_id": {
            "type": "string",
            "minLength": 1,
            "description": "Applicant record."
          },
          "product_type": {
            "$ref": "#/components/schemas/Enum_credit_product",
            "description": "Requested credit product."
          },
          "requested_amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/MoneyInput"
              },
              {
                "properties": {
                  "amount": {
                    "pattern": "^(?:0\\.(?:0[1-9]|[1-9][0-9])|[1-9][0-9]*\\.[0-9]{2})$"
                  }
                }
              }
            ],
            "description": "Requested credit amount and currency."
          },
          "purpose": {
            "type": "string",
            "minLength": 1,
            "description": "Declared use of funds."
          },
          "requested_term_months": {
            "type": "integer",
            "minimum": 1,
            "description": "Requested contractual term in months."
          }
        },
        "required": [
          "applicant_entity_id",
          "product_type",
          "requested_amount"
        ],
        "additionalProperties": false
      },
      "EP147Request": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Primary workflow subject."
          },
          "workflow_type": {
            "$ref": "#/components/schemas/Enum_workflow_type",
            "description": "One of four assessment workflow types."
          },
          "workflow_version": {
            "type": "string",
            "minLength": 1,
            "description": "Approved ID from GET /v1/configuration workflow_versions, matching this workflow type and product."
          },
          "input_resource_ids": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Input records authorized for this run."
          },
          "application_id": {
            "type": "string",
            "minLength": 1,
            "description": "Application context if applicable."
          },
          "loan_id": {
            "type": "string",
            "minLength": 1,
            "description": "Loan context if applicable."
          },
          "input_manifest_id": {
            "type": "string",
            "minLength": 1,
            "description": "Ready immutable initial manifest for this run. All input references must exist in this manifest. Its ID is retained as initial_input_manifest_id. Accepted missing evidence can produce a successor manifest without changing the run or creating another charge; the current input_manifest_id and audit event identify it."
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          }
        },
        "required": [
          "subject_id",
          "workflow_type",
          "workflow_version",
          "input_resource_ids",
          "input_manifest_id"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "workflow_type": {
                  "const": "underwrite"
                }
              }
            },
            "then": {
              "required": [
                "application_id"
              ],
              "not": {
                "required": [
                  "processing_context"
                ]
              }
            }
          },
          {
            "if": {
              "properties": {
                "workflow_type": {
                  "enum": [
                    "verify",
                    "monitor",
                    "investigate"
                  ]
                }
              }
            },
            "then": {
              "required": [
                "processing_context"
              ]
            }
          },
          {
            "properties": {
              "processing_context": {
                "not": {
                  "required": [
                    "subject_association_id"
                  ]
                }
              }
            }
          }
        ]
      },
      "EP148Request": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Subject being assessed."
          },
          "keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Requested attribute names."
          },
          "window_start": {
            "type": "string",
            "format": "date",
            "description": "Inclusive interval start."
          },
          "window_end": {
            "type": "string",
            "format": "date",
            "description": "Exclusive interval end."
          },
          "input_manifest_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable authorized evidence manifest."
          },
          "processing_context": {
            "$ref": "#/components/schemas/ProcessingContext"
          }
        },
        "required": [
          "subject_id",
          "keys",
          "window_start",
          "window_end",
          "input_manifest_id",
          "processing_context"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "properties": {
              "processing_context": {
                "not": {
                  "required": [
                    "subject_association_id"
                  ]
                }
              }
            }
          }
        ]
      },
      "EP150Request": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Borrower to monitor."
          },
          "baseline_snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Original approved assessment."
          },
          "resource_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "connection",
                "consent",
                "sync_job",
                "business",
                "person",
                "relationship",
                "verification",
                "verification_check",
                "screening_match",
                "document",
                "bank_account",
                "account_balance",
                "bank_transaction",
                "recurring_stream",
                "income_observation",
                "merchant_account",
                "payment",
                "processor_transaction",
                "payout",
                "refund",
                "dispute",
                "counterparty",
                "order",
                "order_line",
                "subscription",
                "ledger_account",
                "journal",
                "journal_line",
                "invoice",
                "bill",
                "credit_note",
                "accounting_payment",
                "financial_statement",
                "statement_line",
                "tax_obligation",
                "product",
                "location",
                "inventory_balance",
                "inventory_movement",
                "purchase_order",
                "shipment",
                "production_order",
                "project",
                "application",
                "credit_facility",
                "loan",
                "installment",
                "repayment",
                "collateral",
                "guarantee",
                "covenant",
                "decision",
                "lien_search",
                "lien",
                "filing_event",
                "attribute",
                "risk_snapshot",
                "monitor",
                "alert",
                "workflow_run",
                "requirement",
                "audit_event",
                "reconciliation_link"
              ]
            },
            "minItems": 1,
            "description": "Requested source domains."
          },
          "attribute_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 1,
            "description": "Metrics to track."
          },
          "cadence": {
            "type": "string",
            "minLength": 1,
            "description": "ID from GET /v1/configuration cadences. Invalid IDs return 422 validation_error. Source freshness is not guaranteed by this schedule."
          },
          "ruleset_version": {
            "type": "string",
            "minLength": 1,
            "description": "Approved ID from GET /v1/configuration rulesets; validate attributes and resource types against it."
          }
        },
        "required": [
          "subject_id",
          "baseline_snapshot_id",
          "resource_types",
          "attribute_keys",
          "cadence",
          "ruleset_version"
        ],
        "additionalProperties": false
      },
      "EP151Request": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "cancelled"
            ]
          },
          "cadence": {
            "type": "string",
            "minLength": 1,
            "description": "ID from GET /v1/configuration cadences. Invalid IDs return 422 validation_error. Source freshness is not guaranteed by this schedule."
          },
          "attribute_keys": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Tracked calculated attributes."
          },
          "ruleset_version": {
            "type": "string",
            "minLength": 1,
            "description": "Approved ID from GET /v1/configuration rulesets; validate attributes and resource types against it."
          }
        },
        "additionalProperties": false,
        "minProperties": 1
      },
      "EP158Request": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "format": "uri",
            "pattern": "^https://",
            "description": "HTTPS destination permitted for this tenant."
          },
          "event_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "business.created",
                "person.created",
                "connection.updated",
                "consent.updated",
                "sync.completed",
                "sync.failed",
                "verification.updated",
                "verification.completed",
                "document.processed",
                "lien_search.completed",
                "lien_search.failed",
                "lien.updated",
                "application.updated",
                "decision.created",
                "loan.updated",
                "repayment.updated",
                "attributes.calculated",
                "risk_snapshot.created",
                "monitor.updated",
                "alert.created",
                "alert.updated",
                "workflow.completed",
                "workflow.failed",
                "resource.deleted"
              ]
            },
            "minItems": 1,
            "description": "Subscribed keys from Events."
          },
          "description": {
            "type": "string",
            "minLength": 1,
            "description": "Request field from the endpoint contract."
          }
        },
        "required": [
          "url",
          "event_types"
        ],
        "additionalProperties": false
      },
      "EP160Request": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "minLength": 1,
            "description": "Request field from the endpoint contract."
          }
        },
        "required": [
          "event_id"
        ],
        "additionalProperties": false
      },
      "BillingAccount": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "currency": {
            "type": "string",
            "enum": [
              "CAD"
            ]
          },
          "agreement_id": {
            "type": "string",
            "minLength": 1
          },
          "agreement_version": {
            "type": "string",
            "minLength": 1
          },
          "minimum_monthly_commitment": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "payment_for_12_months": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "term_start": {
            "type": "string",
            "format": "date-time"
          },
          "term_end": {
            "type": "string",
            "format": "date-time"
          },
          "renewal_payment_at": {
            "type": "string",
            "format": "date-time"
          },
          "credit_type": {
            "type": "string",
            "enum": [
              "prepaid_service_credits"
            ]
          },
          "outflow_policy": {
            "type": "string",
            "enum": [
              "product_usage_or_final_cancellation_refund"
            ]
          },
          "refund_policy": {
            "type": "string",
            "enum": [
              "full_unused_balance_on_final_cancellation"
            ]
          },
          "access": {
            "type": "string",
            "enum": [
              "reporting_only"
            ]
          },
          "portal_controls": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "payment_methods",
                "automatic_top_ups",
                "account_cancellation"
              ]
            }
          },
          "funding_methods": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "card",
                "bank_account"
              ]
            }
          },
          "default_auto_top_up_threshold": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units.",
            "const": "200.00"
          },
          "payment_frequency": {
            "type": "string",
            "enum": [
              "every_12_months"
            ]
          },
          "cancellation_notice_days": {
            "type": "integer",
            "const": 0
          },
          "closure_timing": {
            "type": "string",
            "enum": [
              "end_of_request_month"
            ]
          },
          "processing_cutoff": {
            "type": "string",
            "enum": [
              "immediate_on_cancellation"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "cancellation_pending"
            ]
          },
          "cancellation_requested_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "scheduled_closure_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "minimum_top_up_threshold": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units.",
            "const": "200.00"
          },
          "minimum_top_up_amount": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units.",
            "const": "500.00"
          },
          "auto_top_up_enabled": {
            "type": "boolean"
          },
          "auto_top_up_threshold": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Actual configured threshold, at least CAD 200. Compare against available_credits. Only the portal can change it."
          },
          "auto_top_up_amount": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Actual configured amount, at least CAD 500. Only the portal can change it."
          },
          "auto_top_up_balance_basis": {
            "type": "string",
            "enum": [
              "available_credits"
            ]
          },
          "refund_destination": {
            "type": "string",
            "enum": [
              "saved_portal_bank_account"
            ]
          },
          "policy_version": {
            "type": "string",
            "minLength": 1
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "currency",
          "agreement_id",
          "agreement_version",
          "minimum_monthly_commitment",
          "payment_for_12_months",
          "term_start",
          "term_end",
          "renewal_payment_at",
          "credit_type",
          "outflow_policy",
          "refund_policy",
          "access",
          "portal_controls",
          "funding_methods",
          "default_auto_top_up_threshold",
          "payment_frequency",
          "cancellation_notice_days",
          "closure_timing",
          "processing_cutoff",
          "status",
          "cancellation_requested_at",
          "scheduled_closure_at",
          "minimum_top_up_threshold",
          "minimum_top_up_amount",
          "auto_top_up_enabled",
          "auto_top_up_threshold",
          "auto_top_up_amount",
          "auto_top_up_balance_basis",
          "refund_destination",
          "policy_version",
          "snapshot_id"
        ],
        "additionalProperties": false
      },
      "BillingRate": {
        "type": "object",
        "properties": {
          "product": {
            "type": "string",
            "enum": [
              "insights",
              "signal"
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "standard",
              "advanced",
              "complex"
            ]
          },
          "unit": {
            "type": "string",
            "enum": [
              "completed_underwriting",
              "active_account_month"
            ]
          },
          "base_rate": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "discount_percent": {
            "type": "string",
            "pattern": "^(?:100(?:\\.0{1,2})?|[0-9]{1,2}(?:\\.[0-9]{1,2})?)$"
          },
          "effective_rate": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "pricing_basis": {
            "type": "string",
            "enum": [
              "published",
              "negotiated"
            ],
            "description": "A custom quote uses negotiated pricing under an existing tier, with explicit agreed limits."
          },
          "workload_limits": {
            "$ref": "#/components/schemas/BillingWorkloadLimits"
          },
          "billing_timing": {
            "type": "string",
            "enum": [
              "month_start_or_first_activation",
              "successful_output_completion"
            ]
          }
        },
        "required": [
          "product",
          "tier",
          "unit",
          "base_rate",
          "discount_percent",
          "effective_rate",
          "pricing_basis",
          "workload_limits",
          "billing_timing"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "product": {
                  "const": "insights"
                }
              }
            },
            "then": {
              "properties": {
                "unit": {
                  "const": "completed_underwriting"
                },
                "workload_limits": {
                  "properties": {
                    "record_counting_basis": {
                      "const": "per_underwriting"
                    },
                    "minimum_banking_history_months": {
                      "type": "integer",
                      "minimum": 12
                    }
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "product": {
                  "const": "signal"
                }
              }
            },
            "then": {
              "properties": {
                "unit": {
                  "const": "active_account_month"
                },
                "workload_limits": {
                  "properties": {
                    "record_counting_basis": {
                      "const": "new_records_per_month"
                    },
                    "minimum_banking_history_months": {
                      "type": "null"
                    }
                  }
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "product": {
                  "const": "signal"
                }
              }
            },
            "then": {
              "properties": {
                "billing_timing": {
                  "const": "month_start_or_first_activation"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "product": {
                  "const": "insights"
                }
              }
            },
            "then": {
              "properties": {
                "billing_timing": {
                  "const": "successful_output_completion"
                }
              }
            }
          }
        ],
        "description": "CAD rates have exactly two decimals. Round the discounted effective unit rate first using decimal half-up rounding; multiply by billable quantity and round each charge to two decimals. Negotiated effective rates already include any discount."
      },
      "BillingWorkloadLimits": {
        "type": "object",
        "properties": {
          "bank_accounts": {
            "type": "integer",
            "minimum": 0
          },
          "business_integrations": {
            "type": "integer",
            "minimum": 0
          },
          "record_limit": {
            "type": "integer",
            "minimum": 1
          },
          "record_counting_basis": {
            "type": "string",
            "enum": [
              "per_underwriting",
              "new_records_per_month"
            ]
          },
          "record_counting_rule": {
            "type": "string",
            "enum": [
              "distinct_record_versions"
            ]
          },
          "minimum_banking_history_months": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 12
              },
              {
                "type": "null"
              }
            ]
          },
          "analysis_scope": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "bank_accounts",
          "business_integrations",
          "record_limit",
          "record_counting_basis",
          "record_counting_rule",
          "minimum_banking_history_months",
          "analysis_scope"
        ],
        "additionalProperties": false
      },
      "BillingRateCard": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "currency": {
            "type": "string",
            "enum": [
              "CAD"
            ]
          },
          "effective_from": {
            "type": "string",
            "format": "date-time"
          },
          "effective_to": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "agreement_id": {
            "type": "string",
            "minLength": 1
          },
          "agreement_version": {
            "type": "string",
            "minLength": 1
          },
          "supersedes_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "rates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingRate"
            }
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "currency",
          "effective_from",
          "effective_to",
          "agreement_id",
          "agreement_version",
          "supersedes_id",
          "rates",
          "snapshot_id"
        ],
        "additionalProperties": false
      },
      "BillingUsage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "insights",
              "signal"
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "standard",
              "advanced",
              "complex"
            ]
          },
          "source_resource_id": {
            "type": "string",
            "minLength": 1,
            "description": "Workflow-run ID for Insights; borrower/business ID for Signal. Follow workflow_run_id, application_id, input_manifest_id and risk_snapshot_id for underwriting evidence, or monitoring_period_id for the single Signal account-month."
          },
          "unit": {
            "type": "string",
            "enum": [
              "completed_underwriting",
              "active_account_month"
            ],
            "description": "Signal counts each active borrower/business once per workspace per month, including change-driven reassessment without an additional Insights charge, regardless of checks, monitoring configurations, facilities or data connections. Cancellation immediately stops further processing and usage deductions. Previously spent credits remain consumed; cancelled unfinished work creates no charge."
          },
          "quantity": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)(\\.[0-9]+)?$"
          },
          "unit_rate": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "currency": {
            "type": "string",
            "enum": [
              "CAD"
            ]
          },
          "amount": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Signed CAD amount with exactly two decimal places. Negative values represent deductions or reversing adjustments."
          },
          "entry_type": {
            "type": "string",
            "enum": [
              "charge",
              "reversal"
            ]
          },
          "reverses_usage_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "posted"
            ]
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "workflow_run_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "input_manifest_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "risk_snapshot_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "monitoring_period_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "posted_at": {
            "type": "string",
            "format": "date-time"
          },
          "billing_period_start": {
            "type": "string",
            "format": "date-time"
          },
          "billing_period_end": {
            "type": "string",
            "format": "date-time"
          },
          "rate_card_id": {
            "type": "string",
            "minLength": 1
          },
          "ledger_entry_id": {
            "type": "string",
            "minLength": 1
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "billing_account_id",
          "product",
          "tier",
          "source_resource_id",
          "unit",
          "quantity",
          "unit_rate",
          "currency",
          "amount",
          "entry_type",
          "reverses_usage_id",
          "status",
          "subject_id",
          "workflow_run_id",
          "application_id",
          "input_manifest_id",
          "risk_snapshot_id",
          "monitoring_period_id",
          "occurred_at",
          "posted_at",
          "billing_period_start",
          "billing_period_end",
          "rate_card_id",
          "ledger_entry_id",
          "snapshot_id"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "product": {
                  "const": "insights"
                }
              }
            },
            "then": {
              "properties": {
                "unit": {
                  "const": "completed_underwriting"
                },
                "workflow_run_id": {
                  "type": "string",
                  "minLength": 1
                },
                "input_manifest_id": {
                  "type": "string",
                  "minLength": 1
                },
                "risk_snapshot_id": {
                  "type": "string",
                  "minLength": 1
                },
                "monitoring_period_id": {
                  "type": "null"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "product": {
                  "const": "signal"
                }
              }
            },
            "then": {
              "properties": {
                "unit": {
                  "const": "active_account_month"
                },
                "monitoring_period_id": {
                  "type": "string",
                  "minLength": 1
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "entry_type": {
                  "const": "charge"
                }
              }
            },
            "then": {
              "properties": {
                "quantity": {
                  "const": "1"
                },
                "amount": {
                  "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$"
                },
                "reverses_usage_id": {
                  "type": "null"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "entry_type": {
                  "const": "reversal"
                }
              }
            },
            "then": {
              "properties": {
                "amount": {
                  "pattern": "^-(0|[1-9][0-9]*)\\.[0-9]{2}$"
                },
                "reverses_usage_id": {
                  "type": "string",
                  "minLength": 1
                }
              }
            }
          }
        ]
      },
      "ConsumptionRow": {
        "type": "object",
        "properties": {
          "product": {
            "type": "string",
            "enum": [
              "insights",
              "signal"
            ]
          },
          "tier": {
            "type": "string",
            "enum": [
              "standard",
              "advanced",
              "complex"
            ]
          },
          "bucket_start": {
            "type": "string",
            "format": "date-time"
          },
          "bucket_end": {
            "type": "string",
            "format": "date-time"
          },
          "quantity": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)(\\.[0-9]+)?$"
          },
          "unit": {
            "type": "string",
            "enum": [
              "completed_underwriting",
              "active_account_month"
            ]
          },
          "gross_amount": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "adjustment_amount": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Signed CAD amount with exactly two decimal places. Negative values represent deductions or reversing adjustments."
          },
          "net_amount": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Signed CAD amount with exactly two decimal places. Negative values represent deductions or reversing adjustments."
          }
        },
        "required": [
          "product",
          "tier",
          "bucket_start",
          "bucket_end",
          "quantity",
          "unit",
          "gross_amount",
          "adjustment_amount",
          "net_amount"
        ],
        "additionalProperties": false
      },
      "BillingConsumption": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1
          },
          "currency": {
            "type": "string",
            "enum": [
              "CAD"
            ]
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "time_basis": {
            "type": "string",
            "enum": [
              "occurred_at",
              "posted_at"
            ]
          },
          "group_by": {
            "type": "string",
            "enum": [
              "product_tier",
              "day",
              "month"
            ]
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsumptionRow"
            }
          },
          "total_net_amount": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Signed CAD amount with exactly two decimal places. Negative values represent deductions or reversing adjustments."
          },
          "provisional": {
            "type": "boolean"
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "billing_account_id",
          "currency",
          "from",
          "to",
          "as_of",
          "time_basis",
          "group_by",
          "rows",
          "total_net_amount",
          "provisional",
          "snapshot_id"
        ],
        "additionalProperties": false
      },
      "CreateBillingReport": {
        "type": "object",
        "properties": {
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "report_type": {
            "type": "string",
            "enum": [
              "usage",
              "ledger",
              "statement",
              "funding"
            ]
          },
          "format": {
            "type": "string",
            "enum": [
              "csv",
              "json"
            ]
          },
          "time_basis": {
            "type": "string",
            "enum": [
              "occurred_at",
              "posted_at",
              "initiated_at"
            ]
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Reuse a snapshot returned by a financial read. If omitted, freeze a snapshot at acceptance."
          },
          "filters": {
            "type": "object",
            "properties": {
              "product": {
                "type": "string",
                "enum": [
                  "insights",
                  "signal"
                ]
              },
              "tier": {
                "type": "string",
                "enum": [
                  "standard",
                  "advanced",
                  "complex"
                ]
              },
              "source_resource_id": {
                "type": "string",
                "minLength": 1
              },
              "rate_card_id": {
                "type": "string",
                "minLength": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "posted"
                ]
              },
              "entry_type": {
                "type": "string",
                "enum": [
                  "charge",
                  "reversal"
                ]
              }
            },
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "from",
          "to",
          "report_type",
          "format",
          "time_basis"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "report_type": {
                  "enum": [
                    "ledger",
                    "statement"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "time_basis": {
                  "const": "posted_at"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "report_type": {
                  "enum": [
                    "ledger",
                    "statement",
                    "funding"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "filters": {
                  "maxProperties": 0
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "report_type": {
                  "const": "usage"
                }
              }
            },
            "then": {
              "properties": {
                "time_basis": {
                  "enum": [
                    "occurred_at",
                    "posted_at"
                  ]
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "report_type": {
                  "const": "funding"
                }
              }
            },
            "then": {
              "properties": {
                "time_basis": {
                  "enum": [
                    "initiated_at"
                  ]
                }
              }
            }
          }
        ]
      },
      "BillingReport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "report_type": {
            "type": "string",
            "enum": [
              "usage",
              "ledger",
              "statement",
              "funding"
            ]
          },
          "format": {
            "type": "string",
            "enum": [
              "csv",
              "json"
            ]
          },
          "time_basis": {
            "type": "string",
            "enum": [
              "occurred_at",
              "posted_at",
              "initiated_at"
            ]
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "ready",
              "failed",
              "expired"
            ]
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "row_count": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          },
          "filters": {
            "type": "object",
            "properties": {
              "product": {
                "type": "string",
                "enum": [
                  "insights",
                  "signal"
                ]
              },
              "tier": {
                "type": "string",
                "enum": [
                  "standard",
                  "advanced",
                  "complex"
                ]
              },
              "source_resource_id": {
                "type": "string",
                "minLength": 1
              },
              "rate_card_id": {
                "type": "string",
                "minLength": 1
              },
              "status": {
                "type": "string",
                "enum": [
                  "posted"
                ]
              },
              "entry_type": {
                "type": "string",
                "enum": [
                  "charge",
                  "reversal"
                ]
              }
            },
            "required": [],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "from",
          "to",
          "report_type",
          "format",
          "time_basis",
          "billing_account_id",
          "status",
          "as_of",
          "row_count",
          "expires_at",
          "failure_code",
          "snapshot_id",
          "filters"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "report_type": {
                  "enum": [
                    "ledger",
                    "statement"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "time_basis": {
                  "const": "posted_at"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "report_type": {
                  "enum": [
                    "ledger",
                    "statement",
                    "funding"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "filters": {
                  "maxProperties": 0
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "report_type": {
                  "const": "usage"
                }
              }
            },
            "then": {
              "properties": {
                "time_basis": {
                  "enum": [
                    "occurred_at",
                    "posted_at"
                  ]
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "report_type": {
                  "const": "funding"
                }
              }
            },
            "then": {
              "properties": {
                "time_basis": {
                  "enum": [
                    "initiated_at"
                  ]
                }
              }
            }
          }
        ]
      },
      "BillingDownload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "url",
          "expires_at",
          "sha256"
        ],
        "additionalProperties": false
      },
      "BillingStatement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "to": {
            "type": "string",
            "format": "date-time"
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1
          },
          "currency": {
            "type": "string",
            "enum": [
              "CAD"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "provisional",
              "final"
            ]
          },
          "revision": {
            "type": "integer",
            "minimum": 1
          },
          "supersedes_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "opening_balance": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "funding": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "usage": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "refunds": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "closing_balance": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "adjustments": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Signed CAD amount with exactly two decimal places. Negative values represent deductions or reversing adjustments."
          },
          "ledger_sequence_from": {
            "type": "integer",
            "minimum": 0
          },
          "ledger_sequence_to": {
            "type": "integer",
            "minimum": 0
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "from",
          "to",
          "billing_account_id",
          "currency",
          "status",
          "revision",
          "supersedes_id",
          "as_of",
          "opening_balance",
          "funding",
          "usage",
          "refunds",
          "closing_balance",
          "adjustments",
          "ledger_sequence_from",
          "ledger_sequence_to",
          "snapshot_id"
        ],
        "additionalProperties": false
      },
      "BillingCreditBalance": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1
          },
          "currency": {
            "type": "string",
            "enum": [
              "CAD"
            ]
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "ledger_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "available_credits": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "One spendable CAD balance. Top-ups increase it; completed product charges and final refunds decrease it. There are no reserved credits or separate posted-credit balances."
          },
          "spent_credits": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Cumulative product charges minus correcting reversals since account opening, at this snapshot. Refunds are not product spend. Read consumption reports for a particular period."
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "billing_account_id",
          "currency",
          "as_of",
          "ledger_sequence",
          "available_credits",
          "spent_credits",
          "snapshot_id"
        ],
        "additionalProperties": false
      },
      "BillingCreditEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1
          },
          "sequence": {
            "type": "integer",
            "minimum": 0
          },
          "currency": {
            "type": "string",
            "enum": [
              "CAD"
            ]
          },
          "amount": {
            "type": "string",
            "pattern": "^-?(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Signed CAD amount with exactly two decimal places. Negative values represent deductions or reversing adjustments."
          },
          "balance_after": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "entry_type": {
            "type": "string",
            "enum": [
              "funding",
              "usage",
              "refund",
              "adjustment",
              "reversal"
            ]
          },
          "movement_id": {
            "type": "string",
            "minLength": 1
          },
          "reverses_entry_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "posted_at": {
            "type": "string",
            "format": "date-time"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "billing_account_id",
          "sequence",
          "currency",
          "amount",
          "balance_after",
          "entry_type",
          "movement_id",
          "reverses_entry_id",
          "posted_at",
          "client_reference",
          "snapshot_id"
        ],
        "additionalProperties": false
      },
      "BillingSnapshot": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "ledger_sequence": {
            "type": "integer",
            "minimum": 0
          },
          "consistency": {
            "type": "string",
            "enum": [
              "immutable_workspace_billing_snapshot"
            ]
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "billing_account_id",
          "as_of",
          "ledger_sequence",
          "consistency"
        ],
        "additionalProperties": false
      },
      "BillingFunding": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized workspace whose unified billing account owns this report."
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1
          },
          "currency": {
            "type": "string",
            "enum": [
              "CAD"
            ]
          },
          "amount": {
            "type": "string",
            "pattern": "^(0|[1-9][0-9]*)\\.[0-9]{2}$",
            "description": "Nonnegative CAD amount, exact decimal string in major units."
          },
          "source": {
            "type": "string",
            "enum": [
              "annual_prepayment",
              "customer_top_up",
              "promotional_top_up"
            ]
          },
          "payment_method_type": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "card",
                  "bank_account"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "settled",
              "failed",
              "cancelled"
            ]
          },
          "initiated_at": {
            "type": "string",
            "format": "date-time"
          },
          "settled_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "invoice_reference": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "receipt_reference": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "ledger_entry_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Immutable workspace billing snapshot used for this financial representation."
          }
        },
        "required": [
          "id",
          "object",
          "record_version",
          "created_at",
          "updated_at",
          "workspace_id",
          "billing_account_id",
          "currency",
          "amount",
          "source",
          "payment_method_type",
          "status",
          "initiated_at",
          "settled_at",
          "failure_code",
          "invoice_reference",
          "receipt_reference",
          "ledger_entry_id",
          "client_reference",
          "snapshot_id"
        ],
        "additionalProperties": false
      },
      "BillingReportDownloadRequest": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "Healthcheck": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "timestamp"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "unavailable"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ServiceStatus": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "status",
          "updated_at",
          "services"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "partial_outage",
              "major_outage",
              "maintenance",
              "unknown"
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "id",
                "name",
                "status",
                "updated_at"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "operational",
                    "degraded",
                    "partial_outage",
                    "major_outage",
                    "maintenance",
                    "unknown"
                  ]
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          }
        }
      },
      "InputManifest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "superseded",
              "revoked"
            ]
          },
          "window_start": {
            "type": "string",
            "format": "date"
          },
          "window_end": {
            "type": "string",
            "format": "date"
          },
          "record_count": {
            "type": "integer",
            "minimum": 0
          },
          "source_connection_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "description": "SHA-256 of UTF-8 NDJSON manifest entries sorted by (resource_type, resource_id, resource_version), with keys sorted lexically, compact separators and one LF after every entry. Concatenate every page before hashing. This proves manifest membership, not correctness of the source evidence."
          }
        },
        "required": [
          "id",
          "object",
          "workspace_id",
          "subject_id",
          "created_at",
          "updated_at",
          "record_version",
          "status",
          "window_start",
          "window_end",
          "record_count",
          "source_connection_ids",
          "sha256"
        ]
      },
      "MonitoringBaseline": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "minLength": 1
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "superseded",
              "revoked"
            ]
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1
          },
          "input_manifest_id": {
            "type": "string",
            "minLength": 1
          },
          "approved_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "object",
          "workspace_id",
          "subject_id",
          "created_at",
          "updated_at",
          "record_version",
          "status",
          "snapshot_id",
          "input_manifest_id",
          "approved_at"
        ]
      },
      "ProcessingContext": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "product": {
                "const": "insights",
                "type": "string"
              },
              "workflow_run_id": {
                "type": "string",
                "minLength": 1
              },
              "subject_association_id": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "product",
              "workflow_run_id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "product": {
                "const": "signal",
                "type": "string"
              },
              "monitoring_period_id": {
                "type": "string",
                "minLength": 1
              },
              "subject_association_id": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "product",
              "monitoring_period_id"
            ],
            "additionalProperties": false
          }
        ],
        "discriminator": {
          "propertyName": "product"
        },
        "description": "Parent must belong to this workspace. Same-subject stages need no association. Only person KYC may target a different subject: supply an active subject_association_id linking that person to the parent business. Insights requires an unfinished authorized root run; Signal requires an active paid period. Stage scope, consent, association and workload are checked on every attempt. The parent business remains the billing and workload subject. No standalone service or extra charge."
      },
      "WorkloadDimension": {
        "type": "object",
        "properties": {
          "used": {
            "type": "integer",
            "minimum": 0
          },
          "limit": {
            "type": "integer",
            "minimum": 0
          },
          "remaining": {
            "type": "integer",
            "minimum": 0
          }
        },
        "required": [
          "used",
          "limit",
          "remaining"
        ],
        "additionalProperties": false
      },
      "WorkloadReport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "const": "workload",
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "insights",
              "signal"
            ]
          },
          "workflow_run_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "monitoring_period_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "rate_card_id": {
            "type": "string",
            "minLength": 1
          },
          "tier": {
            "type": "string",
            "enum": [
              "standard",
              "advanced",
              "complex"
            ]
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "period_start": {
            "type": "string",
            "format": "date-time"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          },
          "record_counting_basis": {
            "type": "string",
            "enum": [
              "per_underwriting",
              "new_records_per_month"
            ]
          },
          "bank_accounts": {
            "$ref": "#/components/schemas/WorkloadDimension"
          },
          "business_integrations": {
            "$ref": "#/components/schemas/WorkloadDimension"
          },
          "records": {
            "$ref": "#/components/schemas/WorkloadDimension"
          },
          "status": {
            "type": "string",
            "enum": [
              "within_limits",
              "at_limit",
              "blocked"
            ]
          },
          "blocking_dimensions": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "bank_accounts",
                "business_integrations",
                "records",
                "analysis_scope"
              ]
            }
          },
          "analysis_scope": {
            "type": "string",
            "minLength": 1
          },
          "input_manifest_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "workspace_id",
          "subject_id",
          "product",
          "workflow_run_id",
          "monitoring_period_id",
          "rate_card_id",
          "tier",
          "as_of",
          "period_start",
          "period_end",
          "record_counting_basis",
          "bank_accounts",
          "business_integrations",
          "records",
          "status",
          "blocking_dimensions",
          "analysis_scope",
          "input_manifest_id"
        ],
        "additionalProperties": false
      },
      "MonitoringPeriod": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "const": "monitoring_period",
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "period_start": {
            "type": "string",
            "format": "date-time"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          },
          "first_activated_at": {
            "type": "string",
            "format": "date-time"
          },
          "charged_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "billing_usage_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "blocked",
              "unfunded",
              "cancelled"
            ]
          },
          "workload_id": {
            "type": "string",
            "minLength": 1
          },
          "baseline_snapshot_id": {
            "type": "string",
            "minLength": 1
          },
          "rate_card_id": {
            "type": "string",
            "minLength": 1
          },
          "tier": {
            "type": "string",
            "enum": [
              "standard",
              "advanced",
              "complex"
            ]
          },
          "blocked_reason": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "insufficient_credits",
                  "workload_limit_exceeded",
                  "missing_evidence",
                  "consent_unavailable"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "workspace_id",
          "subject_id",
          "period_start",
          "period_end",
          "first_activated_at",
          "charged_at",
          "billing_usage_id",
          "status",
          "workload_id",
          "baseline_snapshot_id",
          "rate_card_id",
          "tier",
          "blocked_reason"
        ],
        "additionalProperties": false
      },
      "ManifestEntry": {
        "type": "object",
        "properties": {
          "resource_type": {
            "type": "string",
            "minLength": 1
          },
          "resource_id": {
            "type": "string",
            "minLength": 1
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "source_record_id": {
            "type": "string",
            "minLength": 1
          },
          "source_version": {
            "type": "string",
            "minLength": 1
          },
          "content_sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "resource_type",
          "resource_id",
          "resource_version",
          "source_record_id",
          "source_version",
          "content_sha256"
        ],
        "additionalProperties": false
      },
      "CreateSyncCheckpoint": {
        "type": "object",
        "properties": {
          "resource_types": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "enum": [
                "connection",
                "consent",
                "sync_job",
                "business",
                "person",
                "relationship",
                "verification",
                "verification_check",
                "screening_match",
                "document",
                "bank_account",
                "account_balance",
                "bank_transaction",
                "recurring_stream",
                "income_observation",
                "merchant_account",
                "payment",
                "processor_transaction",
                "payout",
                "refund",
                "dispute",
                "counterparty",
                "order",
                "order_line",
                "subscription",
                "ledger_account",
                "journal",
                "journal_line",
                "invoice",
                "bill",
                "credit_note",
                "accounting_payment",
                "financial_statement",
                "statement_line",
                "tax_obligation",
                "product",
                "location",
                "inventory_balance",
                "inventory_movement",
                "purchase_order",
                "shipment",
                "production_order",
                "project",
                "application",
                "credit_facility",
                "loan",
                "installment",
                "repayment",
                "collateral",
                "guarantee",
                "covenant",
                "decision",
                "lien_search",
                "lien",
                "filing_event",
                "attribute",
                "risk_snapshot",
                "monitor",
                "alert",
                "workflow_run",
                "requirement",
                "audit_event",
                "reconciliation_link"
              ]
            },
            "minItems": 1
          }
        },
        "required": [
          "resource_types"
        ],
        "additionalProperties": false
      },
      "SyncCheckpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "type": "string",
            "const": "sync_checkpoint"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "resource_types": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "resume_cursor": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "object",
          "workspace_id",
          "as_of",
          "expires_at",
          "resource_types",
          "resume_cursor"
        ],
        "additionalProperties": false
      },
      "BillingUsageExport": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "string",
            "const": "1.4.2"
          },
          "report_type": {
            "type": "string",
            "const": "usage"
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingUsage"
            }
          }
        },
        "required": [
          "schema_version",
          "report_type",
          "snapshot_id",
          "as_of",
          "rows"
        ],
        "additionalProperties": false
      },
      "BillingLedgerExport": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "string",
            "const": "1.4.2"
          },
          "report_type": {
            "type": "string",
            "const": "ledger"
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingCreditEntry"
            }
          }
        },
        "required": [
          "schema_version",
          "report_type",
          "snapshot_id",
          "as_of",
          "rows"
        ],
        "additionalProperties": false
      },
      "BillingStatementExport": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "string",
            "const": "1.4.2"
          },
          "report_type": {
            "type": "string",
            "const": "statement"
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingStatement"
            }
          }
        },
        "required": [
          "schema_version",
          "report_type",
          "snapshot_id",
          "as_of",
          "rows"
        ],
        "additionalProperties": false
      },
      "BillingFundingExport": {
        "type": "object",
        "properties": {
          "schema_version": {
            "type": "string",
            "const": "1.4.2"
          },
          "report_type": {
            "type": "string",
            "const": "funding"
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1
          },
          "as_of": {
            "type": "string",
            "format": "date-time"
          },
          "rows": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingFunding"
            }
          }
        },
        "required": [
          "schema_version",
          "report_type",
          "snapshot_id",
          "as_of",
          "rows"
        ],
        "additionalProperties": false
      },
      "AuthorizationRequest": {
        "type": "object",
        "properties": {
          "consent_id": {
            "type": "string",
            "minLength": 1
          },
          "redirect_uri": {
            "type": "string",
            "format": "uri",
            "pattern": "^https://"
          },
          "state": {
            "type": "string",
            "minLength": 32,
            "maxLength": 256
          }
        },
        "required": [
          "consent_id",
          "redirect_uri",
          "state"
        ],
        "additionalProperties": false
      },
      "ProviderProduct": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "resources": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "consent_scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "purposes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "id",
          "resources",
          "consent_scopes",
          "purposes"
        ],
        "additionalProperties": false
      },
      "SubjectAssociation": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "const": "subject_association",
            "type": "string"
          },
          "business_id": {
            "type": "string",
            "minLength": 1
          },
          "person_id": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "type": "string",
            "enum": [
              "beneficial_owner",
              "director",
              "guarantor",
              "authorized_signatory"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "active",
              "rejected",
              "revoked"
            ]
          },
          "evidence_document_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "relationship_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "reason_code": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "id",
          "object",
          "business_id",
          "person_id",
          "role",
          "status",
          "evidence_document_ids",
          "relationship_id",
          "reason_code",
          "created_at",
          "updated_at",
          "record_version"
        ],
        "additionalProperties": false
      },
      "SubjectAssociationRequest": {
        "type": "object",
        "properties": {
          "business_id": {
            "type": "string",
            "minLength": 1
          },
          "person_id": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "type": "string",
            "enum": [
              "beneficial_owner",
              "director",
              "guarantor",
              "authorized_signatory"
            ]
          },
          "evidence_document_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 1,
            "uniqueItems": true
          }
        },
        "required": [
          "business_id",
          "person_id",
          "role",
          "evidence_document_ids"
        ],
        "additionalProperties": false
      },
      "ProcessingFailure": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "provider_unavailable",
              "processing_timeout",
              "invalid_evidence",
              "unsupported_scope",
              "internal_processing_error"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "retryable": {
            "type": "boolean"
          },
          "recovery_action": {
            "type": "string",
            "enum": [
              "retry_same_run",
              "correct_evidence",
              "contact_support"
            ]
          },
          "retry_after_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time"
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "code",
          "message",
          "retryable",
          "recovery_action",
          "retry_after_seconds",
          "occurred_at",
          "request_id"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "retryable": {
                  "const": true
                }
              }
            },
            "then": {
              "properties": {
                "recovery_action": {
                  "const": "retry_same_run"
                },
                "retry_after_seconds": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            },
            "else": {
              "properties": {
                "recovery_action": {
                  "type": "string",
                  "enum": [
                    "correct_evidence",
                    "contact_support"
                  ]
                },
                "retry_after_seconds": {
                  "type": "null"
                }
              }
            }
          }
        ]
      },
      "EvidenceRejection": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "unreadable",
              "wrong_document_type",
              "subject_mismatch",
              "incomplete_period",
              "expired_document",
              "other"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "document_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "reviewed_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "code",
          "message",
          "document_ids",
          "reviewed_at"
        ],
        "additionalProperties": false
      },
      "RequestReceipt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "const": "request_receipt",
            "type": "string"
          },
          "operation_id": {
            "type": "string",
            "minLength": 1
          },
          "target_path": {
            "type": "string",
            "minLength": 1
          },
          "request_id": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "completed",
              "failed",
              "resource_unavailable"
            ]
          },
          "resource_type": {
            "type": "string",
            "minLength": 1
          },
          "resource_id": {
            "type": "string",
            "minLength": 1
          },
          "resource_path": {
            "type": "string",
            "pattern": "^/v1/",
            "description": "Relative authorized GET route for the durable resource or parent. Never a signed URL, external origin or secret-bearing location."
          },
          "original_http_status": {
            "type": "integer",
            "minimum": 200,
            "maximum": 599
          },
          "accepted_at": {
            "type": "string",
            "format": "date-time"
          },
          "replay_expires_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "object",
          "operation_id",
          "target_path",
          "request_id",
          "status",
          "resource_type",
          "resource_id",
          "resource_path",
          "original_http_status",
          "accepted_at",
          "replay_expires_at"
        ],
        "additionalProperties": false
      },
      "WorkflowConfiguration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "workflow_type": {
            "type": "string",
            "enum": [
              "verify",
              "underwrite",
              "monitor",
              "investigate"
            ]
          },
          "products": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "insights",
                "signal"
              ]
            }
          },
          "verification_types": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "kyc",
                "kyb"
              ]
            }
          }
        },
        "required": [
          "id",
          "workflow_type",
          "products",
          "verification_types"
        ],
        "additionalProperties": false
      },
      "RulesetConfiguration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "attribute_keys": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "resource_types": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "id",
          "attribute_keys",
          "resource_types"
        ],
        "additionalProperties": false
      },
      "CadenceConfiguration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "description"
        ],
        "additionalProperties": false
      },
      "EnvironmentConfiguration": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "const": "environment_configuration",
            "type": "string"
          },
          "workspace_id": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "production"
            ]
          },
          "revision": {
            "type": "string",
            "minLength": 1
          },
          "effective_at": {
            "type": "string",
            "format": "date-time"
          },
          "workflow_versions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WorkflowConfiguration"
            }
          },
          "rulesets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RulesetConfiguration"
            }
          },
          "cadences": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CadenceConfiguration"
            }
          },
          "limits": {
            "type": "object",
            "properties": {
              "requests_per_minute": {
                "type": "integer",
                "minimum": 1
              },
              "burst_requests": {
                "type": "integer",
                "minimum": 1
              },
              "concurrent_jobs": {
                "type": "integer",
                "minimum": 1
              },
              "upload_bytes": {
                "type": "integer",
                "minimum": 1
              },
              "document_pages": {
                "type": "integer",
                "minimum": 1
              },
              "mime_types": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "requests_per_minute",
              "burst_requests",
              "concurrent_jobs",
              "upload_bytes",
              "document_pages",
              "mime_types"
            ],
            "additionalProperties": false
          },
          "webhooks": {
            "type": "object",
            "properties": {
              "event_retention_seconds": {
                "type": "integer",
                "minimum": 1
              },
              "delivery_timeout_seconds": {
                "type": "integer",
                "minimum": 1
              },
              "rotation_overlap_seconds": {
                "type": "integer",
                "minimum": 1
              },
              "retained_from": {
                "type": "string",
                "format": "date-time"
              }
            },
            "required": [
              "event_retention_seconds",
              "delivery_timeout_seconds",
              "rotation_overlap_seconds",
              "retained_from"
            ],
            "additionalProperties": false
          },
          "idempotency_replay_seconds": {
            "type": "integer",
            "const": 86400
          }
        },
        "required": [
          "id",
          "object",
          "workspace_id",
          "environment",
          "revision",
          "effective_at",
          "workflow_versions",
          "rulesets",
          "cadences",
          "limits",
          "webhooks",
          "idempotency_replay_seconds"
        ],
        "additionalProperties": false
      },
      "ReadinessCheck": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "passed",
              "pending",
              "blocked"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "code",
          "status",
          "message"
        ],
        "additionalProperties": false
      },
      "SubjectReadiness": {
        "type": "object",
        "properties": {
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "insights",
              "signal"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "preparing",
              "blocked"
            ]
          },
          "checks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReadinessCheck"
            }
          },
          "input_manifest_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "baseline_snapshot_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "next_action": {
            "type": "string",
            "enum": [
              "start_underwriting",
              "create_monitor",
              "wait",
              "supply_evidence",
              "contact_account_manager"
            ]
          },
          "retry_after_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "subject_id",
          "product",
          "status",
          "checks",
          "input_manifest_id",
          "baseline_snapshot_id",
          "next_action",
          "retry_after_seconds",
          "updated_at"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "status": {
                  "const": "ready"
                },
                "product": {
                  "const": "insights"
                }
              }
            },
            "then": {
              "properties": {
                "input_manifest_id": {
                  "type": "string",
                  "minLength": 1
                },
                "next_action": {
                  "const": "start_underwriting"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "const": "ready"
                },
                "product": {
                  "const": "signal"
                }
              }
            },
            "then": {
              "properties": {
                "baseline_snapshot_id": {
                  "type": "string",
                  "minLength": 1
                },
                "next_action": {
                  "const": "create_monitor"
                }
              }
            }
          },
          {
            "if": {
              "properties": {
                "status": {
                  "const": "preparing"
                }
              }
            },
            "then": {
              "properties": {
                "retry_after_seconds": {
                  "type": "integer",
                  "minimum": 1
                },
                "next_action": {
                  "const": "wait"
                }
              }
            }
          }
        ]
      },
      "WebhookDelivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "const": "webhook_delivery",
            "type": "string"
          },
          "endpoint_id": {
            "type": "string",
            "minLength": 1
          },
          "event_id": {
            "type": "string",
            "minLength": 1
          },
          "attempt": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "delivered",
              "failed",
              "exhausted"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "attempted_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "next_attempt_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 100,
                "maximum": 599
              },
              {
                "type": "null"
              }
            ]
          },
          "failure_code": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "timeout",
                  "dns_error",
                  "tls_error",
                  "http_error",
                  "endpoint_disabled"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "replay_request_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "object",
          "endpoint_id",
          "event_id",
          "attempt",
          "status",
          "created_at",
          "attempted_at",
          "next_attempt_at",
          "http_status",
          "failure_code",
          "replay_request_id"
        ],
        "additionalProperties": false
      },
      "SandboxScenario": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "object": {
            "const": "sandbox_scenario",
            "type": "string"
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "subject_id": {
            "type": "string",
            "minLength": 1
          },
          "application_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "input_manifest_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "baseline_snapshot_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "person_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "association_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "workflow_version": {
            "type": "string",
            "minLength": 1
          },
          "ruleset_version": {
            "type": "string",
            "minLength": 1
          },
          "cadence": {
            "type": "string",
            "minLength": 1
          },
          "expected_http_status": {
            "type": "integer",
            "minimum": 200,
            "maximum": 599
          },
          "expected_state": {
            "type": "string",
            "minLength": 1
          },
          "instructions": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "object",
          "name",
          "subject_id",
          "application_id",
          "input_manifest_id",
          "baseline_snapshot_id",
          "connection_id",
          "person_id",
          "association_id",
          "document_id",
          "workflow_version",
          "ruleset_version",
          "cadence",
          "expected_http_status",
          "expected_state",
          "instructions"
        ],
        "additionalProperties": false
      }
    },
    "responses": {
      "Error400": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "invalid_request": {
                "summary": "invalid_request",
                "value": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Malformed input, unknown parameter or incompatible filters.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              },
              "unsupported_parameter": {
                "summary": "unsupported_parameter",
                "value": {
                  "error": {
                    "code": "unsupported_parameter",
                    "message": "Historical query or filter not implemented on this resource.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              },
              "validation_error": {
                "summary": "validation_error",
                "value": {
                  "error": {
                    "code": "validation_error",
                    "message": "A field, projection, or request value is invalid. Inspect error.field.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error401": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "unauthenticated": {
                "summary": "unauthenticated",
                "value": {
                  "error": {
                    "code": "unauthenticated",
                    "message": "Missing, expired or invalid credential.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error403": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "forbidden": {
                "summary": "forbidden",
                "value": {
                  "error": {
                    "code": "forbidden",
                    "message": "Tenant scope or field/product entitlement missing.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error404": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "not_found": {
                "summary": "not_found",
                "value": {
                  "error": {
                    "code": "not_found",
                    "message": "Record does not exist or is not visible in this tenant.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error429": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          },
          "Retry-After": {
            "description": "Delay in seconds or an HTTP-date. The example is illustrative, not a contractual quota.",
            "schema": {
              "type": "string"
            },
            "example": "30"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "rate_limited": {
                "summary": "rate_limited",
                "value": {
                  "error": {
                    "code": "rate_limited",
                    "message": "AMLOK tenant quota or upstream throttle.",
                    "retryable": true,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error502": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "source_error": {
                "summary": "source_error",
                "value": {
                  "error": {
                    "code": "source_error",
                    "message": "Upstream returned invalid or failed data.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error503": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "source_unavailable": {
                "summary": "source_unavailable",
                "value": {
                  "error": {
                    "code": "source_unavailable",
                    "message": "Required source temporarily unavailable.",
                    "retryable": true,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error500": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "internal_error": {
                "summary": "internal_error",
                "value": {
                  "error": {
                    "code": "internal_error",
                    "message": "Unexpected AMLOK processing error.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error410": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "cursor_expired": {
                "summary": "cursor_expired",
                "value": {
                  "error": {
                    "code": "cursor_expired",
                    "message": "The synchronization cursor has expired. Begin a new synchronization checkpoint and rebuild the collection snapshot.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error409": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "idempotency_conflict": {
                "summary": "idempotency_conflict",
                "value": {
                  "error": {
                    "code": "idempotency_conflict",
                    "message": "Same key was reused with different intended input.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              },
              "invalid_state": {
                "summary": "invalid_state",
                "value": {
                  "error": {
                    "code": "invalid_state",
                    "message": "The operation is unavailable in the current resource or account state. Operational commands are unavailable after cancellation is submitted.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error422": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "invalid_search_scope": {
                "summary": "invalid_search_scope",
                "value": {
                  "error": {
                    "code": "invalid_search_scope",
                    "message": "Missing or unsupported jurisdiction/search mode.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              },
              "invalid_money": {
                "summary": "invalid_money",
                "value": {
                  "error": {
                    "code": "invalid_money",
                    "message": "Invalid decimal, missing required currency or incompatible currency pair.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              },
              "insufficient_evidence": {
                "summary": "insufficient_evidence",
                "value": {
                  "error": {
                    "code": "insufficient_evidence",
                    "message": "Required decision or metric prerequisites are missing.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              },
              "workload_limit_exceeded": {
                "summary": "workload_limit_exceeded",
                "value": {
                  "error": {
                    "code": "workload_limit_exceeded",
                    "message": "The agreed workload limit cannot cover this work. No automatic tier upgrade or surcharge occurs. Contact AMLOK to agree expanded scope.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error402": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "insufficient_credits": {
                "summary": "insufficient_credits",
                "value": {
                  "error": {
                    "code": "insufficient_credits",
                    "message": "Available credits cannot cover this operation. A rejected request creates no charge. Fund the workspace through the portal before retrying.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      },
      "Error412": {
        "description": "Request failed. Inspect error.code and error.retryable.",
        "headers": {
          "X-Request-ID": {
            "description": "AMLOK response correlation identifier.",
            "schema": {
              "type": "string"
            },
            "example": "req_example"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            },
            "examples": {
              "version_conflict": {
                "summary": "version_conflict",
                "value": {
                  "error": {
                    "code": "version_conflict",
                    "message": "If-Match or approved action version is stale.",
                    "retryable": false,
                    "request_id": "req_example"
                  },
                  "meta": {
                    "request_id": "req_example",
                    "schema_version": "1.4.2",
                    "generated_at": "2026-10-23T14:00:00Z",
                    "data_status": "complete"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Platform",
      "description": "Platform operations."
    },
    {
      "name": "Identity",
      "description": "Identity operations."
    },
    {
      "name": "Banking",
      "description": "Banking operations."
    },
    {
      "name": "Payments",
      "description": "Payments operations."
    },
    {
      "name": "Commerce",
      "description": "Commerce operations."
    },
    {
      "name": "Accounting",
      "description": "Accounting operations."
    },
    {
      "name": "Inventory",
      "description": "Inventory operations."
    },
    {
      "name": "Lending",
      "description": "Lending operations."
    },
    {
      "name": "Liens",
      "description": "Liens operations."
    },
    {
      "name": "Risk",
      "description": "Risk operations."
    },
    {
      "name": "Operations",
      "description": "Operations operations."
    },
    {
      "name": "Webhooks",
      "description": "Webhooks operations."
    },
    {
      "name": "Reporting",
      "description": "Reporting operations."
    }
  ],
  "webhooks": {
    "resourceEvent": {
      "post": {
        "summary": "AMLOK resource event",
        "description": "Signed at-least-once delivery. Verify the exact raw body before parsing.",
        "security": [],
        "parameters": [
          {
            "name": "X-AMLOK-Signature",
            "in": "header",
            "required": true,
            "description": "HMAC-SHA256 of timestamp + period + raw body. Tolerance: 300 seconds.",
            "schema": {
              "type": "string"
            },
            "example": "t=1792764000,v1=<hex_digest>"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookEvent"
              },
              "example": {
                "id": "evt_example",
                "type": "verification.completed",
                "created_at": "2026-10-23T14:00:00Z",
                "schema_version": "1.4.2",
                "resource_type": "verification",
                "resource_id": "ver_example",
                "resource_version": 2,
                "data": {
                  "status": "in_review"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Acknowledged after durable acceptance."
          }
        }
      }
    }
  }
}
