{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-update-document-type-request-schema.json",
  "title": "UpdateDocumentTypeRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-documents-api-openapi.yml#/components/schemas/UpdateDocumentTypeRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Human-readable name. Cannot be changed once the document type is referenced by a campaign or workflow."
    },
    "validation": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "CHECK_DOCUMENT_CORNER_INCLUSION",
          "CHECK_NAME_MATCH",
          "CHECK_EXPIRATION_DATE",
          "CHECK_ISSUE_DATE",
          "CHECK_DATE_OF_BIRTH_INCLUSION",
          "CHECK_HOME_ADDRESS_INCLUSION"
        ]
      },
      "description": "Validation checks to apply to documents of this type. Pass null to clear."
    },
    "classificationRules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "INCLUDES_FIELD"
            ]
          },
          "value": {
            "type": "string"
          }
        },
        "required": [
          "type",
          "value"
        ]
      },
      "description": "Rules used to recognise documents of this type. Pass null to clear."
    },
    "validationSettings": {
      "type": "string",
      "description": "JSON-encoded settings that tune the validation checks. Pass null to clear."
    },
    "externalId": {
      "type": "string",
      "description": "Stable customer-controlled identifier. Must be unique per organization. Pass null to clear."
    }
  }
}