Driving Licence Classes API
The 15 driving-licence classes of the 2024 Road Traffic Safety Law: class needed for a vehicle, old B2 / C / D / E conversion, expiry and re-tests.
Rules of the Law on Road Traffic Order and Safety 36/2024/QH15 (in force 1/1/2025): Article 57 (classes A1, A, B1, B, C1, C, D1, D2, D, BE, C1E, CE, D1E, D2E, DE and their validity), Article 59 (minimum age 18 / 21 / 24 / 27, age limit 57 men / 55 women for buses over 29 seats) and Article 89 (licences issued before 2025: continued use and exchange — A1 → A restricted under 175 cm³, B1 / B2 → B or C1, D → D2, E → D, FC → CE…).
Modes: vehicle (motorcycle with cc / kw, car / bus with seats excluding the driver, truck / special with gvw design gross weight, trailer_kg, tractor_unit, articulated_bus, moped) returns the minimum class; class returns what it allows; class + vehicle checks if the licence covers the vehicle; class + issued (+ birth, sex) computes the expiry and what a renewal needs today: no test if expired under 30 days, theory test from 30 days to under 1 year, theory and practical tests from 1 year (Circular 108/2026/TT-BCA, in force 1/7/2026).
Old classes are recognised (old=1 for A1 / B1 / C / D issued before 2025, or an issued date before 2025); their printed expiry date prevails. No personal licence is looked up.
Markdown · OpenAPI · Postman · llms.txt
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
class | query | string | no | Licence class (new: A1…DE; old: A1, A2, A3, A4, B1, B1-AT, B2, C, D, E, FB2, FC, FD, FE). | |
old | query | boolean | no | Treat A1 / B1 / C / D as an old (pre-2025) class. | |
issued | query | string | no | Issue date (YYYY-MM-DD) for the expiry. | |
birth | query | string | no | Date of birth (age checks, old B1 expiry). | |
sex | query | string | no | male / female (age limits). | |
vehicle | query | string | no | moped, motorcycle, tricycle, car, bus, sleeper_bus, truck, special, tractor_unit, articulated_bus. | |
cc | query | number | no | Engine capacity, cm³ (motorcycles). | |
kw | query | number | no | Electric motor power, kW. | |
seats | query | number | no | Passenger seats, not counting the driver. | |
gvw | query | number | no | Design gross vehicle weight, kg. | |
trailer_kg | query | number | no | Trailer design gross weight, kg. | |
date | query | string | no | Reference date (default today). |
Example
curl "https://apibox.io.vn/v1/vn-license-class?class=B2&issued=2016-05-10&vehicle=truck&gvw=5000&date=2026-11-11" \
-H "Authorization: Bearer YOUR_API_KEY"const res = await fetch('https://apibox.io.vn/v1/vn-license-class?class=B2&issued=2016-05-10&vehicle=truck&gvw=5000&date=2026-11-11', {
method: 'GET',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
},
});
const data = await res.json();
console.log(data);import requests
res = requests.get(
"https://apibox.io.vn/v1/vn-license-class?class=B2&issued=2016-05-10&vehicle=truck&gvw=5000&date=2026-11-11",
headers={"Authorization": "Bearer YOUR_API_KEY"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-license-class?class=B2&issued=2016-05-10&vehicle=truck&gvw=5000&date=2026-11-11');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"class": "B2",
"system": "old (issued before 1/1/2025)",
"use_en": "Cars up to 8 seats; trucks and tractors under 3,500 kg (professional drivers)",
"use_vi": "Ô tô chở người đến 08 chỗ; ô tô tải, máy kéo dưới 3.500 kg (người hành nghề lái xe)",
"may_drive_new_classes": [
"B"
],
"exchange_to": [
"B",
"C1"
],
"exchange_note_en": "Plus a special-purpose machinery certificate for tractors up to 3,500 kg",
"exchange_note_vi": "Kèm chứng chỉ điều khiển xe máy chuyên dùng cho máy kéo đến 3.500 kg",
"exchange_required": false,
"exchange_note": "Exchange is optional: an old licence keeps being used until its printed expiry (Điều 89 khoản 1, 2).",
"legal_ref": "Điều 89 khoản 2 điểm g, khoản 3 điểm e",
"validity": {
"as_of": "2026-11-11",
"expires": "2026-05-10",
"expired": true,
"days_overdue": 185,
"days_left": 0,
"retest_if_renewed_now": "theory",
"retest_en": "Re-take the theory test (expired 30 days to under 1 year)",
"retest_vi": "Sát hạch lại lý thuyết (quá hạn từ 30 ngày đến dưới 1 năm)",
"basis": "Old rules: 10 years from issue (TT 12/2017/TT-BGTVT Điều 17)",
"note": "Licences issued before 1/1/2025 stay valid until the date printed on them (Điều 89 khoản 1); the printed date prevails over this estimate."
},
"check": {
"vehicle": "truck",
"required_class": "C1",
"allowed": false,
"reasoning": [
"Gross vehicle weight 5,000 kg → C1"
],
"expired": true
},
"legal": [
{
"ref": "Luật Trật tự, an toàn giao thông đường bộ số 36/2024/QH15, Điều 57, 59, 89",
"effective_from": "2025-01-01",
"url": "https://vanban.chinhphu.vn/?pageid=27160&docid=210986"
}
],
"disclaimer": "Reference only, not legal advice; check the official text and the licensing authority.",
"disclaimer_vi": "Thông tin tham khảo, không phải tư vấn pháp lý; hãy đối chiếu văn bản chính thức và cơ quan cấp GPLX.",
"reviewed": "2026-11-11"
}
Use cases
- Check that a driver's licence class covers the truck or bus they will drive
- Tell renters which licence a motorbike or 16-seat van needs
- Remind drivers before their licence expires and say if a re-test is needed
- Explain how an old B2 or E licence converts to the new classes
FAQ
Do I have to exchange my old B2 licence?
No. Licences issued before 1/1/2025 stay valid until the printed expiry date; when exchanged, B2 becomes B or C1 (Article 89).
My licence expired 2 months ago – do I re-take the test?
From 30 days to under 1 year after expiry you re-take the theory test; from 1 year, theory and practical tests; under 30 days, no test.
Which class do I need for a 7-seat car with a 1-tonne trailer?
BE: class B vehicles towing a trailer over 750 kg.
Related APIs
JSON Validator
Check JSON syntax with exact line and column of errors, and validate data against a JSON Schema (draft 4, 7, 2019-09 or 2020-12).
{ }JSON Formatter
Pretty print JSON with 0-8 spaces or tabs, minify it, or sort object keys recursively. Syntax errors are reported with line and column.
CSVCSV to JSON
Convert CSV into an array of JSON objects using the header row, with delimiter auto-detection, number and boolean typing, and row-level errors.