{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/breezecash/json-schema/breezecash-submit-headless-kyc-with-image-url-request-schema.json",
  "title": "SubmitHeadlessKycWithImageUrlRequest",
  "description": "KYC submission details",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/breezecash-headless-kyc-api-openapi.yml#/components/schemas/SubmitHeadlessKycWithImageUrlRequest",
  "type": "object",
  "properties": {
    "customerReferenceId": {
      "type": "string",
      "maxLength": 255
    },
    "tier": {
      "const": "TIER_2"
    },
    "email": {
      "type": "string",
      "format": "email",
      "maxLength": 255
    },
    "firstName": {
      "type": "string",
      "maxLength": 100
    },
    "lastName": {
      "type": "string",
      "maxLength": 100
    },
    "middleName": {
      "type": "string",
      "maxLength": 100
    },
    "dateOfBirth": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "country": {
      "type": "string"
    },
    "phoneNumber": {
      "type": "string",
      "maxLength": 20
    },
    "address": {
      "type": "object",
      "properties": {
        "line1": {
          "type": "string",
          "maxLength": 255
        },
        "line2": {
          "type": "string",
          "maxLength": 255
        },
        "city": {
          "type": "string",
          "maxLength": 100
        },
        "country": {
          "type": "string"
        },
        "state": {
          "type": "string",
          "maxLength": 100
        },
        "postalCode": {
          "type": "string",
          "anyOf": [
            {
              "type": "string",
              "pattern": "^\\d{5}(-\\d{4})?$"
            },
            {
              "type": "string",
              "maxLength": 20
            }
          ]
        }
      },
      "required": [
        "line1",
        "city",
        "country"
      ],
      "additionalProperties": false
    },
    "taxId": {
      "type": "string",
      "minLength": 4,
      "maxLength": 50
    },
    "document": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "DRIVERS_LICENSE",
                "NATIONAL_ID",
                "RESIDENCE_PERMIT",
                "PERMANENT_RESIDENCE_CARD"
              ]
            },
            "frontImageUrl": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            },
            "backImageUrl": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            },
            "documentNumber": {
              "type": "string",
              "maxLength": 50
            }
          },
          "required": [
            "type",
            "frontImageUrl",
            "backImageUrl",
            "documentNumber"
          ],
          "additionalProperties": false,
          "title": "DRIVERS_LICENSE, NATIONAL_ID, RESIDENCE_PERMIT, PERMANENT_RESIDENCE_CARD",
          "description": "These document types require both front and back image URLs."
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "PASSPORT",
                "PASSPORT_CARD"
              ]
            },
            "frontImageUrl": {
              "type": "string",
              "format": "uri",
              "maxLength": 2048
            },
            "documentNumber": {
              "type": "string",
              "maxLength": 50
            }
          },
          "required": [
            "type",
            "frontImageUrl",
            "documentNumber"
          ],
          "additionalProperties": false,
          "title": "PASSPORT, PASSPORT_CARD",
          "description": "These document types only require a front image URL."
        }
      ]
    },
    "consent": {
      "type": "object",
      "properties": {
        "termsAcceptedAt": {
          "type": "integer",
          "exclusiveMinimum": 0
        },
        "ipAddress": {
          "type": "string",
          "oneOf": [
            {
              "format": "ipv4"
            },
            {
              "format": "ipv6"
            }
          ]
        },
        "userAgent": {
          "type": "string",
          "maxLength": 500
        }
      },
      "required": [
        "termsAcceptedAt",
        "ipAddress"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "customerReferenceId",
    "tier",
    "email",
    "firstName",
    "lastName",
    "dateOfBirth",
    "country",
    "phoneNumber",
    "address",
    "document",
    "consent"
  ],
  "additionalProperties": false
}