{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/dvla-gov-uk/json-schema/dvla-gov-uk-driving-licence-request-schema.json",
  "title": "drivingLicenceRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/dvla-gov-uk-driver-view-openapi.yml#/components/schemas/drivingLicenceRequest",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "drivingLicenceNumber"
  ],
  "properties": {
    "drivingLicenceNumber": {
      "$ref": "#/$defs/drivingLicenceNumber"
    },
    "includeCPC": {
      "$ref": "#/$defs/includeCPC"
    },
    "includeTacho": {
      "$ref": "#/$defs/includeTacho"
    },
    "acceptPartialResponse": {
      "$ref": "#/$defs/acceptPartialResponse"
    }
  },
  "$defs": {
    "acceptPartialResponse": {
      "type": "string",
      "enum": [
        "true",
        "false",
        "onConditionCPCAvailable",
        "onConditionTachoAvailable"
      ],
      "default": "false",
      "description": "Optional enum to indicate whether to accept a partial response. 'true' permits a partial to be returned in all cases, 'false' returns an error response if any of the requested data is unavailable, 'onConditionCPCAvailable' permits a partial response only when cpc data is available and 'onConditionTachoAvailable' permits a partial response only when tachograph data is available. This field defaults to 'false'."
    },
    "drivingLicenceNumber": {
      "type": "string",
      "maxLength": 16,
      "minLength": 5,
      "pattern": "^[a-zA-Z0-9]*$",
      "description": "A UK driving licence number"
    },
    "includeCPC": {
      "type": "boolean",
      "description": "Optional boolean indicating whether to return CPC data. Defaults to false."
    },
    "includeTacho": {
      "type": "boolean",
      "description": "Optional boolean indicating whether to return tachograph data. Defaults to false."
    }
  }
}