{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alpaca/json-schema/alpaca-document-schema.json",
  "title": "Document",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alpaca-documents-api-openapi.yml#/components/schemas/Document",
  "type": "array",
  "minItems": 1,
  "uniqueItems": true,
  "items": {
    "type": "object",
    "properties": {
      "document_id": {
        "type": "string",
        "minLength": 1,
        "format": "uuid"
      },
      "document_type": {
        "$ref": "#/$defs/DocumentType"
      },
      "document_date": {
        "type": "string",
        "minLength": 1,
        "format": "date-time"
      }
    },
    "required": [
      "document_id",
      "document_type",
      "document_date"
    ]
  },
  "$defs": {
    "DocumentType": {
      "type": "string",
      "enum": [
        "identity_verification",
        "address_verification",
        "date_of_birth_verification",
        "tax_id_verification",
        "account_approval_letter",
        "cip_result"
      ],
      "description": "- identity_verification:\n  identity verification document\n\n- address_verification:\n  address verification document\n\n- date_of_birth_verification:\n  date of birth verification document\n\n- tax_id_verification:\n  tax ID verification document\n\n- account_approval_letter:\n  407 approval letter\n\n- cip_result:\n  initial CIP result\n"
    }
  }
}