curl --request GET \
--url https://api.example.com/api/v1/attendances/today \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "<string>",
"check_in": "<string>",
"check_out": "<string>",
"lunch_start": "<string>",
"lunch_end": "<string>"
}
'{
"status": 123,
"data": {}
}Track employee attendance with check-in, check-out, and lunch break recording
curl --request GET \
--url https://api.example.com/api/v1/attendances/today \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"employee_id": "<string>",
"check_in": "<string>",
"check_out": "<string>",
"lunch_start": "<string>",
"lunch_end": "<string>"
}
'{
"status": 123,
"data": {}
}2026-02-23T09:05:30-06:00) and normalized to UTC by the server.GET /api/v1/attendances/today
1Show Employee-Attendance Pair
null if not yet registeredShow Attendance Object
curl -X GET "https://api.sushigo.local/api/v1/attendances/today?branch_id=1" \
-H "Authorization: Bearer YOUR_TOKEN"
{
"status": 200,
"data": [
{
"employee": {
"id": "01JKXYZ1234567890ABCDEFGH",
"code": "EMP-001",
"first_name": "Juan",
"last_name": "Pérez",
"roles": ["cook"]
},
"attendance": {
"id": "01JKXYZABC9876543210ZYXWV",
"employee_id": "01JKXYZ1234567890ABCDEFGH",
"date": "2026-03-06",
"check_in": "2026-03-06T15:05:30+00:00",
"check_out": null,
"lunch_start": null,
"lunch_end": null,
"entry_late_seconds": 330,
"lunch_late_seconds": null,
"net_worked_minutes": null,
"overtime_minutes": null,
"overtime_authorized": false,
"overtime_authorized_by": null,
"overtime_authorized_at": null,
"day_status": "PRESENT",
"confirmed_by": null,
"meta": null,
"created_at": "2026-03-06T15:05:30+00:00",
"updated_at": "2026-03-06T15:05:30+00:00"
}
},
{
"employee": {
"id": "01JKXYZ9999888777666ABCDE",
"code": "EMP-002",
"first_name": "María",
"last_name": "González",
"roles": ["manager"]
},
"attendance": null
}
]
}
POST /api/v1/attendances/check-in
"01JKXYZ1234567890ABCDEFGH""2026-02-23T09:05:30-06:00"entry_late_seconds by comparing check-in time to the scheduled start timeday_status set to “PRESENT”curl -X POST "https://api.sushigo.local/api/v1/attendances/check-in" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"employee_id": "01JKXYZ1234567890ABCDEFGH",
"check_in": "2026-03-06T09:05:30-06:00"
}'
{
"status": 201,
"data": {
"id": "01JKXYZABC9876543210ZYXWV",
"employee_id": "01JKXYZ1234567890ABCDEFGH",
"date": "2026-03-06",
"check_in": "2026-03-06T15:05:30+00:00",
"check_out": null,
"lunch_start": null,
"lunch_end": null,
"entry_late_seconds": 330,
"lunch_late_seconds": null,
"net_worked_minutes": null,
"overtime_minutes": null,
"overtime_authorized": false,
"overtime_authorized_by": null,
"overtime_authorized_at": null,
"day_status": "PRESENT",
"confirmed_by": null,
"meta": null,
"created_at": "2026-03-06T15:05:30+00:00",
"updated_at": "2026-03-06T15:05:30+00:00"
}
}
PATCH /api/v1/attendances/{id}/check-out
"01JKXYZABC9876543210ZYXWV""2026-02-23T17:05:00-06:00"check_out timestampnet_worked_minutes (total time excluding lunch break)overtime_minutes (time worked beyond scheduled hours)curl -X PATCH "https://api.sushigo.local/api/v1/attendances/01JKXYZABC9876543210ZYXWV/check-out" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"check_out": "2026-03-06T17:05:00-06:00"
}'
{
"status": 200,
"data": {
"id": "01JKXYZABC9876543210ZYXWV",
"employee_id": "01JKXYZ1234567890ABCDEFGH",
"date": "2026-03-06",
"check_in": "2026-03-06T15:05:30+00:00",
"check_out": "2026-03-06T23:05:00+00:00",
"lunch_start": "2026-03-06T19:00:00+00:00",
"lunch_end": "2026-03-06T20:00:00+00:00",
"entry_late_seconds": 330,
"lunch_late_seconds": 0,
"net_worked_minutes": 420,
"overtime_minutes": 0,
"overtime_authorized": false,
"overtime_authorized_by": null,
"overtime_authorized_at": null,
"day_status": "PRESENT",
"confirmed_by": null,
"meta": null,
"created_at": "2026-03-06T15:05:30+00:00",
"updated_at": "2026-03-06T23:05:00+00:00"
}
}
PATCH /api/v1/attendances/{id}/lunch-start
"01JKXYZABC9876543210ZYXWV""2026-02-23T13:05:00-06:00"curl -X PATCH "https://api.sushigo.local/api/v1/attendances/01JKXYZABC9876543210ZYXWV/lunch-start" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lunch_start": "2026-03-06T13:05:00-06:00"
}'
lunch_start recorded.
PATCH /api/v1/attendances/{id}/lunch-return
"01JKXYZABC9876543210ZYXWV""2026-02-23T14:10:00-06:00"lunch_end timestamplunch_late_seconds by comparing return time to scheduled lunch end timecurl -X PATCH "https://api.sushigo.local/api/v1/attendances/01JKXYZABC9876543210ZYXWV/lunch-return" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"lunch_end": "2026-03-06T14:10:00-06:00"
}'
lunch_end and lunch_late_seconds recorded.
check_in and scheduled start timelunch_end and scheduled lunch return timenet_worked_minutes = (check_out - check_in) - (lunch_end - lunch_start) - deductible_tardiness
deductible_tardiness = entry tardiness over 30 min + lunch tardiness over 30 minovertime_minutes = max(0, net_worked_minutes - scheduled_daily_minutes)
scheduled_daily_minutes comes from the employee’s schedule for that dayTimezone handling
-06:00 for Mexico City)Handling missed punches
meta fieldconfirmed_by to track who made the manual correctionSchedule requirements
Overtime authorization
overtime_authorized flag to track approvalovertime_authorized_by) and when