Vietnam Driver Hours Checker API
Check a driving log against Vietnam’s 4-hour continuous driving rule, rest stops, daily / weekly limits and NĐ 168/2024 fines, or plan driver changes.
Send a driving log as log (intervals { start, end, status, driver } or events { time, status }), or as CSV (csv or a text body with start,end,status / time,status columns, e.g. exported from a journey-monitoring device). Times are Vietnam local time. The answer lists, per driver, every continuous-driving period, daily and weekly totals and each violation with the minute it started and the excess.
Rules by date: until 30/6/2026 the Road Traffic Order and Safety Law 36/2024 article 64 caps driving at 10 h a day, 48 h a week and 4 h continuous. From 1/7/2026 (Law 118/2025) only the 4-hour continuous limit stays in the traffic law; daily / weekly working time follows the Labour Code, checked here as driving + other work (12 h a day incl. overtime, 48 h a week; both overridable). A stop of at least 15 minutes (5 minutes for intra-provincial buses and taxis) resets the continuous counter, per service. Fines of Decree 168/2024: driver 3–5 million VND and 2 licence points, owner 4–6 million (individual) or 8–12 million (organisation).
action=plan with trip_hours (and optional start, drivers) returns how many drivers a trip needs and a schedule of driving blocks and stops. The log is processed in memory only; use pseudonymous driver ids. Reference only, not legal advice.
Markdown · OpenAPI · Postman · llms.txt
Parameters
| Name | In | Type | Required | Default | |
|---|---|---|---|---|---|
log | body | array | no | Intervals [{start, end, status: driving|work|rest, driver}] or events [{time, status, driver}] (Vietnam time, YYYY-MM-DDTHH:MM). | |
csv | body | string | no | The same log as CSV (start,end,status[,driver] or time,status[,driver]); a text/csv body also works. | |
service | body|query | string | no | cargo | fixed_route, contract, tourist, bus_interprovince, bus_intraprovince, taxi, cargo, internal_cargo, internal_passenger. |
action | body|query | string | no | check | check (log) or plan (trip). |
trip_hours | body|query | number | no | plan: total driving hours of the trip. | |
start | body|query | string | no | plan: departure (YYYY-MM-DDTHH:MM). | |
drivers | body|query | number | no | plan: number of drivers available. | |
min_rest_min | body|query | number | no | Override the minimum stop (minutes). | |
work_day_cap_h | body|query | number | no | 12 | From 1/7/2026: daily working-time cap (Labour Code). |
work_week_cap_h | body|query | number | no | 48 | From 1/7/2026: weekly working-time cap. |
Example
curl -X POST "https://apibox.io.vn/v1/vn-driver-hours" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"service":"cargo","log":[{"start":"2026-08-03T05:00","end":"2026-08-03T09:20","status":"driving","driver":"D1"},{"start":"2026-08-03T09:20","end":"2026-08-03T09:40","status":"rest","driver":"D1"},{"start":"2026-08-03T09:40","end":"2026-08-03T12:00","status":"driving","driver":"D1"}]}'const res = await fetch('https://apibox.io.vn/v1/vn-driver-hours', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"service": "cargo",
"log": [
{
"start": "2026-08-03T05:00",
"end": "2026-08-03T09:20",
"status": "driving",
"driver": "D1"
},
{
"start": "2026-08-03T09:20",
"end": "2026-08-03T09:40",
"status": "rest",
"driver": "D1"
},
{
"start": "2026-08-03T09:40",
"end": "2026-08-03T12:00",
"status": "driving",
"driver": "D1"
}
]
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/vn-driver-hours",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"service": "cargo", "log": [{"start": "2026-08-03T05:00", "end": "2026-08-03T09:20", "status": "driving", "driver": "D1"}, {"start": "2026-08-03T09:20", "end": "2026-08-03T09:40", "status": "rest", "driver": "D1"}, {"start": "2026-08-03T09:40", "end": "2026-08-03T12:00", "status": "driving", "driver": "D1"}]},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-driver-hours');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"service":"cargo","log":[{"start":"2026-08-03T05:00","end":"2026-08-03T09:20","status":"driving","driver":"D1"},{"start":"2026-08-03T09:20","end":"2026-08-03T09:40","status":"rest","driver":"D1"},{"start":"2026-08-03T09:40","end":"2026-08-03T12:00","status":"driving","driver":"D1"}]}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));Response
{
"action": "check",
"period": {
"from": "2026-08-03",
"to": "2026-08-03"
},
"regimes": [
"law118"
],
"compliant": false,
"service": "cargo",
"min_rest_min": 15,
"drivers": [
{
"driver": "D1",
"totals": {
"driving_min": 400,
"driving": "6h40",
"longest_continuous_min": 260,
"longest_continuous": "4h20"
},
"violations": [
{
"type": "continuous_driving",
"rule": "continuous_4h",
"at": "2026-08-03T09:00",
"period_start": "2026-08-03T05:00",
"limit_min": 240,
"vi": "Lái xe liên tục quá 4 giờ mà không dừng nghỉ đủ 15 phút",
"en": "Continuous driving over 4 h without a stop of at least 15 min",
"fine": true,
"driving_min": 260,
"excess_min": 20
}
],
"compliant": false,
"fine_estimate": {
"per_violation_driver_vnd": {
"min": 3000000,
"max": 5000000
},
"licence_points": 2,
"owner_individual_vnd": {
"min": 4000000,
"max": 6000000
},
"owner_organisation_vnd": {
"min": 8000000,
"max": 12000000
},
"note": "One decision may cover several violations; the amount within the range is set by the officer. Labour Code working-time checks are not traffic fines."
}
}
]
}
Use cases
- Audit journey-monitoring data before a police or inspector check
- Plan driver changes for an overnight coach trip
- Add a driving-time report to a fleet-management dashboard
- Explain to drivers which stop was too short
FAQ
Is the 10-hour daily limit still in force?
Not in the traffic law from 1/7/2026: Law 118/2025 keeps only the 4-hour continuous limit and refers daily / weekly time to the Labour Code. Logs before that date are checked against 10 h / 48 h.
How long must the break be?
At least 15 minutes after 4 hours of continuous driving (fixed-route, contract, tourist, cargo, inter-provincial bus) or 5 minutes for intra-provincial buses and taxis; shorter stops do not reset the counter.
Does traffic-jam time count?
Only time with the vehicle moving counts as driving under the calculation method; mark standing time as rest or work in your log.
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.