Use TimeTrack Rest API to integrate TimeTrack with other systems. Happy Coding!
With timer endpoint you can:
Project timer object has following params:
IMPORTANT: For each request you have to pass the local timestamp in order to get the right duration. This date must be in same timezone like you are currently, we will use it on server to calculate workedDuration and breakDuration.
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/timers/project_timer?username=test&date=2020-10-23T16:00:00.000Z” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{}’
Required params to start project timer: date, clientName, projectName, username
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/timers/project_timer/start” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{ “username”: “test”, “clientName”: “Client 006”, “projectName”: “Project 006_1”, “date”: “2020-10-23T15:00:00.000Z” }’
Required params to pause project timer: date, username
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/timers/project_timer/pause” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{ “date”: “2020-10-23T15:30:00.000Z”, “username”: “test” }’
Required params to resume project timer: date, username
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/timers/project_timer/resume” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{ “date”: “2020-10-23T15:30:00.000Z”, “username”: “test” }’
Required params to stop project timer: date, username
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/timers/project_timer/stop” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{ “date”: “2020-10-23T15:30:00.000Z”, “username”: “test” }’
Attendance timer object has following params:
Required params: date.
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/attendance_timer?username=test&date=2020-10-23T16:00:00.000Z” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{}’
Required params: date, username
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/attendance_timer/start” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{ “username”: “test”, “date”: “2020-10-23T15:00:00.000Z” }’
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/attendance_timer/stop” -H ‘Content-Type: application/json’ -H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘ -H ‘X-TimeTrack-Api-Key: <API_KEY>‘ -d $'{ “username”: “test”, “date”: “2020-10-23T15:00:00.000Z” }’