REST-API

The clockodo API allows you to connect clockodo to other systems. Accounting and project management applications or proprietary shell scripts are examples of useful mash-ups with clockodo.

api/entries: Manage entries


Object type „entry“

Parameter Type Description
id integer ID of the entry
customers_id integer ID of the corresponding customer
projects_id integer ID of the corresponding project
users_id integer ID of the corresponding co-worker
services_id integer ID of the corresponding service
billable integer Is the entry billable? (1 or 0)
billed boolean Is the entry billable and already billed?
texts_id integer ID of the description text
text string description text
duration integer Duration of the entry in seconds
duration_time string Duration of the entry in HH:MM:SS format
offset integer The time correction of the entry in seconds. Is set if the duration differs from the period between start and end.
offset_time string The time correction of the entry in HH:MM:SS format. Is set if the duration differs from the period between start and end.
time_since string Starting time in YYYY-MM-DD HH:MM:SS format
time_until string End time in YYYY-MM-DD HH:MM:SS format, NULL if entry is running
time_insert string Insert time (YYYY-MM-DD HH:II:SS)
time_last_change string Time at which the entry has been changed the last time (YYYY-MM-DD HH:II:SS)
time_last_change_worktime string Time at which worktime relevant details have been changed the last time (YYYY-MM-DD HH:II:SS)
clocked boolean Entry was stopped with the clock
is_clocking boolean Entry is running
lumpSum float The lumpsum amount if the entry is a lumpsum entry
[hourly_rate] float Hourly rate Only with necessary access rights and only in list function
[revenue] float Revenue of the entry Only with necessary access rights and only in list function
[budget] float Corr. projects budget Only with necessary access rights and only in list function
[budget_is_hours] boolean Corr. projects budget is a time budget, not a money budget Only with necessary access rights and only in list function
[budget_is_not_strict] boolean Corr. projects is not a strict budget, but a should-be budget Only with necessary access rights and only in list function
[customers_name] string Name of the corr. customers Only in list function
[projects_name] string Name of the corr. project Only in list function
[services_name] string Name of the corr. service Only in list function
[users_name] string Name of the corr. co-worker Only in list function

List entries

Request
GET /api/entries
Required parameters time_since string (YYYY-MM-DD HH:MM:SS)
time_until string (YYYY-MM-DD HH:MM:SS)
Optional parameters filter[users_id] integer
filter[customers_id] integer
filter[projects_id] integer
filter[services_id] integer
filter[billable] integer 0, 1 oder 2
With the request filter[billable]=2 you only receive entries which are billable and already billed
filter[text] / filter[texts_id] string / integer

Please note that listing entries requires the restriction to a time period with the parameters above. Additionally, you can filter the entries by parameters.

Because the result can have many entries, the use of page-by-page-output is enabled for this request.

Do also note, that GET parameters have to be URL encoded. Using cURL, the request has to look like in the following example. Most libraries and applications (REST clients) do encode the parameters automatically.

Example curl request
curl -v 
  -X POST \ 
  -H 'X-ClockodoApiUser: [Email adress]' \ 
  -H 'X-ClockodoApiKey: [API key]' \ 
  "https://my.clockodo.com/api/entries?time_since=2017-01-01%2000:00:00&time_until=2017-02-01%2000:00:00"
Response
{
  "paging": [paging information],
  "filter": [list of respected filters],
  "entries": 
  {
    [object of type entry],
    [object of type entry],
    ...
  }
}

Please refer to the description of the page-by-page-output.


Get entry

Request
GET /api/entries/[ID]
Response
{
  "entry": [object of type entry]
}

Add entry

Request
POST /api/entries
Required parameters customers_id, services_id, billable
Optional parameters users_id, duration, lumpSum, hourly_rate, projects_id, text, time_since, time_until
Response
{
  "entry": [object of type entry]
}

Edit entry

Request
PUT /api/entries/[ID]
Required parameters none
Optional parameters customers_id, projects_id, services_id, users_id, billable, text, duration, lumpSum, hourly_rate, time_since,time_until
Response
{
  "entry": [object of type entry]
}

Delete entry

Request
DELETE /api/entries/[ID]
Response
{
  "success": true
}