{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dvla-gov-uk/json-schema/dvla-gov-uk-kadoe-request-schema.json",
  "title": "KadoeRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dvla-gov-uk-kadoe-openapi.yml#/components/schemas/KadoeRequest",
  "type": "object",
  "required": [
    "enquirerId",
    "reasonCode",
    "eventDate",
    "referenceNumber"
  ],
  "properties": {
    "enquirerId": {
      "type": "string",
      "description": "Identifier for the enquirer."
    },
    "linkProviderId": {
      "type": "string",
      "description": "Identifier for the link provider, should there be one."
    },
    "reasonCode": {
      "type": "string",
      "description": "Code indicating the reason for the enquiry."
    },
    "registrationNumber": {
      "$ref": "#/$defs/RegistrationNumber"
    },
    "chassisVin": {
      "$ref": "#/$defs/ChassisVin"
    },
    "eventDate": {
      "type": "string",
      "format": "YYYY-MM-DD",
      "description": "The date of event in format YYYY-MM-DD."
    },
    "referenceNumber": {
      "type": "string",
      "description": "Alpha-numeric reference provided by the enquirer."
    }
  },
  "$defs": {
    "ChassisVin": {
      "type": "string",
      "description": "Vehicle's chassis identification number."
    },
    "RegistrationNumber": {
      "type": "string",
      "description": "Vehicle's registration number.",
      "pattern": "^(([A-Za-z]{1,2}[ ]?[0-9]{1,4})|([A-Za-z]{3}[ ]?[0-9]{1,3})|([0-9]{1,3}[ ]?[A-Za-z]{3})|([0-9]{1,4}[ ]?[A-Za-z]{1,2})|([A-Za-z]{3}[ ]?[0-9]{1,3}[ ]?[A-Za-z])|([A-Za-z][ ]?[0-9]{1,3}[ ]?[A-Za-z]{3})|([A-Za-z]{2}[ ]?[0-9]{2}[ ]?[A-Za-z]{3})|([A-Za-z]{3}[ ]?[0-9]{4}))$"
    }
  }
}