{
    "openapi": "3.0.3",
    "info": {
        "description": "Service to retrieve driver, and optionally tachograph and CPC data for a driving licence number",
        "version": "1.25.0",
        "title": "driver-view-external"
    },
    "tags": [
        {
            "name": "Full Driver Enquiry Service",
            "description": "Service to retrieve driver, and optionally tachograph and CPC data for a driving licence number"
        }
    ],
    "servers": [
        {
            "url": "https://driver-vehicle-licensing.api.gov.uk/full-driver-enquiry",
            "description": "Production environment"
        },
        {
            "url": "https://uat.driver-vehicle-licensing.api.gov.uk/full-driver-enquiry",
            "description": "External testing (UAT) environment"
        }
    ],
    "security": [
        {
            "jwtAuth": []
        },
        {
            "apiKeyAuth": []
        }
    ],
    "paths": {
        "/v1/driving-licences/retrieve": {
            "post": {
                "tags": ["Full Driver Enquiry API"],
                "summary": "Returns driver data for the supplied driving licence number, including licence details. Optionally returns CPC and tachograph data",
                "requestBody": {
                    "description": "The full driving licence number to be enquired upon including the check digits. Options are available to include CPC and tachograph data and to accept/reject partial responses (when unexpected techncial problems prevent CPC or tachograph data from being retrieved for the enquiry).",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/drivingLicenceRequest"
                            },
                            "examples": {
                                "Driving licence (with optional parameters set to their default values)": {
                                    "description": "Driving licence (with optional parameters set to their default values)",
                                    "value": {
                                        "drivingLicenceNumber": "ABCDE123456AB1AB",
                                        "includeCPC": false,
                                        "includeTacho": false,
                                        "acceptPartialResponse": "false"
                                    }
                                },
                                "Driving licence": {
                                    "description": "Driving licence (minimal request)",
                                    "value": {
                                        "drivingLicenceNumber": "ABCDE123456AB1AB"
                                    }
                                },
                                "Driving licence, CPC and tachograph data": {
                                    "description": "Driving licence, CPC and tachograph data",
                                    "value": {
                                        "drivingLicenceNumber": "ABCDE123456AB1AB",
                                        "includeCPC": true,
                                        "includeTacho": true
                                    }
                                },
                                "Driving licence and CPC": {
                                    "description": "Driving licence and CPC data",
                                    "value": {
                                        "drivingLicenceNumber": "ABCDE123456AB1AB",
                                        "includeCPC": true
                                    }
                                },
                                "Driving licence and tachograph data": {
                                    "description": "Driving licence and tachograph data",
                                    "value": {
                                        "drivingLicenceNumber": "ABCDE123456AB1AB",
                                        "includeTacho": true
                                    }
                                },
                                "Driving licence, CPC and tachograph data (accept partial response)": {
                                    "description": "Driving licence, CPC and tachograph data (accept partial response)",
                                    "value": {
                                        "drivingLicenceNumber": "ABCDE123456AB1AB",
                                        "includeCPC": true,
                                        "includeTacho": true,
                                        "acceptPartialResponse": "true"
                                    }
                                },
                                "Driving licence, CPC and tachograph (accept partial response, mandate CPC)": {
                                    "description": "Driving licence, CPC and tachograph (accept partial response, mandate CPC)",
                                    "value": {
                                        "drivingLicenceNumber": "ABCDE123456AB1AB",
                                        "includeCPC": true,
                                        "includeTacho": true,
                                        "acceptPartialResponse": "onConditionCPCAvailable"
                                    }
                                },
                                "Driving licence, CPC and tachograph (accept partial response, mandate tachograph)": {
                                    "description": "Driving licence, CPC and tachograph (accept partial response, mandate tachograph)",
                                    "value": {
                                        "drivingLicenceNumber": "ABCDE123456AB1AB",
                                        "includeCPC": true,
                                        "includeTacho": true,
                                        "acceptPartialResponse": "onConditionTachoAvailable"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "$ref": "#/components/responses/drivingLicenceResponse"
                    },
                    "400": {
                        "$ref": "#/components/responses/400"
                    },
                    "401": {
                        "$ref": "#/components/responses/401"
                    },
                    "403": {
                        "$ref": "#/components/responses/403"
                    },
                    "404": {
                        "$ref": "#/components/responses/404"
                    },
                    "429": {
                        "$ref": "#/components/responses/429"
                    },
                    "500": {
                        "$ref": "#/components/responses/500"
                    },
                    "502": {
                        "$ref": "#/components/responses/502"
                    },
                    "503": {
                        "$ref": "#/components/responses/503"
                    },
                    "504": {
                        "$ref": "#/components/responses/504"
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "jwtAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "Authorization",
                "description": "Valid JWT token issued as a result of authentication against the API gateway."
            },
            "apiKeyAuth": {
                "type": "apiKey",
                "in": "header",
                "name": "X-API-Key",
                "description": "API key used to access the service."
            }
        },
        "headers": {
            "dvlaRequestId": {
                "description": "Request Id to trace the API request.",
                "required": false,
                "schema": {
                    "type": "string",
                    "format": "uuid",
                    "example": "dbcf549a-43db-4b95-aea8-1e6b792397bb"
                }
            }
        },
        "responses": {
            "drivingLicenceResponse": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    },
                    "api-spec-version": {
                        "description": "Semantic version of the current Open API spec.",
                        "schema": {
                            "type": "string",
                            "format": "float",
                            "example": "1.17.0"
                        }
                    }
                },
                "description": "Successful Response. Returns a combination of driver, tachograph and cpc data",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/viewDriverResponse"
                        },
                        "examples": {
                            "Full driving licence with restrictions and endorsements": {
                                "description": "Successful Response - Full driving licence with restrictions and endorsements.",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "TCAEU610267NO9EK",
                                        "firstNames": "NPBPG OYOT",
                                        "lastName": "TCAEUCJ",
                                        "gender": "Male",
                                        "dateOfBirth": "1967-10-26",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "78 A TEST DATA DO NOT DELIVER",
                                                "line5": "GREAT YARMOUTH",
                                                "postcode": "NR30 4BH"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "A",
                                            "categoryLegalLiteral": "A motorcycle of a power exceeding 35 kW or with a power to weight ratio exceeding 0.2 kW per kg, or A motorcycle of a power not exceeding 35 kW with a power to weight ratio not exceeding 0.2 kW per kg and derived from a vehicle of more than double its power. A motor tricycle with a power exceeding 15 kW",
                                            "categoryType": "Full",
                                            "fromDate": "2013-01-19",
                                            "expiryDate": "2037-10-25",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "79(03)",
                                                    "restrictionLiteral": "Restricted to tricycles"
                                                }
                                            ]
                                        }
                                    ],
                                    "endorsements": [
                                        {
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2018-04-28",
                                            "penaltyPoints": 3,
                                            "penaltyPointsExpiryDate": "2021-04-28"
                                        }
                                    ],
                                    "token": {
                                        "validFromDate": "1999-04-11",
                                        "validToDate": "2037-10-25",
                                        "issueNumber": "69"
                                    }
                                }
                            },
                            "Full driving licence - disqualified for life": {
                                "description": "Successful Response - Full driving licence, driver disqualified for life",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "LQZVJ603206B99ZY",
                                        "firstNames": "BKNTPL",
                                        "lastName": "LQZVJMTJ",
                                        "gender": "Male",
                                        "dateOfBirth": "1966-03-20",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "02 B TEST DATA DO NOT DELIVER",
                                                "line5": "LIVERPOOL",
                                                "postcode": "L8 0SW"
                                            }
                                        },
                                        "disqualifiedForLife": true
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Disqualified",
                                        "statusQualifier": "For life"
                                    },
                                    "endorsements": [
                                        {
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2017-07-04",
                                            "penaltyPoints": 3,
                                            "penaltyPointsExpiryDate": "2020-07-04"
                                        },
                                        {
                                            "offenceCode": "SP50",
                                            "offenceLegalLiteral": "Exceeding speed limit on a motorway",
                                            "offenceDate": "2017-08-19",
                                            "penaltyPoints": 3,
                                            "penaltyPointsExpiryDate": "2020-08-19"
                                        },
                                        {
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2018-05-01",
                                            "penaltyPoints": 3,
                                            "penaltyPointsExpiryDate": "2021-05-01"
                                        },
                                        {
                                            "disqualification": {
                                                "forLife": true
                                            },
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2022-12-21",
                                            "convictionDate": "2023-01-01"
                                        }
                                    ],
                                    "entitlement": [
                                        {
                                            "categoryCode": "B1",
                                            "categoryLegalLiteral": "Motor vehicles with 4 wheels up to 400 kg unladen or 550 kg if they're designed for carrying goods",
                                            "categoryType": "Full",
                                            "fromDate": "1991-06-18",
                                            "expiryDate": "2023-01-01"
                                        }
                                    ],
                                    "token": {
                                        "validFromDate": "1991-07-03",
                                        "validToDate": "2036-03-19",
                                        "issueNumber": "94"
                                    }
                                }
                            },
                            "Full driving licence - disqualified until sentenced": {
                                "description": "Successful Response - Full driving licence, driver disqualified until sentenced",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "NDSRZ904116AN9CN",
                                        "firstNames": "AOE NRKT",
                                        "lastName": "N'HVCTN",
                                        "gender": "Male",
                                        "dateOfBirth": "1996-04-11",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "941  TEST DATA DO NOT DELIVER",
                                                "line5": "BIRMINGHAM",
                                                "postcode": "B25 8SN"
                                            }
                                        },
                                        "disqualifiedPendingSentence": true
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Disqualified",
                                        "statusQualifier": "Pending sentence"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "C",
                                            "categoryLegalLiteral": "Vehicles weighing over 3,500 kg (with a trailer up to 750 kg), with no more than 8 passengers and driver",
                                            "categoryType": "Full",
                                            "fromDate": "2015-07-08",
                                            "expiryDate": "2019-01-21"
                                        }
                                    ],
                                    "endorsements": [
                                        {
                                            "offenceCode": "DD10",
                                            "offenceLegalLiteral": "Causing serious injury by dangerous driving",
                                            "offenceDate": "2017-12-15",
                                            "convictionDate": "2019-01-21"
                                        }
                                    ],
                                    "token": {
                                        "validFromDate": "2016-03-18",
                                        "validToDate": "2020-08-03",
                                        "issueNumber": "21"
                                    }
                                }
                            },
                            "Full driving licence - disqualified with start date for disqualification": {
                                "description": "Successful Response - Full driving licence, driver disqualified",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "COOK9862216YC5HB",
                                        "firstNames": "GILLIAN",
                                        "lastName": "MCDANIEL",
                                        "gender": "Male",
                                        "dateOfBirth": "1962-03-15",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "1001 TEST DATA DO NOT DELIVER",
                                                "line5": "BRISTOL",
                                                "postcode": "B7F 1TS"
                                            }
                                        },
                                        "disqualifiedUntil": "2021-06-01"
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Disqualified",
                                        "statusQualifier": "Until test passed"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "C",
                                            "categoryLegalLiteral": "Vehicles weighing over 3,500 kg (with a trailer up to 750 kg), with no more than 8 passengers and driver",
                                            "categoryType": "Full",
                                            "fromDate": "2015-07-08",
                                            "expiryDate": "2019-01-21"
                                        }
                                    ],
                                    "endorsements": [
                                        {
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2020-11-16",
                                            "convictionDate": "2020-12-01",
                                            "disqualification": {
                                                "months": 6,
                                                "startDate": "2020-12-01"
                                            }
                                        }
                                    ],
                                    "token": {
                                        "validFromDate": "2015-05-10",
                                        "validToDate": "2025-05-11",
                                        "issueNumber": "09"
                                    }
                                }
                            },
                            "Full driving licence - full and valid with disqualification reimposed date": {
                                "description": "Successful Response - Full driving licence with disqualification reimposed date",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "OLSON453137MO3NE",
                                        "firstNames": "JANE",
                                        "lastName": "OLSON",
                                        "gender": "Female",
                                        "dateOfBirth": "1974-10-03",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "1011 TEST DATA DO NOT DELIVER",
                                                "postcode": "SY82 3XE"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "C",
                                            "categoryLegalLiteral": "Vehicles weighing over 3,500 kg (with a trailer up to 750 kg), with no more than 8 passengers and driver",
                                            "categoryType": "Full",
                                            "fromDate": "2015-07-08",
                                            "expiryDate": "2019-01-21"
                                        }
                                    ],
                                    "endorsements": [
                                        {
                                            "disqualificationReimposedDate": "2022-11-26",
                                            "convictionDate": "2022-03-02",
                                            "sentenceDate": "2022-06-15",
                                            "offenceCode": "TT99",
                                            "offenceLegalLiteral": "To signify a disqualification under 'totting up' procedure. If the total penalty points reach 12 or more within 3 years, the driver is liable to be disqualified",
                                            "disqualification": {
                                                "months": 4,
                                                "days": 9
                                            },
                                            "disqualificationSuspendedPendingAppealDate": "2022-08-11"
                                        }
                                    ],
                                    "token": {
                                        "validFromDate": "2015-05-10",
                                        "validToDate": "2025-05-11",
                                        "issueNumber": "09"
                                    }
                                }
                            },
                            "Full driving licence - full and valid with disqualification removal date": {
                                "description": "Successful Response - Full driving licence, driver with disqualification removal date",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "COOK9862216YC5HB",
                                        "firstNames": "GILLIAN",
                                        "lastName": "MCDANIEL",
                                        "gender": "Male",
                                        "dateOfBirth": "1962-03-15",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "1011 TEST DATA DO NOT DELIVER",
                                                "postcode": "M7H 9TQ"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "C",
                                            "categoryLegalLiteral": "Vehicles weighing over 3,500 kg (with a trailer up to 750 kg), with no more than 8 passengers and driver",
                                            "categoryType": "Full",
                                            "fromDate": "2015-07-08",
                                            "expiryDate": "2019-01-21"
                                        }
                                    ],
                                    "endorsements": [
                                        {
                                            "disqualificationRemovalDate": "2018-06-13",
                                            "convictionDate": "2016-02-08",
                                            "offenceCode": "DR10",
                                            "offenceLegalLiteral": "Driving or attempting to drive with alcohol level above limit",
                                            "disqualification": {
                                                "years": 3
                                            },
                                            "offenceDate": "2015-12-25"
                                        }
                                    ],
                                    "token": {
                                        "validFromDate": "2015-05-10",
                                        "validToDate": "2025-05-11",
                                        "issueNumber": "09"
                                    }
                                }
                            },
                            "Full driving licence - full and valid with disqualification suspended pending appeal date and removal date": {
                                "description": "Successful Response - Full driving licence, driver with disqualification suspended pending appeal date and removal date",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "WAGNE401126TW1PO",
                                        "firstNames": "MASON",
                                        "lastName": "WAGNER",
                                        "gender": "Male",
                                        "dateOfBirth": "1995-01-13",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "1011 TEST DATA DO NOT DELIVER",
                                                "postcode": "IP3R 5HH"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "C",
                                            "categoryLegalLiteral": "Vehicles weighing over 3,500 kg (with a trailer up to 750 kg), with no more than 8 passengers and driver",
                                            "categoryType": "Full",
                                            "fromDate": "2015-07-08",
                                            "expiryDate": "2019-01-21"
                                        }
                                    ],
                                    "endorsements": [
                                        {
                                            "disqualificationReimposedDate": "2022-12-27",
                                            "convictionDate": "2022-04-03",
                                            "sentenceDate": "2022-07-16",
                                            "offenceCode": "TT99",
                                            "offenceLegalLiteral": "To signify a disqualification under 'totting up' procedure. If the total penalty points reach 12 or more within 3 years, the driver is liable to be disqualified",
                                            "disqualification": {
                                                "months": 4,
                                                "days": 9
                                            },
                                            "disqualificationSuspendedPendingAppealDate": "2022-09-12"
                                        }
                                    ],
                                    "token": {
                                        "validFromDate": "2015-05-10",
                                        "validToDate": "2025-05-11",
                                        "issueNumber": "09"
                                    }
                                }
                            },
                            "Provisional licence": {
                                "description": "Successful Response - Provisional licence",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "BBUWI604072H99JF",
                                        "firstNames": "HZFW",
                                        "lastName": "BBUWIQUZD",
                                        "gender": "Male",
                                        "dateOfBirth": "1962-04-07",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "9 PH TEST DATA DO NOT DELIVER",
                                                "line5": "WHITLEY BAY",
                                                "postcode": "NE26 3P"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Provisional",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "C1",
                                            "categoryLegalLiteral": "Vehicles weighing between 3,500 and 7,500 kg (with a trailer up to 750 kg), with no more than 8 passengers and driver",
                                            "categoryType": "Provisional",
                                            "fromDate": "1984-03-21",
                                            "expiryDate": "2032-04-06"
                                        }
                                    ],
                                    "endorsements": [],
                                    "token": {
                                        "validFromDate": "1984-03-21",
                                        "validToDate": "2032-04-06",
                                        "issueNumber": "33"
                                    }
                                }
                            },
                            "Full driving licence, CPC and tachograph data": {
                                "description": "Successful Response - Full driving licence, CPC and tachograph data",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "AFEBL412082FW9CT",
                                        "lastName": "AFEBL",
                                        "gender": "Male",
                                        "firstNames": "FOXBRJG WKVT O",
                                        "dateOfBirth": "1942-12-08",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "57 G TEST DATA DO NOT DELIVER",
                                                "line2": "RUMNEY",
                                                "line5": "CARDIFF",
                                                "postcode": "CF3 3LX"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "endorsements": [
                                        {
                                            "penaltyPoints": 3,
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2016-07-07",
                                            "penaltyPointsExpiryDate": "2019-07-07"
                                        }
                                    ],
                                    "entitlement": [
                                        {
                                            "categoryCode": "B",
                                            "categoryLegalLiteral": "Vehicles up to 3,500 kg Maximum Authorised Mass (MAM) with up to 8 passenger seats and driver (with a trailer up to 750 kg). Can also tow heavier trailers if the total weight of vehicle and trailer isn't more than 3,500 kg. Physically disabled drivers with provisional category B entitlement will also have provisional entitlement to ride category A1 or A motor tricycles. Able-bodied drivers can no longer ride motor tricycles with a provisional category B licence",
                                            "categoryType": "Full",
                                            "fromDate": "1975-07-15",
                                            "expiryDate": "2021-12-07",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "01",
                                                    "restrictionLiteral": "Eyesight Correction"
                                                }
                                            ]
                                        }
                                    ],
                                    "token": {
                                        "issueNumber": "01",
                                        "validFromDate": "2018-10-11",
                                        "validToDate": "2021-12-07"
                                    },
                                    "cpc": {
                                        "cpcs": [
                                            {
                                                "lgvValidTo": "2023-03-27",
                                                "pcvValidTo": "2022-06-09"
                                            },
                                            {
                                                "lgvValidTo": "2024-01-11",
                                                "pcvValidTo": "2025-03-22",
                                                "national": true
                                            }
                                        ]
                                    },
                                    "holder": {
                                        "tachoCards": [
                                            {
                                                "cardNumber": "DB08311162038002",
                                                "cardStatus": "DISPATCHED",
                                                "cardExpiryDate": "2028-03-01",
                                                "cardStartOfValidityDate": "2023-03-02"
                                            }
                                        ]
                                    }
                                }
                            },
                            "Full driving licence and CPC data": {
                                "description": "Successful Response - Full driving licence and CPC data",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "AFEBL412082FW9CT",
                                        "lastName": "AFEBL",
                                        "gender": "Male",
                                        "firstNames": "FOXBRJG WKVT O",
                                        "dateOfBirth": "1942-12-08",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "57 G TEST DATA DO NOT DELIVER",
                                                "line2": "RUMNEY",
                                                "line5": "CARDIFF",
                                                "postcode": "CF3 3LX"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "endorsements": [
                                        {
                                            "penaltyPoints": 3,
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2016-07-07",
                                            "penaltyPointsExpiryDate": "2019-07-07"
                                        }
                                    ],
                                    "entitlement": [
                                        {
                                            "categoryCode": "B",
                                            "categoryLegalLiteral": "Vehicles up to 3,500 kg Maximum Authorised Mass (MAM) with up to 8 passenger seats and driver (with a trailer up to 750 kg). Can also tow heavier trailers if the total weight of vehicle and trailer isn't more than 3,500 kg. Physically disabled drivers with provisional category B entitlement will also have provisional entitlement to ride category A1 or A motor tricycles. Able-bodied drivers can no longer ride motor tricycles with a provisional category B licence",
                                            "categoryType": "Full",
                                            "fromDate": "1975-07-15",
                                            "expiryDate": "2021-12-07",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "01",
                                                    "restrictionLiteral": "Eyesight Correction"
                                                }
                                            ]
                                        }
                                    ],
                                    "token": {
                                        "issueNumber": "01",
                                        "validFromDate": "2018-10-11",
                                        "validToDate": "2021-12-07"
                                    },
                                    "cpc": {
                                        "cpcs": [
                                            {
                                                "lgvValidTo": "2023-03-27",
                                                "pcvValidTo": "2022-06-09"
                                            },
                                            {
                                                "lgvValidTo": "2024-01-11",
                                                "pcvValidTo": "2025-03-22",
                                                "national": true
                                            }
                                        ]
                                    }
                                }
                            },
                            "Full driving licence and tachograph": {
                                "description": "Successful Response - Full driving licence and tachograph data",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "AFEBL412082FW9CT",
                                        "lastName": "AFEBL",
                                        "gender": "Male",
                                        "firstNames": "FOXBRJG WKVT O",
                                        "dateOfBirth": "1942-12-08",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "57 G TEST DATA DO NOT DELIVER",
                                                "line2": "RUMNEY",
                                                "line5": "CARDIFF",
                                                "postcode": "CF3 3LX"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "endorsements": [
                                        {
                                            "penaltyPoints": 3,
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2016-07-07",
                                            "penaltyPointsExpiryDate": "2019-07-07"
                                        }
                                    ],
                                    "entitlement": [
                                        {
                                            "categoryCode": "B",
                                            "categoryLegalLiteral": "Vehicles up to 3,500 kg Maximum Authorised Mass (MAM) with up to 8 passenger seats and driver (with a trailer up to 750 kg). Can also tow heavier trailers if the total weight of vehicle and trailer isn't more than 3,500 kg. Physically disabled drivers with provisional category B entitlement will also have provisional entitlement to ride category A1 or A motor tricycles. Able-bodied drivers can no longer ride motor tricycles with a provisional category B licence",
                                            "categoryType": "Full",
                                            "fromDate": "1975-07-15",
                                            "expiryDate": "2021-12-07",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "01",
                                                    "restrictionLiteral": "Eyesight Correction"
                                                }
                                            ]
                                        }
                                    ],
                                    "token": {
                                        "issueNumber": "01",
                                        "validFromDate": "2018-10-11",
                                        "validToDate": "2021-12-07"
                                    },
                                    "holder": {
                                        "tachoCards": [
                                            {
                                                "cardNumber": "DB08311162038002",
                                                "cardStatus": "DISPATCHED",
                                                "cardExpiryDate": "2028-03-01",
                                                "cardStartOfValidityDate": "2023-03-02"
                                            }
                                        ]
                                    }
                                }
                            },
                            "Full driving licence, CPC and tachograph (accept partial response, CPC and tachograph services unavailable)": {
                                "description": "Successful Response - Full driving licence, CPC and tachograph data (accept partial response, CPC and tachograph services unavailable)",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "AFEBL412082FW9CT",
                                        "lastName": "AFEBL",
                                        "gender": "Male",
                                        "firstNames": "FOXBRJG WKVT O",
                                        "dateOfBirth": "1942-12-08",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "57 G TEST DATA DO NOT DELIVER",
                                                "line2": "RUMNEY",
                                                "line5": "CARDIFF",
                                                "postcode": "CF3 3LX"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "endorsements": [
                                        {
                                            "penaltyPoints": 3,
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2016-07-07",
                                            "penaltyPointsExpiryDate": "2019-07-07"
                                        }
                                    ],
                                    "entitlement": [
                                        {
                                            "categoryCode": "B",
                                            "categoryLegalLiteral": "Vehicles up to 3,500 kg Maximum Authorised Mass (MAM) with up to 8 passenger seats and driver (with a trailer up to 750 kg). Can also tow heavier trailers if the total weight of vehicle and trailer isn't more than 3,500 kg. Physically disabled drivers with provisional category B entitlement will also have provisional entitlement to ride category A1 or A motor tricycles. Able-bodied drivers can no longer ride motor tricycles with a provisional category B licence",
                                            "categoryType": "Full",
                                            "fromDate": "1975-07-15",
                                            "expiryDate": "2021-12-07",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "01",
                                                    "restrictionLiteral": "Eyesight Correction"
                                                }
                                            ]
                                        }
                                    ],
                                    "token": {
                                        "issueNumber": "01",
                                        "validFromDate": "2018-10-11",
                                        "validToDate": "2021-12-07"
                                    },
                                    "errors": [
                                        {
                                            "status": "503",
                                            "code": "ENQ068",
                                            "detail": "CPC data currently unavailable"
                                        },
                                        {
                                            "status": "503",
                                            "code": "ENQ069",
                                            "detail": "Tachograph data currently unavailable"
                                        }
                                    ]
                                }
                            },
                            "Full driving licence, CPC and tachograph data (accept partial response, CPC unavailable)": {
                                "description": "Successful Response - Full driving licence, CPC and tachograph data (accept partial response, CPC data unavailable)",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "AFEBL412082FW9CT",
                                        "lastName": "AFEBL",
                                        "gender": "Male",
                                        "firstNames": "FOXBRJG WKVT O",
                                        "dateOfBirth": "1942-12-08",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "57 G TEST DATA DO NOT DELIVER",
                                                "line2": "RUMNEY",
                                                "line5": "CARDIFF",
                                                "postcode": "CF3 3LX"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "endorsements": [
                                        {
                                            "penaltyPoints": 3,
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2016-07-07",
                                            "penaltyPointsExpiryDate": "2019-07-07"
                                        }
                                    ],
                                    "entitlement": [
                                        {
                                            "categoryCode": "B",
                                            "categoryLegalLiteral": "Vehicles up to 3,500 kg Maximum Authorised Mass (MAM) with up to 8 passenger seats and driver (with a trailer up to 750 kg). Can also tow heavier trailers if the total weight of vehicle and trailer isn't more than 3,500 kg. Physically disabled drivers with provisional category B entitlement will also have provisional entitlement to ride category A1 or A motor tricycles. Able-bodied drivers can no longer ride motor tricycles with a provisional category B licence",
                                            "categoryType": "Full",
                                            "fromDate": "1975-07-15",
                                            "expiryDate": "2021-12-07",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "01",
                                                    "restrictionLiteral": "Eyesight Correction"
                                                }
                                            ]
                                        }
                                    ],
                                    "token": {
                                        "issueNumber": "01",
                                        "validFromDate": "2018-10-11",
                                        "validToDate": "2021-12-07"
                                    },
                                    "holder": {
                                        "tachoCards": [
                                            {
                                                "cardNumber": "DB08311162038002",
                                                "cardStatus": "DISPATCHED",
                                                "cardExpiryDate": "2028-03-01",
                                                "cardStartOfValidityDate": "2023-03-02"
                                            }
                                        ]
                                    },
                                    "errors": [
                                        {
                                            "status": "503",
                                            "code": "ENQ068",
                                            "detail": "CPC data currently unavailable"
                                        }
                                    ]
                                }
                            },
                            "Full driving licence, CPC and tachograph (accept partial response, tachograph service unavailable)": {
                                "description": "Successful Response - Full driving licence, CPC and tachograph (accept partial response, tachograph service unavailable)",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "AFEBL412082FW9CT",
                                        "lastName": "AFEBL",
                                        "gender": "Male",
                                        "firstNames": "FOXBRJG WKVT O",
                                        "dateOfBirth": "1942-12-08",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "57 G TEST DATA DO NOT DELIVER",
                                                "line2": "RUMNEY",
                                                "line5": "CARDIFF",
                                                "postcode": "CF3 3LX"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "endorsements": [
                                        {
                                            "penaltyPoints": 3,
                                            "offenceCode": "SP30",
                                            "offenceLegalLiteral": "Exceeding statutory speed limit on a public road",
                                            "offenceDate": "2016-07-07",
                                            "penaltyPointsExpiryDate": "2019-07-07"
                                        }
                                    ],
                                    "entitlement": [
                                        {
                                            "categoryCode": "B",
                                            "categoryLegalLiteral": "Vehicles up to 3,500 kg Maximum Authorised Mass (MAM) with up to 8 passenger seats and driver (with a trailer up to 750 kg). Can also tow heavier trailers if the total weight of vehicle and trailer isn't more than 3,500 kg. Physically disabled drivers with provisional category B entitlement will also have provisional entitlement to ride category A1 or A motor tricycles. Able-bodied drivers can no longer ride motor tricycles with a provisional category B licence",
                                            "categoryType": "Full",
                                            "fromDate": "1975-07-15",
                                            "expiryDate": "2021-12-07",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "01",
                                                    "restrictionLiteral": "Eyesight Correction"
                                                }
                                            ]
                                        }
                                    ],
                                    "token": {
                                        "issueNumber": "01",
                                        "validFromDate": "2018-10-11",
                                        "validToDate": "2021-12-07"
                                    },
                                    "cpc": {
                                        "cpcs": [
                                            {
                                                "lgvValidTo": "2023-03-27",
                                                "pcvValidTo": "2022-06-09"
                                            }
                                        ]
                                    },
                                    "errors": [
                                        {
                                            "status": "503",
                                            "code": "ENQ069",
                                            "detail": "Tachograph data currently unavailable"
                                        }
                                    ]
                                }
                            },
                            "Full B valid and lapsed B auto": {
                                "description": "Successful Response - Full valid (unrestricted) B and Full lapsed B restricted to automatic transmission.",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "EXAMP000001LE1AA",
                                        "firstNames": "John",
                                        "lastName": "Smith",
                                        "gender": "Male",
                                        "dateOfBirth": "1985-01-01",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "1 EXAMPLE STREET",
                                                "line5": "ANYTOWN",
                                                "postcode": "AB1 2CD"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "B",
                                            "categoryLegalLiteral": "Vehicles up to 3,500 kg MAM with up to 8 passenger seats...",
                                            "categoryType": "Full",
                                            "fromDate": "2003-01-01",
                                            "expiryDate": "2035-12-31"
                                        },
                                        {
                                            "categoryCode": "B",
                                            "categoryLegalLiteral": "Vehicles up to 3,500 kg MAM with up to 8 passenger seats...",
                                            "categoryType": "Full",
                                            "fromDate": "2002-01-01",
                                            "expiryDate": "2012-12-31",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "78",
                                                    "restrictionLiteral": "Restricted to vehicles with automatic transmission"
                                                }
                                            ]
                                        }
                                    ],
                                    "endorsements": [],
                                    "token": {
                                        "validFromDate": "2023-01-01",
                                        "validToDate": "2033-12-31",
                                        "issueNumber": "10"
                                    }
                                }
                            },
                            "Prov D1 valid and Full D1 valid restricted": {
                                "description": "Successful Response - Provisional valid (unrestricted) D1 with expiry date the day before 45th birthday and Full valid D1 with restriction 101 and expiry date the day before 70th birthday.",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "EXAMP000002LE2BB",
                                        "firstNames": "John",
                                        "lastName": "Smith",
                                        "gender": "Female",
                                        "dateOfBirth": "1980-05-15",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "2 EXAMPLE ROAD",
                                                "line5": "ANYCITY",
                                                "postcode": "XY1 2ZA"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "D1",
                                            "categoryLegalLiteral": "Minibuses with no more than 16 passenger seats...",
                                            "categoryType": "Provisional",
                                            "fromDate": "2024-01-10",
                                            "expiryDate": "2025-05-14"
                                        },
                                        {
                                            "categoryCode": "D1",
                                            "categoryLegalLiteral": "Minibuses with no more than 16 passenger seats...",
                                            "categoryType": "Full",
                                            "fromDate": "2005-06-20",
                                            "expiryDate": "2050-05-14",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "101",
                                                    "restrictionLiteral": "Not for hire or reward"
                                                }
                                            ]
                                        }
                                    ],
                                    "endorsements": [],
                                    "token": {
                                        "validFromDate": "2024-01-10",
                                        "validToDate": "2034-01-09",
                                        "issueNumber": "05"
                                    }
                                }
                            },
                            "Prov D1E valid and Full D1E valid restricted": {
                                "description": "Successful Response - Provisional valid (unrestricted) D1E with expiry date the day before 45th birthday and Full valid D1E with restrictions 101 and 119 and expiry date the day before 70th birthday.",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "EXAMP000003LE3CC",
                                        "firstNames": "John",
                                        "lastName": "Smith",
                                        "gender": "Male",
                                        "dateOfBirth": "1980-05-15",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "3 EXAMPLE AVENUE",
                                                "line5": "ANYVILLAGE",
                                                "postcode": "BC2 3DE"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "D1E",
                                            "categoryLegalLiteral": "Minibuses with no more than 16 passenger seats with trailer...",
                                            "categoryType": "Provisional",
                                            "fromDate": "2024-02-15",
                                            "expiryDate": "2025-05-14"
                                        },
                                        {
                                            "categoryCode": "D1E",
                                            "categoryLegalLiteral": "Minibuses with no more than 16 passenger seats with trailer...",
                                            "categoryType": "Full",
                                            "fromDate": "2006-07-21",
                                            "expiryDate": "2050-05-14",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "101",
                                                    "restrictionLiteral": "Not for hire or reward"
                                                },
                                                {
                                                    "restrictionCode": "119",
                                                    "restrictionLiteral": "Weight limit does not apply"
                                                }
                                            ]
                                        }
                                    ],
                                    "endorsements": [],
                                    "token": {
                                        "validFromDate": "2024-02-15",
                                        "validToDate": "2034-02-14",
                                        "issueNumber": "08"
                                    }
                                }
                            },
                            "Full C1E valid and Full C1E valid restricted": {
                                "description": "Successful Response - Full valid (unrestricted) C1E with expiry date the day before 45th birthday and valid (full) C1E with restriction 107 expiry date the day before 70th birthday.",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "EXAMP000004LE4DD",
                                        "firstNames": "John",
                                        "lastName": "Smith",
                                        "gender": "Female",
                                        "dateOfBirth": "1980-05-15",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "4 EXAMPLE CLOSE",
                                                "line5": "ANYHAMLET",
                                                "postcode": "DE3 4FG"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "C1E",
                                            "categoryLegalLiteral": "Vehicles between 3,500 and 7,500kg MAM with trailer...",
                                            "categoryType": "Full",
                                            "fromDate": "2007-08-22",
                                            "expiryDate": "2025-05-14"
                                        },
                                        {
                                            "categoryCode": "C1E",
                                            "categoryLegalLiteral": "Vehicles between 3,500 and 7,500kg MAM with trailer...",
                                            "categoryType": "Full",
                                            "fromDate": "2007-08-22",
                                            "expiryDate": "2050-05-14",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "107",
                                                    "restrictionLiteral": "Not more than 8,250 kilograms"
                                                }
                                            ]
                                        }
                                    ],
                                    "endorsements": [],
                                    "token": {
                                        "validFromDate": "2023-08-22",
                                        "validToDate": "2033-08-21",
                                        "issueNumber": "12"
                                    }
                                }
                            },
                            "Full D auto valid and Prov D manual valid": {
                                "description": "Successful Response - Full valid restricted to automatic D with expiry day before driver’s 45th birthday and prov manual D with expiry day before 45th birthday.",
                                "value": {
                                    "driver": {
                                        "drivingLicenceNumber": "EXAMP000005LE5EE",
                                        "firstNames": "John",
                                        "lastName": "Smith",
                                        "gender": "Male",
                                        "dateOfBirth": "1980-05-15",
                                        "address": {
                                            "unstructuredAddress": {
                                                "line1": "5 EXAMPLE LANE",
                                                "line5": "ANYBOROUGH",
                                                "postcode": "FG4 5HI"
                                            }
                                        }
                                    },
                                    "licence": {
                                        "type": "Full",
                                        "status": "Valid"
                                    },
                                    "entitlement": [
                                        {
                                            "categoryCode": "D",
                                            "categoryLegalLiteral": "Buses with more than 8 passenger seats...",
                                            "categoryType": "Full",
                                            "fromDate": "2008-09-23",
                                            "expiryDate": "2025-05-14",
                                            "restrictions": [
                                                {
                                                    "restrictionCode": "78",
                                                    "restrictionLiteral": "Restricted to vehicles with automatic transmission"
                                                }
                                            ]
                                        },
                                        {
                                            "categoryCode": "D",
                                            "categoryLegalLiteral": "Buses with more than 8 passenger seats...",
                                            "categoryType": "Provisional",
                                            "fromDate": "2024-03-20",
                                            "expiryDate": "2025-05-14"
                                        }
                                    ],
                                    "endorsements": [],
                                    "token": {
                                        "validFromDate": "2024-03-20",
                                        "validToDate": "2034-03-19",
                                        "issueNumber": "03"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "400": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "Bad Request. The server could not understand the request due to invalid syntax.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "example": {
                            "errors": [
                                {
                                    "status": "400",
                                    "code": "BRQ001",
                                    "detail": "Bad request"
                                }
                            ]
                        }
                    }
                }
            },
            "401": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "Unauthorised.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "example": {
                            "errors": [
                                {
                                    "status": "401",
                                    "code": "Unauthorized",
                                    "detail": "API Key or JWT is either not provided, expired or invalid"
                                }
                            ]
                        }
                    }
                }
            },
            "403": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "Forbidden. No access to the requested resource.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "example": {
                            "errors": [
                                {
                                    "status": "403",
                                    "code": "Forbidden",
                                    "detail": "Access Denied"
                                }
                            ]
                        }
                    }
                }
            },
            "404": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "Record for supplied driving licence number cannot be found.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "examples": {
                            "Driving licence not found": {
                                "description": "404 Response - Record for supplied driving licence number cannot be found.",
                                "value": {
                                    "errors": [
                                        {
                                            "status": "404",
                                            "code": "ENQ018",
                                            "detail": "For the given drivingLicenceNumber field, no driver record could be found"
                                        }
                                    ]
                                }
                            },
                            "Driving licence record unavailable - suppressed": {
                                "description": "404 Response - suppressed record",
                                "value": {
                                    "errors": [
                                        {
                                            "status": "404",
                                            "code": "ENQ037",
                                            "detail": "Record for supplied driving licence number not available for enquiry via this service"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "429": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "Too many requests in a given period of time.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "example": {
                            "errors": [
                                {
                                    "status": "429",
                                    "code": "Throttled",
                                    "detail": "Too many requests"
                                }
                            ]
                        }
                    }
                }
            },
            "500": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "The service encountered an unspecified error.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "example": {
                            "errors": [
                                {
                                    "status": "500",
                                    "code": "ENQ000",
                                    "detail": "System error occurred"
                                }
                            ]
                        }
                    }
                }
            },
            "502": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "The service encountered an unspecified error.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "example": {
                            "errors": [
                                {
                                    "status": "502",
                                    "code": "ENQ000",
                                    "detail": "System error occurred"
                                }
                            ]
                        }
                    }
                }
            },
            "503": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "The service encountered an unspecified error.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "examples": {
                            "CPC and tachograph data unavailable and partial response not acceptable to consumer": {
                                "description": "503 Response - CPC and tachograph data unavailable and partial response not acceptable to consumer.",
                                "value": {
                                    "errors": [
                                        {
                                            "code": "ENQ068",
                                            "detail": "CPC data currently unavailable",
                                            "status": "503"
                                        },
                                        {
                                            "code": "ENQ069",
                                            "detail": "Tachograph data currently unavailable",
                                            "status": "503"
                                        }
                                    ]
                                }
                            },
                            "CPC data unavailable and partial response not acceptable to consumer": {
                                "description": "503 Response - CPC data unavailable and partial response not acceptable to consumer.",
                                "value": {
                                    "errors": [
                                        {
                                            "code": "ENQ068",
                                            "detail": "CPC data currently unavailable",
                                            "status": "503"
                                        }
                                    ]
                                }
                            },
                            "Tachograph data unavailable and partial response not acceptable to consumer": {
                                "description": "503 Response - Tachograph data unavailable and partial response not acceptable to consumer.",
                                "value": {
                                    "errors": [
                                        {
                                            "code": "ENQ069",
                                            "detail": "Tachograph data currently unavailable",
                                            "status": "503"
                                        }
                                    ]
                                }
                            },
                            "Service is down for maintenance": {
                                "description": "Service is down for maintenance",
                                "value": {
                                    "errors": [
                                        {
                                            "status": "503",
                                            "title": "System currently down for maintenance",
                                            "detail": "The service is currently down for maintenance, please contact support for more information"
                                        }
                                    ]
                                }
                            }
                        }
                    }
                }
            },
            "504": {
                "headers": {
                    "X-DVLA-Request-Id": {
                        "$ref": "#/components/headers/dvlaRequestId"
                    }
                },
                "description": "The service encountered an unspecified network error.",
                "content": {
                    "application/json": {
                        "schema": {
                            "$ref": "#/components/schemas/errorResponse"
                        },
                        "example": {
                            "errors": [
                                {
                                    "status": "504",
                                    "code": "ENQ000",
                                    "detail": "Gateway Timeout"
                                }
                            ]
                        }
                    }
                }
            }
        },
        "schemas": {
            "drivingLicenceRequest": {
                "type": "object",
                "additionalProperties": false,
                "required": ["drivingLicenceNumber"],
                "properties": {
                    "drivingLicenceNumber": {
                        "$ref": "#/components/schemas/drivingLicenceNumber"
                    },
                    "includeCPC": {
                        "$ref": "#/components/schemas/includeCPC"
                    },
                    "includeTacho": {
                        "$ref": "#/components/schemas/includeTacho"
                    },
                    "acceptPartialResponse": {
                        "$ref": "#/components/schemas/acceptPartialResponse"
                    }
                }
            },
            "viewDriverResponse": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "driver": {
                        "$ref": "#/components/schemas/driver"
                    },
                    "licence": {
                        "$ref": "#/components/schemas/licence"
                    },
                    "entitlement": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/entitlementRecord"
                        }
                    },
                    "endorsements": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/endorsements"
                        }
                    },
                    "testPass": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/testPass"
                        }
                    },
                    "token": {
                        "$ref": "#/components/schemas/token"
                    },
                    "cpc": {
                        "$ref": "#/components/schemas/cpcResponse"
                    },
                    "holder": {
                        "$ref": "#/components/schemas/holder"
                    },
                    "errors": {
                        "$ref": "#/components/schemas/errors"
                    }
                }
            },
            "drivingLicenceNumber": {
                "type": "string",
                "maxLength": 16,
                "minLength": 5,
                "pattern": "^[a-zA-Z0-9]*$",
                "example": "ABCDE123456AB1AB",
                "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."
            },
            "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'."
            },
            "driver": {
                "type": "object",
                "additionalProperties": false,
                "description": "Driver details for a given driving licence number",
                "required": ["drivingLicenceNumber"],
                "properties": {
                    "drivingLicenceNumber": {
                        "$ref": "#/components/schemas/drivingLicenceNumber"
                    },
                    "firstNames": {
                        "$ref": "#/components/schemas/firstNames"
                    },
                    "lastName": {
                        "$ref": "#/components/schemas/lastName"
                    },
                    "gender": {
                        "$ref": "#/components/schemas/gender"
                    },
                    "dateOfBirth": {
                        "$ref": "#/components/schemas/date"
                    },
                    "address": {
                        "$ref": "#/components/schemas/address"
                    },
                    "disqualifiedUntil": {
                        "$ref": "#/components/schemas/date"
                    },
                    "disqualifiedForLife": {
                        "type": "boolean",
                        "description": "If present, will only be true and replaces disqualifiedUntil"
                    },
                    "disqualifiedPendingSentence": {
                        "type": "boolean",
                        "description": "If present, will only be true and replaces disqualifiedUntil"
                    }
                }
            },
            "licence": {
                "type": "object",
                "additionalProperties": false,
                "description": "Details of a drivers licence information",
                "required": ["type", "status"],
                "properties": {
                    "type": {
                        "$ref": "#/components/schemas/licenceType"
                    },
                    "status": {
                        "$ref": "#/components/schemas/licenceStatus"
                    },
                    "statusQualifier": {
                        "$ref": "#/components/schemas/statusQualifier"
                    }
                }
            },
            "entitlementRecord": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "categoryCode": {
                        "$ref": "#/components/schemas/categoryCode"
                    },
                    "categoryLegalLiteral": {
                        "$ref": "#/components/schemas/categoryLegalLiteral"
                    },
                    "categoryType": {
                        "$ref": "#/components/schemas/categoryType"
                    },
                    "fromDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "expiryDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "restrictions": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "additionalProperties": false,
                            "required": ["restrictionCode"],
                            "properties": {
                                "restrictionCode": {
                                    "$ref": "#/components/schemas/restrictionCode"
                                },
                                "restrictionLiteral": {
                                    "type": "string",
                                    "example": "Eyesight Correction"
                                }
                            }
                        }
                    }
                }
            },
            "endorsements": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "disqualification": {
                        "$ref": "#/components/schemas/disqualification"
                    },
                    "offenceCode": {
                        "$ref": "#/components/schemas/offenceCode"
                    },
                    "offenceLegalLiteral": {
                        "type": "string"
                    },
                    "offenceDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "convictionDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "disqualificationRemovalDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "disqualificationReimposedDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "disqualificationSuspendedPendingAppealDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "sentenceDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "disqualifiedPendingSentence": {
                        "type": "boolean",
                        "deprecated": true,
                        "description": "DEPRECATED - use 'disqualification.disqualifiedPendingSentence' instead"
                    },
                    "penaltyPoints": {
                        "type": "integer"
                    },
                    "penaltyPointsExpiryDate": {
                        "$ref": "#/components/schemas/date"
                    }
                }
            },
            "testPass": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "categoryCode": {
                        "type": "string"
                    },
                    "categoryLegalLiteral": {
                        "type": "string"
                    },
                    "testDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "status": {
                        "type": "string"
                    },
                    "withAutomaticTransmission": {
                        "type": "boolean"
                    }
                }
            },
            "token": {
                "type": "object",
                "additionalProperties": false,
                "description": "The driving licence details as on the physical driving licence",
                "properties": {
                    "validFromDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "validToDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "issueNumber": {
                        "type": "string"
                    }
                }
            },
            "cpcResponse": {
                "type": "object",
                "additionalProperties": false,
                "description": "An array of current CPC qualifications where a driver has a valid DQC card",
                "properties": {
                    "cpcs": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/cpc"
                        }
                    }
                }
            },
            "cpc": {
                "type": "object",
                "additionalProperties": false,
                "description": "Information from the CPC qualification",
                "properties": {
                    "lgvValidTo": {
                        "$ref": "#/components/schemas/date"
                    },
                    "pcvValidTo": {
                        "$ref": "#/components/schemas/date"
                    },
                    "national": {
                        "$ref": "#/components/schemas/national"
                    }
                }
            },
            "holder": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "tachoCards": {
                        "type": "array",
                        "items": {
                            "$ref": "#/components/schemas/tachoCard"
                        }
                    }
                }
            },
            "tachoCard": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "cardNumber": {
                        "type": "string"
                    },
                    "cardStatus": {
                        "description": "The current state of the card",
                        "type": "string"
                    },
                    "cardExpiryDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "cardStartOfValidityDate": {
                        "$ref": "#/components/schemas/date"
                    }
                }
            },
            "firstNames": {
                "type": "string",
                "example": "JOHN",
                "description": "First name(s) of a driver"
            },
            "lastName": {
                "type": "string",
                "example": "DOE",
                "description": "Last name of a driver"
            },
            "gender": {
                "type": "string",
                "enum": ["Male", "Female"]
            },
            "date": {
                "type": "string",
                "format": "date",
                "description": "Date in the format YYYY-MM-DD",
                "example": "2019-12-31"
            },
            "address": {
                "type": "object",
                "additionalProperties": false,
                "description": "Address in a unstructured format",
                "properties": {
                    "unstructuredAddress": {
                        "$ref": "#/components/schemas/unstructuredAddress"
                    }
                }
            },
            "unstructuredAddress": {
                "type": "object",
                "additionalProperties": false,
                "description": "Unstructured address",
                "properties": {
                    "line1": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 45,
                        "example": "5 HIGH STREET"
                    },
                    "line2": {
                        "type": "string",
                        "minLength": 0,
                        "maxLength": 45,
                        "example": "GARNET"
                    },
                    "line3": {
                        "type": "string",
                        "minLength": 0,
                        "maxLength": 45,
                        "example": "AMMANFORD"
                    },
                    "line4": {
                        "type": "string",
                        "minLength": 0,
                        "maxLength": 45,
                        "example": "CARMARTHENSHIRE"
                    },
                    "line5": {
                        "type": "string",
                        "minLength": 0,
                        "maxLength": 45,
                        "example": "WALES"
                    },
                    "postcode": {
                        "type": "string",
                        "example": "SA18 1AB"
                    }
                }
            },
            "licenceType": {
                "type": "string",
                "enum": ["Provisional", "Full"],
                "description": "The type of licence"
            },
            "licenceStatus": {
                "type": "string",
                "enum": ["Valid", "Disqualified", "Revoked", "Surrendered", "Expired", "Exchanged", "Refused"],
                "description": "The current activation state of the licence"
            },
            "statusQualifier": {
                "type": "string",
                "description": "Information or restrictions relating to the status of a licence",
                "enum": [
                    "For re-assessment only",
                    "Photo licence invitation sent",
                    "Short period disqualification",
                    "Until test passed",
                    "Until extended test passed",
                    "Pending sentence",
                    "For life"
                ]
            },
            "categoryCode": {
                "type": "string",
                "example": "A1",
                "description": "Licence category code"
            },
            "categoryLegalLiteral": {
                "type": "string",
                "example": "Motorbikes with engine size up to 125 cc, power output up to 11 kW and power/weight ratio up to 0.1 kW/kg",
                "description": "Directive indicator 4 (3rd directive categories) legal literal"
            },
            "categoryType": {
                "type": "string",
                "enum": ["Provisional", "Full"]
            },
            "restrictionCode": {
                "type": "string",
                "description": "Restriction code",
                "example": "01"
            },
            "national": {
                "type": "boolean",
                "description": "Marker designating the record as National type."
            },
            "disqualification": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "type": {
                        "$ref": "#/components/schemas/disqualificationType"
                    },
                    "forLife": {
                        "type": "boolean"
                    },
                    "years": {
                        "$ref": "#/components/schemas/years"
                    },
                    "months": {
                        "$ref": "#/components/schemas/months"
                    },
                    "days": {
                        "$ref": "#/components/schemas/days"
                    },
                    "startDate": {
                        "$ref": "#/components/schemas/date"
                    },
                    "disqualifiedPendingSentence": { "type": "boolean" }
                }
            },
            "disqualificationType": {
                "type": "string",
                "description": "Type of disqualification",
                "enum": [
                    "Disqualified until Test Pass",
                    "Disqualified until Extended Test Pass",
                    "Revoked until Test Pass",
                    "Revoked test passed",
                    "Extended test passed",
                    "Test passed"
                ]
            },
            "years": {
                "type": "integer",
                "example": 3,
                "description": "Number of years"
            },
            "months": {
                "type": "integer",
                "example": 1,
                "description": "Number of months"
            },
            "days": {
                "type": "integer",
                "example": 1,
                "description": "Number of days"
            },
            "offenceCode": {
                "type": "string",
                "example": "DD30",
                "description": "The code of the offence causing the endorsement"
            },
            "errorResponse": {
                "type": "object",
                "additionalProperties": false,
                "description": "List of error responses",
                "properties": {
                    "errors": {
                        "$ref": "#/components/schemas/errors"
                    }
                }
            },
            "errors": {
                "type": "array",
                "additionalProperties": false,
                "items": {
                    "$ref": "#/components/schemas/error"
                }
            },
            "error": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "status": {
                        "type": "string",
                        "description": "HTTP status code"
                    },
                    "title": {
                        "type": "string",
                        "deprecated": true,
                        "description": "DEPRECATED - A short description of the error"
                    },
                    "code": {
                        "type": "string",
                        "description": "DVLA reference code"
                    },
                    "detail": {
                        "type": "string",
                        "description": "A meaningful description of the error which has occurred"
                    }
                }
            }
        }
    }
}