{
  "openapi": "3.1.0",
  "info": {
    "title": "AMLOK product API design",
    "version": "2.0.0-design.1",
    "description": "Proposed replacement boundary reviewed 2026-11-06. NOT an available API. No backend or release date is established by this document. Use the published v1.4.2 reference for existing integrations."
  },
  "x-availability": "design_only_not_available",
  "servers": [
    {
      "url": "https://api.example.com",
      "description": "Non-operational design placeholder. Do not send credentials here."
    }
  ],
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v2/borrowers": {
      "post": {
        "operationId": "createBorrower",
        "summary": "Create borrower",
        "tags": [
          "Borrowers"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "borrowers:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "201": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Borrower"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBorrower"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listBorrower",
        "summary": "List borrower",
        "tags": [
          "Borrowers"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "borrowers:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "client_reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "client reference"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Borrower"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/borrowers/{id}": {
      "get": {
        "operationId": "getBorrower",
        "summary": "Get borrower",
        "tags": [
          "Borrowers"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "borrowers:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Borrower"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/embedding-sessions": {
      "post": {
        "operationId": "createEmbeddingSession",
        "summary": "Create embedding session",
        "tags": [
          "Connections"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "connections:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "201": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EmbeddingSession"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmbeddingSession"
              }
            }
          }
        }
      }
    },
    "/v2/embedding-sessions/{id}": {
      "get": {
        "operationId": "getEmbeddingSession",
        "summary": "Get embedding session",
        "tags": [
          "Connections"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "connections:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EmbeddingSession"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/connections": {
      "get": {
        "operationId": "listConnections",
        "summary": "List connections",
        "tags": [
          "Connections"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "connections:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "borrower_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "borrower id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Connection"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/connections/{id}": {
      "get": {
        "operationId": "getConnection",
        "summary": "Get connection",
        "tags": [
          "Connections"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "connections:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Connection"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/consents/{id}": {
      "get": {
        "operationId": "getConsent",
        "summary": "Get consent",
        "tags": [
          "Connections"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "connections:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Consent"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/consents/{id}/revoke": {
      "post": {
        "operationId": "revokeConsent",
        "summary": "Revoke consent",
        "tags": [
          "Connections"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "connections:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Consent"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeConsent"
              }
            }
          }
        }
      }
    },
    "/v2/documents": {
      "post": {
        "operationId": "uploadDocument",
        "summary": "Upload document",
        "tags": [
          "Evidence"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "evidence:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "202": {
            "description": "Design contract only. Accepted asynchronously; inspect status, not just HTTP success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Document"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UploadDocument"
              }
            }
          }
        }
      }
    },
    "/v2/documents/{id}": {
      "get": {
        "operationId": "getDocument",
        "summary": "Get document",
        "tags": [
          "Evidence"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "evidence:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Document"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/documents/{id}/download-links": {
      "post": {
        "operationId": "downloadDocument",
        "summary": "Download document",
        "tags": [
          "Evidence"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "evidence:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DownloadLink"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadPurpose"
              }
            }
          }
        }
      }
    },
    "/v2/lending-product-versions": {
      "post": {
        "operationId": "createLendingProductVersion",
        "summary": "Create lending product version",
        "tags": [
          "Configuration"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "configuration:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "201": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LendingProductVersion"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LendingProductInput"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listLendingProductVersion",
        "summary": "List lending product version",
        "tags": [
          "Configuration"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "configuration:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "external_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "external id"
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "version"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LendingProductVersion"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/lending-product-versions/{id}": {
      "get": {
        "operationId": "getLendingProductVersion",
        "summary": "Get lending product version",
        "tags": [
          "Configuration"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "configuration:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LendingProductVersion"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/risk-policy-versions": {
      "post": {
        "operationId": "createRiskPolicyVersion",
        "summary": "Create risk policy version",
        "tags": [
          "Configuration"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "configuration:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "201": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RiskPolicyVersion"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RiskPolicyInput"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listRiskPolicyVersion",
        "summary": "List risk policy version",
        "tags": [
          "Configuration"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "configuration:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "external_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "external id"
          },
          {
            "name": "version",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "version"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RiskPolicyVersion"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/risk-policy-versions/{id}": {
      "get": {
        "operationId": "getRiskPolicyVersion",
        "summary": "Get risk policy version",
        "tags": [
          "Configuration"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "configuration:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RiskPolicyVersion"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/originations": {
      "post": {
        "operationId": "createOrigination",
        "summary": "Create origination",
        "tags": [
          "Insights"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "insights:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "202": {
            "description": "Design contract only. Accepted asynchronously; inspect status, not just HTTP success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Origination"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrigination"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listOrigination",
        "summary": "List origination",
        "tags": [
          "Insights"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "insights:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "borrower_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "borrower id"
          },
          {
            "name": "institution_reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "institution reference"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "status"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Origination"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/originations/{id}": {
      "get": {
        "operationId": "getOrigination",
        "summary": "Get origination",
        "tags": [
          "Insights"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "insights:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Origination"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/risk-packages/{id}": {
      "get": {
        "operationId": "getRiskPackage",
        "summary": "Get risk package",
        "tags": [
          "Results"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "results:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RiskPackage"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/evidence": {
      "get": {
        "operationId": "listEvidence",
        "summary": "List evidence",
        "tags": [
          "Evidence"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "evidence:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "borrower_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "borrower id"
          },
          {
            "name": "evidence_set_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "evidence set id"
          },
          {
            "name": "resource_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "resource type"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/EvidenceSummary"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/evidence/{id}": {
      "get": {
        "operationId": "getEvidence",
        "summary": "Get evidence",
        "tags": [
          "Evidence"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "evidence:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Evidence"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/monitors": {
      "post": {
        "operationId": "createMonitor",
        "summary": "Create monitor",
        "tags": [
          "Signal"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "signal:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "202": {
            "description": "Design contract only. Accepted asynchronously; inspect status, not just HTTP success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "description": "Quoted monitor record version for conditional configuration changes."
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMonitor"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listMonitor",
        "summary": "List monitor",
        "tags": [
          "Signal"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "signal:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "borrower_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "borrower id"
          },
          {
            "name": "institution_reference",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "institution reference"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "status"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Monitor"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/monitors/{id}": {
      "get": {
        "operationId": "getMonitor",
        "summary": "Get monitor",
        "tags": [
          "Signal"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "signal:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "description": "Quoted monitor record version for conditional configuration changes."
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      },
      "patch": {
        "operationId": "updateMonitor",
        "summary": "Update monitor",
        "tags": [
          "Signal"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "signal:write"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          },
          {
            "name": "If-Match",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Required ETag from the monitor. Reject stale values with 412."
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string",
                  "minLength": 1
                },
                "description": "Quoted monitor record version for conditional configuration changes."
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "412": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateMonitor"
              }
            }
          }
        }
      }
    },
    "/v2/monitoring-runs": {
      "get": {
        "operationId": "listMonitoringRuns",
        "summary": "List monitoring runs",
        "tags": [
          "Signal"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "signal:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "borrower_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "borrower id"
          },
          {
            "name": "monitor_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "monitor id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MonitoringRun"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/monitoring-runs/{id}": {
      "get": {
        "operationId": "getMonitoringRun",
        "summary": "Get monitoring run",
        "tags": [
          "Signal"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "signal:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MonitoringRun"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/alerts": {
      "get": {
        "operationId": "listAlerts",
        "summary": "List alerts",
        "tags": [
          "Signal"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "signal:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "borrower_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "borrower id"
          },
          {
            "name": "monitor_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "monitor id"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "status"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Alert"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/alerts/{id}": {
      "get": {
        "operationId": "getAlert",
        "summary": "Get alert",
        "tags": [
          "Signal"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "signal:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Alert"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/events": {
      "get": {
        "operationId": "listEvents",
        "summary": "List events",
        "tags": [
          "Events"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "events:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "borrower_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "borrower id"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "type"
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "now"
              ]
            },
            "description": "Capture the current durable feed position with an empty page before initial collection bootstrap. Cannot be combined with cursor. Resume with the returned resume_cursor."
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/EventPage"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/events/{id}": {
      "get": {
        "operationId": "getEvent",
        "summary": "Get event",
        "tags": [
          "Events"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "events:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Event"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/exports": {
      "post": {
        "operationId": "createExport",
        "summary": "Create export",
        "tags": [
          "Exports"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "exports:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "202": {
            "description": "Design contract only. Accepted asynchronously; inspect status, not just HTTP success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Export"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override. Billing exports additionally require billing:read and Owner authority. Evidence exports require evidence:read and source entitlements. Recheck authorization on creation, retrieval and download; exports:read alone grants neither.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExport"
              }
            }
          }
        }
      }
    },
    "/v2/exports/{id}": {
      "get": {
        "operationId": "getExport",
        "summary": "Get export",
        "tags": [
          "Exports"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "exports:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Export"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override. Billing exports additionally require billing:read and Owner authority. Evidence exports require evidence:read and source entitlements. Recheck authorization on creation, retrieval and download; exports:read alone grants neither.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/exports/{id}/download-links": {
      "post": {
        "operationId": "downloadExport",
        "summary": "Download export",
        "tags": [
          "Exports"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "exports:read"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "id"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DownloadLink"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override. Billing exports additionally require billing:read and Owner authority. Evidence exports require evidence:read and source entitlements. Recheck authorization on creation, retrieval and download; exports:read alone grants neither.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DownloadPurpose"
              }
            }
          }
        }
      }
    },
    "/v2/webhook-deliveries": {
      "get": {
        "operationId": "listDeliveries",
        "summary": "List deliveries",
        "tags": [
          "Events"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "events:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "event_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "event id"
          },
          {
            "name": "endpoint_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "endpoint id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Delivery"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/webhook-replays": {
      "post": {
        "operationId": "replayEvent",
        "summary": "Replay event",
        "tags": [
          "Events"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "events:write"
        ],
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "Stable for one intended command and its retries, scoped to key workspace/environment and operation. Mismatched body returns 409. Full response replay 24 hours; durable receipt remains."
          }
        ],
        "responses": {
          "202": {
            "description": "Design contract only. Accepted asynchronously; inspect status, not just HTTP success.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ReplayReceipt"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "402": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "422": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReplayEvent"
              }
            }
          }
        }
      }
    },
    "/v2/billing/summary": {
      "get": {
        "operationId": "getBillingSummary",
        "summary": "Get billing summary",
        "tags": [
          "Billing"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "billing:read"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BillingSummary"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/billing/transactions": {
      "get": {
        "operationId": "listBillingTransactions",
        "summary": "List billing transactions",
        "tags": [
          "Billing"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "billing:read"
        ],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "cursor"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            },
            "description": "limit"
          },
          {
            "name": "snapshot_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "snapshot id"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BillingTransaction"
                      }
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    },
                    "page": {
                      "$ref": "#/components/schemas/Page"
                    }
                  },
                  "required": [
                    "data",
                    "meta",
                    "page"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/configuration": {
      "get": {
        "operationId": "getConfiguration",
        "summary": "Get configuration",
        "tags": [
          "Configuration"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "configuration:read"
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Configuration"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/request-receipts/lookup": {
      "get": {
        "operationId": "lookupRequestReceipt",
        "summary": "Lookup request receipt",
        "tags": [
          "Reliability"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [
          "reliability:read"
        ],
        "parameters": [
          {
            "name": "operation_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "operation id"
          },
          {
            "name": "idempotency_key",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "idempotency key"
          }
        ],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RequestReceipt"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": [
          {
            "BearerAuth": []
          }
        ]
      }
    },
    "/v2/healthcheck": {
      "get": {
        "operationId": "healthcheck",
        "summary": "Healthcheck",
        "tags": [
          "Reliability"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Healthcheck"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": []
      }
    },
    "/v2/service-status": {
      "get": {
        "operationId": "serviceStatus",
        "summary": "Service status",
        "tags": [
          "Reliability"
        ],
        "x-availability": "design_only_not_available",
        "x-required-scopes": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Design contract only. Successful response.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ServiceStatus"
                    },
                    "meta": {
                      "$ref": "#/components/schemas/Meta"
                    }
                  },
                  "required": [
                    "data",
                    "meta"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "400": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "403": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "404": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "409": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "410": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "429": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "503": {
            "description": "Inspect structured error; retry only when retryable. 429 and 503 can include Retry-After.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "$ref": "#/components/schemas/Error"
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "additionalProperties": false
                }
              }
            }
          }
        },
        "description": "Proposed contract. All referenced IDs, cursor state and downloads require the same authorized workspace/environment. No caller-controlled workspace override.",
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "Money": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "string",
            "minLength": 1,
            "pattern": "^(?:0|[1-9][0-9]*)\\.[0-9]{2}$"
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[A-Z]{3}$"
          }
        },
        "required": [
          "amount",
          "currency"
        ],
        "additionalProperties": false
      },
      "Window": {
        "type": "object",
        "properties": {
          "start": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "end": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "additionalProperties": false,
        "description": "UTC interval [start, end). The server rejects end <= start."
      },
      "VersionReference": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "sha256": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "id",
          "version",
          "sha256"
        ],
        "additionalProperties": false
      },
      "Meta": {
        "type": "object",
        "properties": {
          "request_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "schema_version": {
            "type": "string",
            "minLength": 1
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ]
          }
        },
        "required": [
          "request_id",
          "schema_version",
          "environment"
        ],
        "additionalProperties": false
      },
      "Page": {
        "type": "object",
        "properties": {
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          }
        },
        "required": [
          "next_cursor",
          "has_more",
          "snapshot_id"
        ],
        "additionalProperties": false,
        "description": "Opaque cursor binds filters, authorization and a stable snapshot. Expired cursors return 410; never silently restart."
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "enum": [
              "validation_error",
              "unauthenticated",
              "forbidden",
              "not_found",
              "invalid_state",
              "idempotency_conflict",
              "insufficient_credits",
              "precondition_failed",
              "cursor_expired",
              "rate_limited",
              "temporarily_unavailable"
            ]
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "retryable": {
            "type": "boolean"
          },
          "request_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "field": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "code",
          "message",
          "retryable",
          "request_id",
          "field"
        ],
        "additionalProperties": false
      },
      "BusinessInput": {
        "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
      },
      "PersonInput": {
        "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
      },
      "CreateBorrower": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "business"
              },
              "business": {
                "$ref": "#/components/schemas/BusinessInput"
              }
            },
            "required": [
              "type",
              "business"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "const": "person"
              },
              "person": {
                "$ref": "#/components/schemas/PersonInput"
              }
            },
            "required": [
              "type",
              "person"
            ],
            "additionalProperties": false
          }
        ]
      },
      "Borrower": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "type": {
            "type": "string",
            "enum": [
              "business",
              "person"
            ]
          },
          "subject_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "created_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "client_reference": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "profile": {
            "$ref": "#/components/schemas/CreateBorrower"
          }
        },
        "required": [
          "id",
          "type",
          "subject_id",
          "created_at",
          "client_reference",
          "profile"
        ],
        "additionalProperties": false
      },
      "CreateEmbeddingSession": {
        "type": "object",
        "properties": {
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "embedding_version_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "purpose": {
            "type": "string",
            "enum": [
              "connect",
              "reauthorize"
            ]
          },
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "return_url": {
            "type": "string",
            "minLength": 1,
            "description": "Must match an institution-approved return URL. No arbitrary redirects.",
            "format": "uri"
          },
          "origination_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          }
        },
        "required": [
          "borrower_id",
          "embedding_version_id",
          "purpose",
          "return_url"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "purpose": {
                  "const": "reauthorize"
                }
              }
            },
            "then": {
              "required": [
                "connection_id"
              ]
            },
            "else": {
              "not": {
                "required": [
                  "connection_id"
                ]
              }
            }
          }
        ]
      },
      "EmbeddingSession": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "status": {
            "type": "string",
            "enum": [
              "created",
              "in_progress",
              "completed",
              "expired",
              "failed"
            ]
          },
          "launch_url": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Short-lived borrower session, never an institution API key.",
                "format": "uri"
              },
              {
                "type": "null"
              }
            ]
          },
          "expires_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "connection_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          },
          "consent_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "id",
          "borrower_id",
          "status",
          "launch_url",
          "expires_at",
          "connection_ids",
          "consent_ids"
        ],
        "additionalProperties": false,
        "description": "Completion means the connection journey completed, not that source ingestion or underwriting completed. URLs are returned only to authorized callers; never send in events."
      },
      "Connection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "integration_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "connected",
              "reauthorization_required",
              "revoked",
              "failed"
            ]
          },
          "consent_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "last_successful_sync_at": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "source_as_of": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "coverage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Window"
              },
              {
                "type": "null"
              }
            ]
          },
          "missing_reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "borrower_id",
          "integration_id",
          "status",
          "consent_id",
          "last_successful_sync_at",
          "source_as_of",
          "coverage",
          "missing_reason"
        ],
        "additionalProperties": false
      },
      "Consent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ]
          },
          "purposes": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "captured_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "expires_at": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked_at": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "borrower_id",
          "status",
          "purposes",
          "captured_at",
          "expires_at",
          "revoked_at"
        ],
        "additionalProperties": false
      },
      "RevokeConsent": {
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "UploadDocument": {
        "type": "object",
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          },
          "context": {
            "type": "string",
            "enum": [
              "borrower",
              "lending_product",
              "risk_policy"
            ]
          },
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "document_type": {
            "type": "string",
            "minLength": 1
          },
          "origination_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "requirement_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          }
        },
        "required": [
          "file",
          "context",
          "document_type"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "context": {
                  "const": "borrower"
                }
              }
            },
            "then": {
              "required": [
                "borrower_id"
              ]
            },
            "else": {
              "not": {
                "anyOf": [
                  {
                    "required": [
                      "borrower_id"
                    ]
                  },
                  {
                    "required": [
                      "origination_id"
                    ]
                  },
                  {
                    "required": [
                      "requirement_id"
                    ]
                  }
                ]
              }
            }
          }
        ]
      },
      "Document": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "context": {
            "type": "string",
            "enum": [
              "borrower",
              "lending_product",
              "risk_policy"
            ]
          },
          "borrower_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "file_name": {
            "type": "string",
            "minLength": 1
          },
          "mime_type": {
            "type": "string",
            "minLength": 1
          },
          "sha256": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-f0-9]{64}$"
          },
          "size_bytes": {
            "type": "integer",
            "minimum": 0
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "available",
              "rejected",
              "restricted"
            ]
          },
          "restriction_reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "context",
          "borrower_id",
          "file_name",
          "mime_type",
          "sha256",
          "size_bytes",
          "status",
          "restriction_reason"
        ],
        "additionalProperties": false
      },
      "DownloadPurpose": {
        "type": "object",
        "properties": {
          "purpose": {
            "type": "string",
            "minLength": 1,
            "description": "Authorized reason for accessing evidence or an export."
          }
        },
        "required": [
          "purpose"
        ],
        "additionalProperties": false
      },
      "DownloadLink": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "minLength": 1,
            "description": "Short-lived HTTPS URL. Never include credentials in logs.",
            "format": "uri"
          },
          "expires_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "sha256": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-f0-9]{64}$"
          },
          "mime_type": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "url",
          "expires_at",
          "sha256",
          "mime_type"
        ],
        "additionalProperties": false
      },
      "LendingProductInput": {
        "type": "object",
        "properties": {
          "external_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "borrower_type": {
            "type": "string",
            "enum": [
              "business",
              "person"
            ]
          },
          "market": {
            "type": "string",
            "enum": [
              "US",
              "CA"
            ]
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[A-Z]{3}$"
          },
          "product_type": {
            "type": "string",
            "enum": [
              "term_loan",
              "line_of_credit",
              "receivables_financing",
              "revenue_based_financing",
              "other"
            ]
          },
          "minimum_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "maximum_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "minimum_term_months": {
            "type": "integer",
            "minimum": 1
          },
          "maximum_term_months": {
            "type": "integer",
            "minimum": 1
          },
          "repayment_frequency": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly",
              "at_maturity",
              "variable"
            ]
          },
          "pricing_schema_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "pricing": {
            "type": "object",
            "description": "Rate, fees, amortization and other product-specific economics, validated against the approved pricing_schema_id. All inputs needed for repayment analysis must be captured, not inferred."
          },
          "terms_document_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "external_id",
          "version",
          "name",
          "borrower_type",
          "market",
          "currency",
          "product_type",
          "minimum_amount",
          "maximum_amount",
          "minimum_term_months",
          "maximum_term_months",
          "repayment_frequency",
          "pricing_schema_id",
          "pricing",
          "terms_document_ids"
        ],
        "additionalProperties": false,
        "description": "An immutable catalog version, not a merchant inventory product. Validate amount currencies, ordered bounds and approved terms before accepting. No modification or deletion of an accepted version."
      },
      "LendingProductVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "created_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "definition": {
            "$ref": "#/components/schemas/LendingProductInput"
          },
          "sha256": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "id",
          "created_at",
          "definition",
          "sha256"
        ],
        "additionalProperties": false
      },
      "PolicyRule": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "dimension_key": {
            "type": "string",
            "minLength": 1,
            "description": "An approved, typed dimension from configuration."
          },
          "operator": {
            "type": "string",
            "enum": [
              "gt",
              "gte",
              "lt",
              "lte",
              "eq"
            ]
          },
          "threshold": {
            "type": "string",
            "minLength": 1,
            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "on_missing": {
            "const": "review"
          },
          "on_fail": {
            "type": "string",
            "enum": [
              "review",
              "outside_policy"
            ]
          }
        },
        "required": [
          "id",
          "dimension_key",
          "operator",
          "threshold",
          "unit",
          "on_missing",
          "on_fail"
        ],
        "additionalProperties": false,
        "description": "Version 1 of this proposed rule language supports scalar comparisons only. Units and types must match the approved dimension. No executable code, arbitrary expressions or inferred pass for missing data."
      },
      "RiskPolicyInput": {
        "type": "object",
        "properties": {
          "external_id": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "borrower_type": {
            "type": "string",
            "enum": [
              "business",
              "person"
            ]
          },
          "market": {
            "type": "string",
            "enum": [
              "US",
              "CA"
            ]
          },
          "rules": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyRule"
            },
            "minItems": 1
          },
          "policy_document_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "external_id",
          "version",
          "name",
          "borrower_type",
          "market",
          "rules",
          "policy_document_ids"
        ],
        "additionalProperties": false,
        "description": "Validated against authorized dimensions and the institution-approved policy before use. Documents provide context; they are not automatically executable policies."
      },
      "RiskPolicyVersion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "created_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "definition": {
            "$ref": "#/components/schemas/RiskPolicyInput"
          },
          "sha256": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-f0-9]{64}$"
          }
        },
        "required": [
          "id",
          "created_at",
          "definition",
          "sha256"
        ],
        "additionalProperties": false
      },
      "ApplicationInput": {
        "type": "object",
        "properties": {
          "institution_reference": {
            "type": "string",
            "minLength": 1
          },
          "requested_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "requested_term_months": {
            "type": "integer",
            "minimum": 1
          },
          "purpose": {
            "type": "string",
            "minLength": 1
          },
          "declared_data": {
            "type": "object",
            "description": "Institution-defined application fields validated against application_schema_id; additionalProperties here does not bypass that schema."
          },
          "application_schema_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "related_borrower_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "institution_reference",
          "requested_amount",
          "requested_term_months",
          "purpose",
          "application_schema_id",
          "declared_data"
        ],
        "additionalProperties": false
      },
      "CreateOrigination": {
        "type": "object",
        "properties": {
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "application": {
            "$ref": "#/components/schemas/ApplicationInput"
          },
          "lending_product_version_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "risk_policy_version_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "connection_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          },
          "document_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "borrower_id",
          "application",
          "lending_product_version_id",
          "risk_policy_version_id",
          "connection_ids",
          "document_ids"
        ],
        "additionalProperties": false,
        "description": "AMLOK resolves authorized source data, coverage, verification and calculations. Clients do not provide workflow IDs, manifests or processing_context. Validate product, policy, currency, market and borrower-type compatibility."
      },
      "Requirement": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "code": {
            "type": "string",
            "minLength": 1
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "action": {
            "type": "string",
            "enum": [
              "connect_source",
              "reauthorize_source",
              "upload_document",
              "contact_support"
            ]
          },
          "connection_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "code",
          "message",
          "action",
          "connection_id"
        ],
        "additionalProperties": false
      },
      "Origination": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "institution_reference": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "accepted",
              "collecting",
              "requires_action",
              "processing",
              "waiting_for_credits",
              "completed",
              "failed",
              "cancelled"
            ]
          },
          "created_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "requirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Requirement"
            }
          },
          "risk_package_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Error"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "borrower_id",
          "institution_reference",
          "status",
          "created_at",
          "updated_at",
          "requirements",
          "risk_package_id",
          "failure"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "status": {
                  "const": "completed"
                }
              }
            },
            "then": {
              "properties": {
                "risk_package_id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Opaque identifier, authorized within the API key workspace and environment."
                }
              }
            },
            "else": {
              "properties": {
                "risk_package_id": {
                  "type": "null"
                }
              }
            }
          }
        ]
      },
      "Metric": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "unavailable",
              "not_applicable"
            ]
          },
          "value": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "window": {
            "$ref": "#/components/schemas/Window"
          },
          "calculation_version": {
            "type": "string",
            "minLength": 1
          },
          "missing_reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "evidence_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "key",
          "label",
          "status",
          "value",
          "unit",
          "window",
          "calculation_version",
          "missing_reason",
          "evidence_ids"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "status": {
                  "const": "available"
                }
              }
            },
            "then": {
              "properties": {
                "value": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
                },
                "missing_reason": {
                  "type": "null"
                }
              }
            },
            "else": {
              "properties": {
                "value": {
                  "type": "null"
                },
                "missing_reason": {
                  "type": "string",
                  "minLength": 1
                }
              }
            }
          }
        ]
      },
      "Dimension": {
        "type": "object",
        "properties": {
          "key": {
            "type": "string",
            "enum": [
              "identity",
              "cashflow",
              "liquidity",
              "revenue_quality",
              "profitability",
              "leverage",
              "repayment_capacity",
              "concentration",
              "collateral",
              "fraud_and_consistency",
              "income_and_affordability"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "available",
              "partial",
              "unavailable",
              "not_applicable"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "metrics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Metric"
            }
          },
          "evidence_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "key",
          "status",
          "summary",
          "metrics",
          "evidence_ids"
        ],
        "additionalProperties": false
      },
      "PolicyResult": {
        "type": "object",
        "properties": {
          "rule_id": {
            "type": "string",
            "minLength": 1
          },
          "result": {
            "type": "string",
            "enum": [
              "pass",
              "fail",
              "unavailable",
              "not_applicable"
            ]
          },
          "actual": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
              },
              {
                "type": "null"
              }
            ]
          },
          "threshold": {
            "type": "string",
            "minLength": 1,
            "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "explanation": {
            "type": "string",
            "minLength": 1
          },
          "evidence_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "rule_id",
          "result",
          "actual",
          "threshold",
          "unit",
          "explanation",
          "evidence_ids"
        ],
        "additionalProperties": false,
        "allOf": [
          {
            "if": {
              "properties": {
                "result": {
                  "enum": [
                    "pass",
                    "fail"
                  ]
                }
              }
            },
            "then": {
              "properties": {
                "actual": {
                  "type": "string",
                  "minLength": 1,
                  "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
                }
              }
            },
            "else": {
              "properties": {
                "actual": {
                  "type": "null"
                }
              }
            }
          }
        ]
      },
      "SourceCoverage": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "integration_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "source_as_of": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "retrieved_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "window": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Window"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "partial",
              "unavailable",
              "stale"
            ]
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "connection_id",
          "integration_id",
          "source_as_of",
          "retrieved_at",
          "window",
          "status",
          "limitations"
        ],
        "additionalProperties": false
      },
      "RiskPackage": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "origination_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "monitoring_run_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "product": {
            "type": "string",
            "enum": [
              "insights",
              "signal"
            ]
          },
          "created_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "as_of": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "previous_package_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "application": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ApplicationInput"
              },
              {
                "type": "null"
              }
            ]
          },
          "lending_product": {
            "$ref": "#/components/schemas/LendingProductVersion"
          },
          "risk_policy": {
            "$ref": "#/components/schemas/RiskPolicyVersion"
          },
          "assessment": {
            "type": "object",
            "properties": {
              "recommendation": {
                "type": "string",
                "enum": [
                  "within_policy",
                  "outside_policy",
                  "review_required"
                ]
              },
              "is_institution_decision": {
                "const": false
              },
              "summary": {
                "type": "string",
                "minLength": 1
              },
              "reasons": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "recommendation",
              "is_institution_decision",
              "summary",
              "reasons"
            ],
            "additionalProperties": false
          },
          "dimensions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Dimension"
            }
          },
          "policy_results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PolicyResult"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceCoverage"
            }
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "evidence_set": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              "sha256": {
                "type": "string",
                "minLength": 1,
                "pattern": "^[a-f0-9]{64}$"
              },
              "count": {
                "type": "integer",
                "minimum": 0
              }
            },
            "required": [
              "id",
              "sha256",
              "count"
            ],
            "additionalProperties": false
          },
          "versions": {
            "type": "object",
            "properties": {
              "schema": {
                "type": "string",
                "minLength": 1
              },
              "normalization": {
                "type": "string",
                "minLength": 1
              },
              "calculation": {
                "type": "string",
                "minLength": 1
              },
              "model": {
                "anyOf": [
                  {
                    "type": "string",
                    "minLength": 1
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "schema",
              "normalization",
              "calculation",
              "model"
            ],
            "additionalProperties": false
          },
          "billing_usage_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "borrower_id",
          "origination_id",
          "monitoring_run_id",
          "product",
          "created_at",
          "as_of",
          "previous_package_id",
          "application",
          "lending_product",
          "risk_policy",
          "assessment",
          "dimensions",
          "policy_results",
          "sources",
          "limitations",
          "evidence_set",
          "versions",
          "billing_usage_id"
        ],
        "additionalProperties": false,
        "description": "Immutable completed result. Summaries, metrics and evidence must reference the exact input versions. A Signal package does not incur another Insights charge. A model version is null when no validated, entitled model was used.",
        "oneOf": [
          {
            "properties": {
              "product": {
                "const": "insights"
              },
              "origination_id": {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              "monitoring_run_id": {
                "type": "null"
              },
              "application": {
                "$ref": "#/components/schemas/ApplicationInput"
              }
            }
          },
          {
            "properties": {
              "product": {
                "const": "signal"
              },
              "monitoring_run_id": {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              }
            }
          }
        ],
        "allOf": [
          {
            "if": {
              "properties": {
                "policy_results": {
                  "contains": {
                    "properties": {
                      "result": {
                        "const": "unavailable"
                      }
                    },
                    "required": [
                      "result"
                    ]
                  }
                }
              }
            },
            "then": {
              "properties": {
                "assessment": {
                  "properties": {
                    "recommendation": {
                      "const": "review_required"
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "EvidenceSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "evidence_set_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "resource_type": {
            "type": "string",
            "minLength": 1
          },
          "resource_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "normalized_record",
              "provider_report",
              "document"
            ]
          },
          "source_id": {
            "type": "string",
            "minLength": 1
          },
          "observed_at": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "sha256": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-f0-9]{64}$"
          },
          "access": {
            "type": "string",
            "enum": [
              "available",
              "restricted",
              "deleted"
            ]
          },
          "access_reason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "document_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "evidence_set_id",
          "resource_type",
          "resource_id",
          "record_version",
          "kind",
          "source_id",
          "observed_at",
          "sha256",
          "access",
          "access_reason",
          "document_id"
        ],
        "additionalProperties": false
      },
      "Evidence": {
        "type": "object",
        "properties": {
          "record": {
            "$ref": "#/components/schemas/EvidenceSummary"
          },
          "normalized": {
            "anyOf": [
              {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/LegacyConnectionRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyConsentRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacySyncJobRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyBusinessRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyPersonRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyRelationshipRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyVerificationRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyVerificationCheckRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyScreeningMatchRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyDocumentRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyBankAccountRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyAccountBalanceRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyBankTransactionRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyRecurringStreamRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyIncomeObservationRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyMerchantAccountRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyPaymentRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyProcessorTransactionRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyPayoutRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyRefundRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyDisputeRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyCounterpartyRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyOrderRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyOrderLineRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacySubscriptionRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyLedgerAccountRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyJournalRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyJournalLineRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyInvoiceRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyBillRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyCreditNoteRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyAccountingPaymentRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyFinancialStatementRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyStatementLineRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyTaxObligationRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyProductRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyLocationRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyInventoryBalanceRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyInventoryMovementRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyPurchaseOrderRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyShipmentRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyProductionOrderRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyProjectRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyApplicationRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyCreditFacilityRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyLoanRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyInstallmentRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyRepaymentRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyCollateralRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyGuaranteeRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyCovenantRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyDecisionRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyLienSearchRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyLienRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyFilingEventRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyAttributeRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyRiskSnapshotRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyMonitorRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyAlertRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyWorkflowRunRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyRequirementRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyAuditEventRead"
                  },
                  {
                    "$ref": "#/components/schemas/LegacyReconciliationLinkRead"
                  }
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "provider_report_document_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "record",
          "normalized",
          "provider_report_document_id"
        ],
        "additionalProperties": false,
        "description": "Read the frozen evidence version, never the latest replacement. Licensed provider reports and original files use controlled document downloads. Restricted evidence returns metadata and an explicit reason, never secret or unlicensed content.",
        "allOf": [
          {
            "if": {
              "properties": {
                "record": {
                  "properties": {
                    "access": {
                      "enum": [
                        "restricted",
                        "deleted"
                      ]
                    }
                  }
                }
              }
            },
            "then": {
              "properties": {
                "normalized": {
                  "type": "null"
                },
                "provider_report_document_id": {
                  "type": "null"
                },
                "record": {
                  "properties": {
                    "access_reason": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "Deal": {
        "type": "object",
        "properties": {
          "institution_reference": {
            "type": "string",
            "minLength": 1
          },
          "funded_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "outstanding_amount": {
            "$ref": "#/components/schemas/Money"
          },
          "funded_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "maturity_date": {
            "type": "string",
            "minLength": 1,
            "format": "date"
          },
          "repayment_frequency": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "biweekly",
              "monthly",
              "at_maturity",
              "variable"
            ]
          },
          "terms_document_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "institution_reference",
          "funded_amount",
          "outstanding_amount",
          "funded_at",
          "maturity_date",
          "repayment_frequency",
          "terms_document_ids"
        ],
        "additionalProperties": false,
        "description": "Read-only snapshot of institution-supplied exposure terms. Changes arrive through the authorized lender integration as new versions; this API does not service the loan."
      },
      "BaselineInput": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "risk_package_id": {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              }
            },
            "required": [
              "risk_package_id"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "portfolio_onboarding_reference": {
                "type": "string",
                "minLength": 1,
                "description": "Approved onboarding reference, resolved and validated by AMLOK. Does not imply an Insights purchase."
              }
            },
            "required": [
              "portfolio_onboarding_reference"
            ],
            "additionalProperties": false
          }
        ]
      },
      "CreateMonitor": {
        "type": "object",
        "properties": {
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "deal": {
            "$ref": "#/components/schemas/Deal"
          },
          "baseline": {
            "$ref": "#/components/schemas/BaselineInput"
          },
          "risk_policy_version_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "cadence_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "connection_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "borrower_id",
          "deal",
          "baseline",
          "risk_policy_version_id",
          "cadence_id",
          "connection_ids"
        ],
        "additionalProperties": false
      },
      "UpdateMonitor": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "stopped"
            ]
          },
          "risk_policy_version_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "cadence_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          }
        },
        "required": [],
        "additionalProperties": false,
        "minProperties": 1,
        "description": "Configuration only, with If-Match. Changes apply prospectively and never rewrite packages, evidence, events or historical charges. Stopped is terminal."
      },
      "Monitor": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "deal": {
            "$ref": "#/components/schemas/Deal"
          },
          "status": {
            "type": "string",
            "enum": [
              "initializing",
              "active",
              "paused",
              "requires_action",
              "waiting_for_credits",
              "stopped",
              "failed"
            ]
          },
          "baseline_package_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "latest_package_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "risk_policy_version_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "cadence_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "next_evaluation_at": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "record_version": {
            "type": "integer",
            "minimum": 1
          }
        },
        "required": [
          "id",
          "borrower_id",
          "deal",
          "status",
          "baseline_package_id",
          "latest_package_id",
          "risk_policy_version_id",
          "cadence_id",
          "next_evaluation_at",
          "record_version"
        ],
        "additionalProperties": false
      },
      "MonitoringRun": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "monitor_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "status": {
            "type": "string",
            "enum": [
              "processing",
              "completed",
              "partial",
              "failed",
              "skipped"
            ]
          },
          "started_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "risk_package_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "sources": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SourceCoverage"
            }
          },
          "evidence_set_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "limitations": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "id",
          "monitor_id",
          "status",
          "started_at",
          "completed_at",
          "risk_package_id",
          "sources",
          "evidence_set_id",
          "limitations"
        ],
        "additionalProperties": false,
        "description": "One scheduled or change-driven evaluation, with per-integration coverage and frozen evidence. A skipped or stale sync is not a clean risk result."
      },
      "Alert": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "monitor_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "borrower_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "resolved"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "critical"
            ]
          },
          "rule_id": {
            "type": "string",
            "minLength": 1
          },
          "policy_version_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "detected_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "previous_package_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "current_package_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "metric_key": {
            "type": "string",
            "minLength": 1
          },
          "previous_value": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
              },
              {
                "type": "null"
              }
            ]
          },
          "current_value": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
              },
              {
                "type": "null"
              }
            ]
          },
          "threshold": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "pattern": "^-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?$"
              },
              {
                "type": "null"
              }
            ]
          },
          "unit": {
            "type": "string",
            "minLength": 1
          },
          "evidence_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "id",
          "monitor_id",
          "borrower_id",
          "status",
          "severity",
          "rule_id",
          "policy_version_id",
          "message",
          "detected_at",
          "resolved_at",
          "previous_package_id",
          "current_package_id",
          "metric_key",
          "previous_value",
          "current_value",
          "threshold",
          "unit",
          "evidence_ids"
        ],
        "additionalProperties": false,
        "description": "System-derived risk condition. Resolution needs comparable fresh evidence; no customer edit, dismissal or deletion. Institutions handle case management elsewhere."
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "type": {
            "type": "string",
            "enum": [
              "embedding_session.completed",
              "connection.action_required",
              "connection.status_changed",
              "origination.action_required",
              "origination.status_changed",
              "origination.completed",
              "origination.failed",
              "risk_package.created",
              "monitor.status_changed",
              "monitoring_run.completed",
              "monitoring_run.failed",
              "alert.created",
              "alert.resolved",
              "export.ready",
              "export.failed"
            ]
          },
          "occurred_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "resource_type": {
            "type": "string",
            "minLength": 1
          },
          "resource_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "resource_version": {
            "type": "integer",
            "minimum": 1
          },
          "borrower_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          },
          "environment": {
            "type": "string",
            "enum": [
              "sandbox",
              "live"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "occurred_at",
          "resource_type",
          "resource_id",
          "resource_version",
          "borrower_id",
          "environment"
        ],
        "additionalProperties": false,
        "description": "Minimal at-least-once notification, without financial payloads, tokens or download URLs. Fetch authorized resource detail. Events and delivery attempts are different records."
      },
      "EventPage": {
        "type": "object",
        "properties": {
          "next_cursor": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "has_more": {
            "type": "boolean"
          },
          "resume_cursor": {
            "type": "string",
            "minLength": 1,
            "description": "Durable continuation position, present even on an empty page. Check retention before accepting; expired cursors return 410."
          }
        },
        "required": [
          "next_cursor",
          "has_more",
          "resume_cursor"
        ],
        "additionalProperties": false
      },
      "CreateExport": {
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "risk_package",
              "evidence",
              "billing"
            ]
          },
          "risk_package_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "evidence_set_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "billing_report_type": {
            "type": "string",
            "enum": [
              "usage",
              "credits",
              "statements",
              "funding",
              "rates",
              "workload"
            ]
          },
          "window": {
            "$ref": "#/components/schemas/Window"
          },
          "format": {
            "type": "string",
            "enum": [
              "json",
              "csv",
              "pdf"
            ]
          }
        },
        "required": [
          "kind",
          "format"
        ],
        "additionalProperties": false,
        "oneOf": [
          {
            "properties": {
              "kind": {
                "const": "risk_package"
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "pdf"
                ]
              }
            },
            "required": [
              "risk_package_id"
            ],
            "not": {
              "anyOf": [
                {
                  "required": [
                    "evidence_set_id"
                  ]
                },
                {
                  "required": [
                    "billing_report_type"
                  ]
                },
                {
                  "required": [
                    "window"
                  ]
                }
              ]
            }
          },
          {
            "properties": {
              "kind": {
                "const": "evidence"
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "csv"
                ]
              }
            },
            "required": [
              "evidence_set_id"
            ],
            "not": {
              "anyOf": [
                {
                  "required": [
                    "risk_package_id"
                  ]
                },
                {
                  "required": [
                    "billing_report_type"
                  ]
                },
                {
                  "required": [
                    "window"
                  ]
                }
              ]
            }
          },
          {
            "properties": {
              "kind": {
                "const": "billing"
              },
              "format": {
                "type": "string",
                "enum": [
                  "json",
                  "csv"
                ]
              }
            },
            "required": [
              "billing_report_type",
              "window"
            ],
            "not": {
              "anyOf": [
                {
                  "required": [
                    "risk_package_id"
                  ]
                },
                {
                  "required": [
                    "evidence_set_id"
                  ]
                }
              ]
            }
          }
        ]
      },
      "Export": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "processing",
              "completed",
              "failed"
            ]
          },
          "created_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "format": {
            "type": "string",
            "enum": [
              "json",
              "csv",
              "pdf"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/CreateExport"
          },
          "failure": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Error"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "status",
          "created_at",
          "format",
          "source",
          "failure"
        ],
        "additionalProperties": false
      },
      "Delivery": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "event_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "endpoint_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "attempt": {
            "type": "integer",
            "minimum": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "delivered",
              "failed"
            ]
          },
          "attempted_at": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "http_status": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 100,
                "maximum": 599
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "event_id",
          "endpoint_id",
          "attempt",
          "status",
          "attempted_at",
          "http_status"
        ],
        "additionalProperties": false
      },
      "ReplayEvent": {
        "type": "object",
        "properties": {
          "event_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "endpoint_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          }
        },
        "required": [
          "event_id",
          "endpoint_id"
        ],
        "additionalProperties": false
      },
      "ReplayReceipt": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "event_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "status": {
            "const": "accepted"
          }
        },
        "required": [
          "id",
          "event_id",
          "status"
        ],
        "additionalProperties": false,
        "description": "Requeues delivery only. It never reruns analysis, modifies an alert or creates a usage charge."
      },
      "BillingSummary": {
        "type": "object",
        "properties": {
          "as_of": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "currency": {
            "const": "CAD"
          },
          "available_credits": {
            "type": "string",
            "minLength": 1,
            "pattern": "^(?:0|[1-9][0-9]*)\\.[0-9]{2}$"
          },
          "spent_credits": {
            "type": "string",
            "minLength": 1,
            "pattern": "^(?:0|[1-9][0-9]*)\\.[0-9]{2}$"
          },
          "billing_account_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          }
        },
        "required": [
          "as_of",
          "currency",
          "available_credits",
          "spent_credits",
          "billing_account_id",
          "snapshot_id"
        ],
        "additionalProperties": false,
        "description": "Read-only workspace balance shared by Insights and Signal. Organization owns billing profile and payment methods in the console. No held or reserved credits."
      },
      "BillingTransaction": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "snapshot_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "posted_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "amount": {
            "type": "string",
            "minLength": 1,
            "pattern": "^-?(?:0|[1-9][0-9]*)\\.[0-9]{2}$"
          },
          "currency": {
            "const": "CAD"
          },
          "kind": {
            "type": "string",
            "enum": [
              "funding",
              "usage",
              "adjustment",
              "final_refund"
            ]
          },
          "product": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "insights",
                  "signal"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "usage_id": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1,
                "description": "Opaque identifier, authorized within the API key workspace and environment."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "snapshot_id",
          "posted_at",
          "amount",
          "currency",
          "kind",
          "product",
          "description",
          "usage_id"
        ],
        "additionalProperties": false,
        "description": "Immutable entry. A correction is a linked new accounting entry, never an API edit or deletion."
      },
      "ConfiguredSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "json_schema": {
            "type": "object",
            "description": "JSON Schema 2020-12, enforced server-side. Clients can validate the same definition before submitting."
          }
        },
        "required": [
          "id",
          "version",
          "json_schema"
        ],
        "additionalProperties": false
      },
      "Configuration": {
        "type": "object",
        "properties": {
          "products": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "insights",
                "signal"
              ]
            }
          },
          "embedding_version_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          },
          "application_schemas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConfiguredSchema"
            }
          },
          "pricing_schemas": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConfiguredSchema"
            }
          },
          "cadences": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Opaque identifier, authorized within the API key workspace and environment."
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "description"
              ],
              "additionalProperties": false
            }
          },
          "dimensions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "minLength": 1
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "unit": {
                  "type": "string",
                  "minLength": 1
                },
                "calculation_version": {
                  "type": "string",
                  "minLength": 1
                },
                "borrower_types": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "enum": [
                      "business",
                      "person"
                    ]
                  }
                }
              },
              "required": [
                "key",
                "description",
                "unit",
                "calculation_version",
                "borrower_types"
              ],
              "additionalProperties": false
            }
          },
          "integration_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "description": "Opaque identifier, authorized within the API key workspace and environment."
            },
            "uniqueItems": true
          }
        },
        "required": [
          "products",
          "embedding_version_ids",
          "application_schemas",
          "pricing_schemas",
          "cadences",
          "dimensions",
          "integration_ids"
        ],
        "additionalProperties": false,
        "description": "Discover approved configuration for this key. The console manages embedding designs, API keys, webhook destinations and signing secrets. Integration catalog coverage does not by itself grant access."
      },
      "RequestReceipt": {
        "type": "object",
        "properties": {
          "idempotency_key": {
            "type": "string",
            "minLength": 1
          },
          "operation_id": {
            "type": "string",
            "minLength": 1
          },
          "resource_id": {
            "type": "string",
            "minLength": 1,
            "description": "Opaque identifier, authorized within the API key workspace and environment."
          },
          "accepted_at": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          },
          "response_replay_available": {
            "type": "boolean"
          }
        },
        "required": [
          "idempotency_key",
          "operation_id",
          "resource_id",
          "accepted_at",
          "response_replay_available"
        ],
        "additionalProperties": false,
        "description": "Durable acceptance reference survives expiry of the 24-hour response replay. Never execute accepted work again because a cached response expired."
      },
      "Healthcheck": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded"
            ]
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "ServiceStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "operational",
              "degraded",
              "unavailable"
            ]
          },
          "as_of": {
            "type": "string",
            "minLength": 1,
            "format": "date-time"
          }
        },
        "required": [
          "status",
          "as_of"
        ],
        "additionalProperties": false
      },
      "LegacyConnectionRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacySourceRef": {
        "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"
        ]
      },
      "LegacyFieldProvenance": {
        "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/LegacyEnum_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"
        ]
      },
      "LegacyEnum_evidence_level": {
        "type": "string",
        "enum": [
          "source_record",
          "document_extracted",
          "client_asserted",
          "derived",
          "model_inferred"
        ]
      },
      "LegacyEnum_data_status": {
        "type": "string",
        "enum": [
          "complete",
          "partial",
          "unavailable",
          "pending"
        ]
      },
      "LegacyMissingField": {
        "type": "object",
        "properties": {
          "field_path": {
            "type": "string",
            "description": "Unavailable relative field path."
          },
          "reason": {
            "$ref": "#/components/schemas/LegacyEnum_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"
        ]
      },
      "LegacyEnum_null_reason": {
        "type": "string",
        "enum": [
          "not_provided",
          "not_supported",
          "not_authorized",
          "not_applicable",
          "pending",
          "redacted",
          "source_error",
          "invalid",
          "insufficient_history"
        ]
      },
      "LegacyEnum_connection_status": {
        "type": "string",
        "enum": [
          "pending",
          "active",
          "reauth_required",
          "revoked",
          "disconnected",
          "error"
        ]
      },
      "LegacyConsentRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_party_type": {
        "type": "string",
        "enum": [
          "business",
          "person"
        ]
      },
      "LegacyEnum_consent_status": {
        "type": "string",
        "enum": [
          "pending",
          "granted",
          "revoked",
          "expired"
        ]
      },
      "LegacySyncJobRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyError"
                }
              },
              {
                "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."
      },
      "LegacyEnum_sync_status": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "completed",
          "partial",
          "failed",
          "cancelled"
        ]
      },
      "LegacyError": {
        "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"
        ]
      },
      "LegacyBusinessRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyIdentifier"
                }
              },
              {
                "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/LegacyAddress"
              },
              {
                "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/LegacyAddress"
                }
              },
              {
                "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/LegacyIndustryCode"
                }
              },
              {
                "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."
      },
      "LegacyEnum_legal_status": {
        "type": "string",
        "enum": [
          "active",
          "inactive",
          "dissolved",
          "struck_off",
          "liquidation",
          "dormant",
          "unknown"
        ]
      },
      "LegacyIdentifier": {
        "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"
        ]
      },
      "LegacyAddress": {
        "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."
          }
        }
      },
      "LegacyIndustryCode": {
        "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"
        ]
      },
      "LegacyPersonRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyAddress"
                }
              },
              {
                "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."
      },
      "LegacyRelationshipRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_relationship_type": {
        "type": "string",
        "enum": [
          "beneficial_owner",
          "shareholder",
          "director",
          "officer",
          "guarantor",
          "subsidiary",
          "parent",
          "authorized_signatory",
          "account_holder",
          "related_party",
          "unknown"
        ]
      },
      "LegacyEnum_review_status": {
        "type": "string",
        "enum": [
          "not_reviewed",
          "accepted",
          "rejected",
          "needs_review"
        ]
      },
      "LegacyVerificationRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyProcessingContext"
          },
          "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."
      },
      "LegacyEnum_verification_status": {
        "type": "string",
        "enum": [
          "not_started",
          "in_progress",
          "awaiting_user",
          "in_review",
          "approved",
          "declined",
          "resubmission_requested",
          "expired",
          "abandoned",
          "verification_expired",
          "unknown",
          "cancelled"
        ]
      },
      "LegacyProcessingContext": {
        "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."
      },
      "LegacyVerificationCheckRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_check_status": {
        "type": "string",
        "enum": [
          "not_run",
          "pending",
          "passed",
          "failed",
          "review",
          "unavailable",
          "unknown"
        ]
      },
      "LegacyScreeningMatchRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_screening_type": {
        "type": "string",
        "enum": [
          "sanctions",
          "pep",
          "adverse_media",
          "watchlist"
        ]
      },
      "LegacyEnum_match_disposition": {
        "type": "string",
        "enum": [
          "unreviewed",
          "false_positive",
          "possible_match",
          "confirmed_match"
        ]
      },
      "LegacyDocumentRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_document_type": {
        "type": "string",
        "enum": [
          "identity",
          "proof_of_address",
          "bank_statement",
          "financial_statement",
          "tax_return",
          "corporate_registry",
          "ownership",
          "loan_agreement",
          "lien_report",
          "invoice",
          "other"
        ]
      },
      "LegacyBankAccountRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_account_type": {
        "type": "string",
        "enum": [
          "depository",
          "credit",
          "loan",
          "investment",
          "other",
          "unknown"
        ]
      },
      "LegacyEnum_account_ownership": {
        "type": "string",
        "enum": [
          "business",
          "personal",
          "joint",
          "trust",
          "unknown"
        ]
      },
      "LegacyAccountBalanceRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_balance_basis": {
        "type": "string",
        "enum": [
          "asset",
          "liability",
          "unknown"
        ]
      },
      "LegacyEnum_balance_date_basis": {
        "type": "string",
        "enum": [
          "source_observed",
          "reconstructed",
          "unknown"
        ]
      },
      "LegacyBankTransactionRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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/LegacyEnum_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/LegacyAddress"
              },
              {
                "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."
      },
      "LegacyEnum_direction": {
        "type": "string",
        "enum": [
          "inflow",
          "outflow",
          "neutral",
          "unknown"
        ]
      },
      "LegacyEnum_transaction_status": {
        "type": "string",
        "enum": [
          "pending",
          "posted",
          "removed",
          "unknown"
        ]
      },
      "LegacyEnum_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"
        ]
      },
      "LegacyRecurringStreamRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_frequency": {
        "type": "string",
        "enum": [
          "daily",
          "weekly",
          "biweekly",
          "semimonthly",
          "monthly",
          "quarterly",
          "annually",
          "irregular",
          "unknown"
        ]
      },
      "LegacyIncomeObservationRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyMerchantAccountRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyPaymentRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_payment_status": {
        "type": "string",
        "enum": [
          "pending",
          "authorized",
          "captured",
          "settled",
          "failed",
          "cancelled",
          "partially_refunded",
          "refunded",
          "unknown"
        ]
      },
      "LegacyProcessorTransactionRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyPayoutRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_payout_status": {
        "type": "string",
        "enum": [
          "pending",
          "in_transit",
          "paid",
          "failed",
          "cancelled",
          "unknown"
        ]
      },
      "LegacyEnum_reconciliation_status": {
        "type": "string",
        "enum": [
          "unmatched",
          "matched",
          "partial",
          "conflict"
        ]
      },
      "LegacyRefundRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyDisputeRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_dispute_status": {
        "type": "string",
        "enum": [
          "needs_response",
          "under_review",
          "won",
          "lost",
          "closed",
          "unknown"
        ]
      },
      "LegacyCounterpartyRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyAddress"
              },
              {
                "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/LegacyAddress"
              },
              {
                "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."
      },
      "LegacyOrderRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_order_status": {
        "type": "string",
        "enum": [
          "open",
          "completed",
          "cancelled",
          "closed",
          "unknown"
        ]
      },
      "LegacyEnum_fulfillment_status": {
        "type": "string",
        "enum": [
          "unfulfilled",
          "partial",
          "fulfilled",
          "returned",
          "unknown"
        ]
      },
      "LegacyOrderLineRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacySubscriptionRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyLedgerAccountRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_gl_type": {
        "type": "string",
        "enum": [
          "asset",
          "liability",
          "equity",
          "revenue",
          "expense",
          "other",
          "unknown"
        ]
      },
      "LegacyEnum_debit_credit": {
        "type": "string",
        "enum": [
          "debit",
          "credit"
        ]
      },
      "LegacyJournalRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyJournalLineRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyInvoiceRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyInvoiceLine"
                }
              },
              {
                "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."
      },
      "LegacyEnum_invoice_status": {
        "type": "string",
        "enum": [
          "draft",
          "open",
          "partially_paid",
          "paid",
          "void",
          "uncollectible",
          "unknown"
        ]
      },
      "LegacyInvoiceLine": {
        "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/LegacyMoney"
              },
              {
                "type": "null"
              }
            ],
            "description": "Unit charge under document tax convention."
          },
          "tax_amount": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyMoney"
              },
              {
                "type": "null"
              }
            ],
            "description": "Line tax amount."
          },
          "line_total": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyMoney"
              },
              {
                "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."
          }
        }
      },
      "LegacyMoney": {
        "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"
        ]
      },
      "LegacyBillRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyInvoiceLine"
                }
              },
              {
                "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."
      },
      "LegacyCreditNoteRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyAccountingPaymentRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyAllocation"
                }
              },
              {
                "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/LegacyEnum_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."
      },
      "LegacyAllocation": {
        "type": "object",
        "properties": {
          "resource_type": {
            "$ref": "#/components/schemas/LegacyEnum_receivable_kind",
            "description": "Type of accounting document receiving allocation."
          },
          "resource_id": {
            "type": "string",
            "description": "Normalized accounting document."
          },
          "amount": {
            "$ref": "#/components/schemas/LegacyMoney",
            "description": "Amount applied in the target document currency."
          }
        },
        "required": [
          "resource_type",
          "resource_id",
          "amount"
        ]
      },
      "LegacyEnum_receivable_kind": {
        "type": "string",
        "enum": [
          "invoice",
          "bill",
          "credit_note"
        ]
      },
      "LegacyFinancialStatementRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_statement_type": {
        "type": "string",
        "enum": [
          "balance_sheet",
          "income_statement",
          "cash_flow",
          "trial_balance"
        ]
      },
      "LegacyEnum_accounting_basis": {
        "type": "string",
        "enum": [
          "cash",
          "accrual",
          "unknown"
        ]
      },
      "LegacyStatementLineRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyTaxObligationRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyProductRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyLocationRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyAddress"
              },
              {
                "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."
      },
      "LegacyInventoryBalanceRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_stock_ownership": {
        "type": "string",
        "enum": [
          "owned",
          "consigned",
          "third_party",
          "unknown"
        ]
      },
      "LegacyInventoryMovementRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_movement_type": {
        "type": "string",
        "enum": [
          "receipt",
          "sale",
          "return",
          "transfer",
          "adjustment",
          "production",
          "consumption",
          "write_off",
          "unknown"
        ]
      },
      "LegacyPurchaseOrderRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyPurchaseLine"
                }
              },
              {
                "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."
      },
      "LegacyEnum_purchase_status": {
        "type": "string",
        "enum": [
          "draft",
          "issued",
          "partially_received",
          "received",
          "cancelled",
          "closed",
          "unknown"
        ]
      },
      "LegacyPurchaseLine": {
        "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/LegacyMoney"
              },
              {
                "type": "null"
              }
            ],
            "description": "Price per ordered unit."
          },
          "line_total": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LegacyMoney"
              },
              {
                "type": "null"
              }
            ],
            "description": "Total ordered line amount."
          }
        }
      },
      "LegacyShipmentRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyShipmentLine"
                }
              },
              {
                "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."
      },
      "LegacyShipmentLine": {
        "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"
        ]
      },
      "LegacyProductionOrderRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_manufacturing_status": {
        "type": "string",
        "enum": [
          "planned",
          "released",
          "in_progress",
          "completed",
          "cancelled",
          "unknown"
        ]
      },
      "LegacyProjectRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_project_status": {
        "type": "string",
        "enum": [
          "planned",
          "active",
          "on_hold",
          "completed",
          "cancelled",
          "unknown"
        ]
      },
      "LegacyApplicationRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_credit_product": {
        "type": "string",
        "enum": [
          "term_loan",
          "line_of_credit",
          "revolving",
          "invoice_finance",
          "merchant_finance",
          "equipment_finance",
          "auto",
          "mortgage",
          "consumer_installment",
          "bnpl",
          "other"
        ]
      },
      "LegacyEnum_application_status": {
        "type": "string",
        "enum": [
          "draft",
          "submitted",
          "in_review",
          "conditional",
          "approved",
          "declined",
          "withdrawn",
          "expired",
          "unknown"
        ]
      },
      "LegacyCreditFacilityRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyLoanRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_loan_status": {
        "type": "string",
        "enum": [
          "pending",
          "active",
          "delinquent",
          "defaulted",
          "restructured",
          "paid_off",
          "charged_off",
          "closed",
          "unknown"
        ]
      },
      "LegacyEnum_rate_type": {
        "type": "string",
        "enum": [
          "fixed",
          "variable",
          "unknown"
        ]
      },
      "LegacyInstallmentRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_repayment_status": {
        "type": "string",
        "enum": [
          "scheduled",
          "pending",
          "completed",
          "failed",
          "reversed",
          "waived",
          "unknown"
        ]
      },
      "LegacyRepaymentRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyCollateralRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyAddress"
              },
              {
                "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."
      },
      "LegacyEnum_collateral_type": {
        "type": "string",
        "enum": [
          "real_estate",
          "vehicle",
          "equipment",
          "inventory",
          "receivables",
          "cash",
          "securities",
          "all_assets",
          "other",
          "unknown"
        ]
      },
      "LegacyGuaranteeRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_guarantee_type": {
        "type": "string",
        "enum": [
          "personal",
          "corporate",
          "limited",
          "unlimited",
          "unknown"
        ]
      },
      "LegacyCovenantRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_covenant_status": {
        "type": "string",
        "enum": [
          "compliant",
          "breached",
          "waived",
          "not_evaluated",
          "unknown"
        ]
      },
      "LegacyDecisionRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_decision_outcome": {
        "type": "string",
        "enum": [
          "approve",
          "decline",
          "refer",
          "conditional",
          "no_decision"
        ]
      },
      "LegacyLienSearchRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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/LegacyProcessingContext"
          }
        },
        "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."
      },
      "LegacyEnum_search_status": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "completed",
          "partial",
          "failed",
          "cancelled"
        ]
      },
      "LegacyLienRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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/LegacyLienParty"
                }
              },
              {
                "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/LegacyLienParty"
                }
              },
              {
                "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/LegacyEnum_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."
      },
      "LegacyEnum_lien_type": {
        "type": "string",
        "enum": [
          "ucc",
          "ppsa",
          "rdprm",
          "tax",
          "judgment",
          "other",
          "unknown"
        ]
      },
      "LegacyEnum_lien_status": {
        "type": "string",
        "enum": [
          "active",
          "lapsed",
          "terminated",
          "discharged",
          "unknown"
        ]
      },
      "LegacyLienParty": {
        "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/LegacyAddress"
              },
              {
                "type": "null"
              }
            ],
            "description": "Address in registry evidence."
          },
          "source_party_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Source identifier if provided."
          }
        },
        "required": [
          "role",
          "name"
        ]
      },
      "LegacyFilingEventRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_filing_event_type": {
        "type": "string",
        "enum": [
          "initial",
          "amendment",
          "continuation",
          "assignment",
          "termination",
          "discharge",
          "renewal",
          "unknown"
        ]
      },
      "LegacyAttributeRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_value_type": {
        "type": "string",
        "enum": [
          "decimal",
          "integer",
          "boolean",
          "string",
          "date"
        ]
      },
      "LegacyEnum_metric_status": {
        "type": "string",
        "enum": [
          "available",
          "unavailable",
          "stale"
        ]
      },
      "LegacyRiskSnapshotRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyMonitorRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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."
      },
      "LegacyEnum_monitor_status": {
        "type": "string",
        "enum": [
          "active",
          "paused",
          "cancelled",
          "blocked"
        ]
      },
      "LegacyAlertRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      },
      "LegacyEnum_severity": {
        "type": "string",
        "enum": [
          "info",
          "low",
          "medium",
          "high",
          "critical"
        ]
      },
      "LegacyEnum_alert_status": {
        "type": "string",
        "enum": [
          "open",
          "resolved"
        ]
      },
      "LegacyWorkflowRunRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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/LegacyProcessingFailure"
              },
              {
                "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."
      },
      "LegacyEnum_workflow_type": {
        "type": "string",
        "enum": [
          "verify",
          "underwrite",
          "monitor",
          "investigate"
        ]
      },
      "LegacyEnum_workflow_status": {
        "type": "string",
        "enum": [
          "queued",
          "running",
          "waiting_for_data",
          "completed",
          "failed",
          "cancelled",
          "waiting_for_credits",
          "blocked_by_limit"
        ]
      },
      "LegacyProcessingFailure": {
        "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"
                }
              }
            }
          }
        ]
      },
      "LegacyRequirementRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEvidenceRejection"
              },
              {
                "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."
      },
      "LegacyEnum_requirement_status": {
        "type": "string",
        "enum": [
          "missing",
          "requested",
          "received",
          "accepted",
          "rejected",
          "waived"
        ]
      },
      "LegacyEvidenceRejection": {
        "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
      },
      "LegacyAuditEventRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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."
      },
      "LegacyReconciliationLinkRead": {
        "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/LegacySourceRef"
            },
            "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/LegacyFieldProvenance"
                }
              },
              {
                "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/LegacyEnum_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/LegacyMissingField"
            },
            "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/LegacyEnum_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/LegacyEnum_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."
      }
    },
    "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."
      }
    }
  },
  "webhooks": {
    "resourceEvent": {
      "post": {
        "description": "Proposed event envelope. Apply the existing raw-body HMAC verifier; persist then acknowledge. Delivery may be duplicated or out of order.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Event"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Durably accepted."
          }
        }
      }
    }
  }
}
