Checks

Driving licence

POST https://checksharecode.co.uk/api/check/driving-licence checks a UK driving licence on DVLA's Check a driving licence service, with the check code the driver makes at gov.uk/view-driving-licence. Everything you send to this endpoint is here, and only that. A live check usually takes 5 to 15 seconds. A code works once, so the async endpoint is the safer choice: its result is kept for 7 days.

What you send

Authorizationstringheaderrequired
Bearer followed by your key. rtw_test_… keys return sandbox data. rtw_live_… keys run a real check.
Example: Bearer rtw_live_…
licence_numberstringrequired
The driving licence number: all 16 characters, e.g. MORGA753116SM9IJ, or just the last 8, e.g. 116SM9IJ. Leave off the 2-digit issue number printed after it on the photocard. DVLA is only sent the last 8.
Example: MORGA753116SM9IJ
check_codestringrequired
The 8-character code the driver creates at gov.uk/view-driving-licence, e.g. Hb Rh fp 7g. Case matters; spaces are fine. It lasts 21 days and works once.
Example: Hb Rh fp 7g

DVLA shows the driver’s record rather than a yes or no, so outcome is always ACCEPTED and the answer is in driving_status, points, automatic_only, entitlements and flags; see the fields. Only the last 8 characters of the licence number go to DVLA. Don’t send share_code, date_of_birth, company_name or the other share code fields: they are refused here with 400 INVALID_INPUT. You don’t need check either. If you send it, it must be driving_licence.

Save the PDF if you need a record of the check. DVLA does not accept a printout as proof of what someone can drive, so it is your audit record, not their licence.

curl https://checksharecode.co.uk/api/check/driving-licence \
  -H "authorization: Bearer $CHECKSHARECODE_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "licence_number": "MORGA753116SM9IJ",
    "check_code": "Hb Rh fp 7g"
  }'
200 OK
{
  "outcome": "ACCEPTED",
  "title": "Driving licence",
  "name": "MISS JANE EXAMPLE DOE",
  "driving_status": "Current full licence",
  "licence_number_last8": "192GT2BD",
  "issue_number": "12",
  "licence_valid_from": "2018-08-05",
  "licence_valid_to": "2028-08-04",
  "offences": 1,
  "points": 3,
  "has_penalties": true,
  "automatic_only": true,
  "entitlements": [
    {
      "category": "B",
      "kind": "full",
      "valid_from": "2009-07-20",
      "valid_to": "2060-01-01",
      "automatic_only": true,
      "restrictions": [
        {
          "code": "78",
          "text": "Restricted to vehicles with automatic transmission"
        }
      ],
      "description": "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)."
    },
    {
      "category": "AM",
      "kind": "full",
      "valid_from": "2009-07-20",
      "valid_to": "2060-01-01",
      "automatic_only": false,
      "restrictions": [
        {
          "code": "122",
          "text": "Valid on successful completion of Basic Moped Training Course (CBT)"
        }
      ],
      "description": "2-wheel vehicles or 3-wheel vehicles with a maximum design speed of over 25km/h and not more than 45km/h."
    },
    {
      "category": "A",
      "kind": "provisional",
      "valid_from": "2007-01-01",
      "valid_to": "2060-01-01",
      "automatic_only": false,
      "restrictions": [],
      "description": "A motorcycle of a power exceeding 35 kW or with a power to weight ratio exceeding 0.2 kW per kg."
    }
  ],
  "flags": [],
  "viewed_at": "2026-10-01T09:45:00+01:00",
  "pdf_data_url": "data:application/pdf;base64,JVBERi0…",
  "checked_at": "2026-10-01T08:45:03.000Z"
}

A check code works once

The driver makes the code at gov.uk/view-driving-licence. It is 8 letters and digits, shown in pairs like Hb Rh fp 7g, and case matters. It lasts 21 days, and DVLA lets it be used once.

  • Sent twice? If your account sends the same licence number and code again within 21 days, we refuse it with 409 CHECK_CODE_ALREADY_USED before it reaches DVLA, and it is not charged. first_check names the earlier check.
  • Every error from the check says whether the code was used. check_code_used is false when DVLA never saw the code: send the same code again. When it is true or "unknown", ask the driver for a new code. 401, 402 and 429 come before the check, so the code is never sent.
  • Refused? 422 CHECK_CODE_UNUSABLE means DVLA did not accept the licence number and code, and does not say why. It uses 2 checks, like a record DVLA shows.
  • Keep the result. DVLA shows the record once for each code. An asynchronous check keeps it for you for 7 days, so a dropped connection never loses it.

Try it

Sign up to try it with your sandbox key. It sends this request from the page and shows the answer, free, with test data.Log in

The same for every check

These are written once, for this endpoint, right to work, right to rent and immigration status alike.