Time-Clock Log to Timesheet Online
Turn time-clock exports into a timesheet: worked hours and units per day, late / early minutes, missing punches, OT by day type and night hours (22h-6h).
Result
Press “Run” to see the result.
Send the punches exported from a time clock (ZKTeco, Ronald Jack, Wise Eye… as CSV, or JSON) and your shifts. Columns are detected from usual headers (AC-No., Mã NV, Name, Họ tên, Time, Thời gian, Ngày + Giờ, several times in one cell) or set with columns; dates are read as dd/mm/yyyy unless date_format=mdy / ymd. Shifts have a start, an end (a night shift ending the next morning is fine), a break and grace minutes for late arrival and early leave.
Each employee-day gets the shift whose start is nearest the first punch, first in and last out, late and early-leave minutes, worked minutes without the break and work units (công), a missing punch flag, overtime after the shift (from ot_min_minutes, optionally rounded), and night minutes between 22:00 and 06:00 (Labour Code 2019, Điều 106). On weekly rest days (rest_days, Sunday by default) and public holidays (computed by /v1/vn-holidays, or your own holidays) all time worked is overtime of that type.
The summary per employee gives days and units, hours, late / early counts, missing punches, absent workdays, overtime split into workday / rest day / holiday (paid at least 150% / 200% / 300%, Điều 98) and night overtime, with a warning above 40 hours of overtime in a month (Điều 107). Pay rates are not applied, so the result feeds any payroll.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/vn-timesheet" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"csv":"AC-No.,Name,Time\n1,Nguyễn An,02/11/2026 07:58\n1,Nguyễn An,02/11/2026 17:45\n1,Nguyễn An,03/11/2026 08:12\n1,Nguyễn An,03/11/2026 16:50\n1,Nguyễn An,08/11/2026 08:00\n1,Nguyễn An,08/11/2026 12:00","from":"2026-11-02","to":"2026-11-08"}'const res = await fetch('https://apibox.io.vn/v1/vn-timesheet', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"csv": "AC-No.,Name,Time\n1,Nguyễn An,02/11/2026 07:58\n1,Nguyễn An,02/11/2026 17:45\n1,Nguyễn An,03/11/2026 08:12\n1,Nguyễn An,03/11/2026 16:50\n1,Nguyễn An,08/11/2026 08:00\n1,Nguyễn An,08/11/2026 12:00",
"from": "2026-11-02",
"to": "2026-11-08"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/vn-timesheet",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"csv": "AC-No.,Name,Time\n1,Nguyễn An,02/11/2026 07:58\n1,Nguyễn An,02/11/2026 17:45\n1,Nguyễn An,03/11/2026 08:12\n1,Nguyễn An,03/11/2026 16:50\n1,Nguyễn An,08/11/2026 08:00\n1,Nguyễn An,08/11/2026 12:00", "from": "2026-11-02", "to": "2026-11-08"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/vn-timesheet');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"csv":"AC-No.,Name,Time\\n1,Nguyễn An,02/11/2026 07:58\\n1,Nguyễn An,02/11/2026 17:45\\n1,Nguyễn An,03/11/2026 08:12\\n1,Nguyễn An,03/11/2026 16:50\\n1,Nguyễn An,08/11/2026 08:00\\n1,Nguyễn An,08/11/2026 12:00","from":"2026-11-02","to":"2026-11-08"}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Which time clocks are supported?
Any export that has an employee column and date-time (or date + time) columns: ZKTeco, Ronald Jack, Wise Eye, Hikvision CSV… Excel files must be saved as CSV first (or converted with /v1/xlsx-convert).
How are night shifts handled?
A shift such as 22:00–06:00 belongs to the day it starts; punches up to the shift end plus ot_window_hours (8 h) belong to it.
Are holidays counted automatically?
Yes, Vietnamese public holidays come from /v1/vn-holidays (official schedules where announced). Pass holidays with your company’s dates, or none.