API
Use TimeTrack Rest API to integrate TimeTrack with other systems.
Happy Coding!
Project time entries are time entries with project assigned to it.
With this endpoint you can:
Project time entry has following params:
Param | Type | Description |
---|---|---|
ID | Integer | ID |
user | Text | Username |
clientName | Text | Client name |
projectName | Text | Project name |
task | Text | Task name |
hourRate | Number | Hourly rate |
latitude | Text | GPS coordinates for start – Latitude |
longitude | Text | GPS coordinates for start – Longitude |
latitude1 | Text | GPS coordinates for end – Latitude |
longitude1 | Text | GPS coordinates for end – Longitude |
billable | Boolean | Flat billable or not billable, default is billable. |
flatRate | Boolean | Flag flat rate or not, default is not flat rate |
details | Text | Notes |
tags | Text | Hashtags |
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 |
workedMinutes | Integer | Work duration in minutes, break not included. |
breakMinutes | Integer | Break duration in minutes. |
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/project_time_entries/”
-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:
Param | Type | Description |
---|---|---|
clientName | Text | Client name |
projectName | Text | Project name |
user | Text | Username |
from | Text | Start, Format: YYYY-MM-DDTHH:MM:SS.fffZ, Example: 2020-10-20T09:00:00.000Z |
to | Text | End, Format: YYYY-MM-DDTHH:MM:SS.fffZ, Example: 2020-10-20T09:00:00.000Z |
In this example we search for project time entries of user “test” between 2020-10-01 and 2020-10-23
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/project_time_entries?username=test&from=2020-10-01T00:00:00.000Z&to=2020-10-23T23:59:59.999Z””
-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/project_time_entries/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 project time entry object.
Required params: clientName, projectName, user, from, to
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/project_time_entries”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{
“username”: “test”,
“from”: “2020-10-20T10:00:00.000Z”,
“to”: “2020-10-20T14:00:00.000Z”
“clientName”: “Client 001”,
“projectName”: “Project 006_1”
“task”: “Development”,
“hourRate”: 50,
“breakMinutes”: 15,
“details”: “This is one test note”
}’
For update you can use all params of project time entry object except: clientName, projectName, user.
curl -X “PUT” “https://testaccount.timetrackenterprise.com/api/v2/ext/project_time_entries/1”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{
“hourRate”: 35.5,
“notes”: “Test note for API”
}’
curl -X “DELETE” “https://testaccount.timetrackenterprise.com/api/v2/ext/project_time_entries/1”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{}’