API
Use TimeTrack Rest API to integrate TimeTrack with other systems.
Happy Coding!
With clients endpoint you can:
Client object has following params:
| Param | Type | Description |
|---|---|---|
| ID | Integer | ID |
| name | Text | Client name |
| enabled | Boolean | Flag if client is enabled or disabled. |
| color | Text | Color in RGB format |
| notes | Text | Notes |
| Text | ||
| phone | Text | Phone |
| address | Text | Address |
| address2 | Text | Address addition |
| addressZipCode | Text | Address zip code |
| addressCity | Text | City |
| addressCountry | Text | Country code ISO 2, for example DE, AT, CH |
| contactPerson | Text | Contact person |
| field1 | Text | Free field |
| field2 | Text | Free field |
| field3 | Text | Free field |
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/clients/”
-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 |
|---|---|---|
| name | Text | Client name will be used as substring. |
In this example we search for all clients that have test in client name.
curl “https://testaccount.timetrackenterprise.com/api/v2/ext/clients?name=test”
-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/clients/1”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{}’
When creating client, you can use all params of client object.
Required params: name
curl -X “POST” “https://testaccount.timetrackenterprise.com/api/v2/ext/clients”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{
“name”: “Client Test”,
“field1”: “VAT ID: 123455678”
}’
For update you can use all params from client object except: name, enabled.
curl -X “PUT” “https://testaccount.timetrackenterprise.com/api/v2/ext/clients/6”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{
“email”: “test@timetrackapp.com”,
“field2”: “Test”
}’
curl -X “DELETE” “https://testaccount.timetrackenterprise.com/api/v2/ext/clients/6”
-H ‘Content-Type: application/json’
-H ‘X-TimeTrack-Api-Secret: <API_SECRET_TOKEN>‘
-H ‘X-TimeTrack-Api-Key: <API_KEY>‘
-d $'{}’