{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/popp/json-schema/popp-create-document-type-request-schema.json",
  "title": "CreateDocumentTypeRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/popp-documents-api-openapi.yml#/components/schemas/CreateDocumentTypeRequest",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Human-readable name shown to recruiters and candidates."
    },
    "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."
    },
    "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."
    },
    "validationSettings": {
      "type": "string",
      "description": "JSON-encoded settings that tune the validation checks. Example: {\"validFor\":{\"value\":6,\"unit\":\"MONTHS\"}}."
    },
    "externalId": {
      "type": "string",
      "description": "Stable customer-controlled identifier. Must be unique per organization. Allowed characters: [A-Za-z0-9._-]+"
    }
  },
  "required": [
    "name"
  ]
}