API
Use TimeTrack Rest API to integrate TimeTrack with other systems.
Happy Coding!
Attendance time entries are time entries without project assignment, simple clock in and clock out.
With this endpoint you can:
Attendance time entry object has following params:
| PARAM | TypE | DESCRIPTION |
|---|---|---|
| ID | Integer | ID |
| user | Text | Username |
| from | Text | Start timestamp – Format: YYYY-MM-DDTHH:MM:SS.fffZ, Example: 2020-10-20T09:00:00.000Z |
| to | Text | End timestamp – Format: YYYY-MM-DDTHH:MM:SS.fffZ, Example: 2020-10-20T09:00:00.000Z |
| notes | Text | Notes |
| manual | Boolean | Flag if entry was created manually or with timer |
| workedMinutes | Integer | Work duration in minutes |
| breakMinutes | Integer | Break duration in minutes |
| latitudeStart | Number | Start GPS coordinate latitude |
| longitudeStart | Text | Start GPS coordinate longitude |
| latitudeEnd | Text | End GPS coordinate latitude |
| longitudeEnd | Text | End GPS coordinate longitude |
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/attendances/”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{}’
You can use following params for search / filter:
| FIELD | TypE | DESCRIPTION |
|---|---|---|
| user | Text | Username |
| from | Text | From, Format: YYYY-MM-DDTHH:MM:SS.fffZ, Example: 2020-10-20T09:00:00.000Z |
| to | Text | To, Format: YYYY-MM-DDTHH:MM:SS.fffZ, Example: 2020-10-20T09:00:00.000Z |
In this example we search attendance time entries of user “tester” between 2020-10-01 and 2020-10-31.
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/attendances?username=tester&from=2020-10-01T00:00:00Z&to=2020-10-31T00:00:00Z”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{}’
Required params: ID.
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/attendances/1”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{}’
For create method, you can use all params of attendance time entry object.
Required params: username, from, to
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/attendances”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{
“username”: “tester”,
“to”: “2020-10-17T14:00:00.000Z”,
“minutesBreak”: 15,
“details”: “This is a test”,
“from”: “2020-10-17T10:00:00.000Z”
}’
For update method you can use all params of attendance time entry object, except: username.
curl -X “PUT” “https://testaccount.timetrackenterprise.com/api/v2/ext/attendances/1”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{
“notes”: “This is one test note”,
“to”: “2020-10-17T23:00:00.000Z”,
“minutesBreak”: 0
}’
Time Entry will be marked as deleted.
curl -X “DELETE” “https://testaccount.timetrackenterprise.com/api/v2/ext/attendances/1”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{}’