Time Tracking
Track working time by creating check-in and check-out events. This page covers the app-based timestamp API, which is the primary method for programmatic time tracking. For managing existing time records, see the Timespans, Workdays, and Workmonths endpoints.
Overview
There are two ways to track time via the API:
- App Timestamps (this page) - Create check-in/check-out events with an intent-based API. This is the recommended approach for integrating external time clocks or apps.
- Employee Check-in/Check-out - Use the Employees endpoint to check employees in and out by their ID.
POST/api/v2/devices/app-timestamps/
Check-in via App
Start a new working session for an employee.
- Name
intent- Type
- string
- Description
Must be
checkin. Required.
- Name
employee_id- Type
- string (UUID)
- Description
The employee to check in. Required.
- Name
time- Type
- string (ISO 8601)
- Description
The check-in timestamp. Required.
Request
curl -X POST "https://api.zeitstrom.com/api/v2/devices/app-timestamps/" \
-H "Authorization: Token <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"intent": "checkin",
"employee_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"time": "2024-06-20T08:00:00Z"
}'
POST/api/v2/devices/app-timestamps/
Check-out via App
End the current working session for an employee.
- Name
intent- Type
- string
- Description
Must be
checkout. Required.
- Name
employee_id- Type
- string (UUID)
- Description
The employee to check out. Required.
- Name
time- Type
- string (ISO 8601)
- Description
The check-out timestamp. Required.
Request
curl -X POST "https://api.zeitstrom.com/api/v2/devices/app-timestamps/" \
-H "Authorization: Token <YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"intent": "checkout",
"employee_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"time": "2024-06-20T17:00:00Z"
}'