api/entries: Manage entries
Objekttyp „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 |
lumpSums_id | integer | ID of the corresponding lump sum |
billable | integer | Is the entry billable? (1 or 0) |
billed | boolean | Is the entry billable and already billed? In order to set an entry to billed, you have to set "billable = 2" in the edit request. |
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 (e.g. in format “YYYY-MM-DD HH:MM:SS”; see section “Localisation”) |
time_until | string | End time, NULL if entry is running (e.g. in format “YYYY-MM-DD HH:MM:SS”; see section “Localisation”) |
time_insert | string | Insert time (e.g. in format “YYYY-MM-DD HH:MM:SS”; see section “Localisation”) |
time_last_change | string | Time at which the entry has been changed the last time (e.g. in format “YYYY-MM-DD HH:MM:SS”; see section “Localisation”) |
time_last_change_worktime | string | Time at which worktime relevant details have been changed the last time (e.g. in format “YYYY-MM-DD HH:MM:SS”; see section “Localisation”) |
clocked | boolean | Entry was stopped with the clock |
is_clocking | boolean | Entry is running |
lumpSum | float | Returns the lump sum if the entry is a lump sum entry with no amount allocated to a lump sum |
lumpSums_amount | float | The lump sum amount, if the entry is a entry with allocation to a lump sum |
[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
GET /api/entries
Required parameters | time_since | string (YYYY-MM-DD HH:MM:SS) |
---|---|---|
time_until | string (YYYY-MM-DD HH:MM:SS) |
Optionale Parameter | filter[users_id] | integer |
---|---|---|
filter[customers_id] | integer | |
filter[projects_id] | integer | |
filter[services_id] | integer | |
filter[lumpSums_id] | integer | |
filter[billable] |
integer
0, 1 or 2 With the request filter[billable]=2 you only receive entries which are billable and already billed | |
filter[text] / filter[texts_id] | string / integer | |
filter[budget_type] | string strict, strict-completed, strict-incomplete, soft, soft-completed, soft-incomplete, without, without-strict |
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 requestcurl -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"
Answer
{ "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
GET /api/entries/[ID]
Answer
{ "entry": [object of type entry] }
Add entry
POST /api/entries
Time entry
Required parameters | customers_id, services_id, billable, time_since, time_until |
---|
Optional parameters | users_id, duration, hourly_rate, projects_id, text |
---|
Lump sum entry with service
Required parameters | customers_id, services_id, lumpSum, billable, time_since |
---|
Optional parameters | users_id, projects_id, text |
---|
Lump sum entry with lump sum service
Required parameters | customers_id, lumpSums_id, lumpSums_amount, billable, time_since |
---|
Optional parameters | users_id, projects_id, text |
---|
Answer
{ "entry": [object of type entry] }
Edit entry
PUT /api/entries/[ID]
Required parameters | keine |
---|
Optional parameters | customers_id, projects_id, services_id, lumpSums_id, users_id, billable, text, duration, lumpSum, lumpSums_amount, hourly_rate, time_since,time_until |
---|
Answer
{ "entry": [object of type entry] }
Delete entry
DELETE /api/entries/[ID]
Answer
{ "success": true }