Please note: The label 'contact-id' is intended to define a relation toward a generic CRM object (i.e. a contact, a case or a deal).
Returns a page full of time entries for the given project, in descending order by date. Each page contains up to 50 time entry records. To select a different page of data, set the “page” query parameter to a value greater than one.
{
"continued-at":"/projects/97387934/timeEntries/2",
"time-entries":[
{
"id":"87855111",
"time-category-id":"97996122",
"user-id":"68005042",
...
},
{
"id":"82171591",
"time-category-id":"48691502",
"user-id":"55071099",
...
},
...
]
}
Returns all time entries associated with the given task item, in descending order by date.
{
"time-entries":[
{
"id":"87855111",
"time-category-id":"97996122",
"user-id":"68005042",
...
},
{
"id":"82171591",
"time-category-id":"48691502",
"user-id":"55071099",
...
},
...
]
}
Returns a page full of time entries for the given contact, in descending order by date. Each page contains up to 50 time entry records. To select a different page of data, set the “page” query parameter to a value greater than one.
{
"continued-at":"/contacts/67664788/timeEntries/2",
"time-entries":[
{
"id":"87855111",
"time-category-id":"97996122",
"user-id":"68005042",
...
},
{
"id":"82171591",
"time-category-id":"48691502",
"user-id":"55071099",
...
},
...
]
}
Returns a single time entry record identified by its integer ID.
{
"time-entry":{
"id":"87855111",
"time-category-id":"97996122",
"user-id":"68005042",
...
}
}
Creates a new time entry for the given project.
{
"time-entry":{
"category-id":"67909862",
"user-id":"92970015",
"notes":"Working hard",
"date":"2012-07-05",
// Possible values for “billable” key are:
// - unset
// - not billable
// - billable
// - billed
"billable":"billable",
"seconds":"3600"
}
}
Returns HTTP status code 201 (“Created”) on success. The response contain the new time entry ID. On failure, a non-200 status code will be returned, possibly with error information in JSON format as the response's content.
{
"time-entry-id":"9056560"
}
Creates a new time entry for the given task.
{
"time-entry":{
"category-id":"71615978",
"user-id":"38904512",
"notes":"Working hard",
"date":"2012-07-05",
// Possible values for “billable” key are:
// - unset
// - not billable
// - billable
// - billed
"billable":"billable",
"seconds":"3600"
}
}
Returns HTTP status code 201 (“Created”) on success. The response contain the new time entry ID. On failure, a non-200 status code will be returned, possibly with error information in JSON format as the response's content.
{
"time-entry-id":"9056560"
}
Creates a new time entry for the given contact.
{
"time-entry":{
"category-id":"71615978",
"user-id":"38904512",
"notes":"Working hard",
"date":"2012-07-05",
// Possible values for “billable” key are:
// - unset
// - not billable
// - billable
// - billed
"billable":"billable",
"seconds":"3600"
}
}
Returns HTTP status code 201 (“Created”) on success. The response contain the new time entry ID. On failure, a non-200 status code will be returned, possibly with error information in JSON format as the response's content.
{
"time-entry-id":"9056560"
}
Updates the given time-entry record with the data given.
{
"time-entry":{
"category-id":"72077059",
"notes":"Working hard",
"date":"2012-08-05"
}
}
Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.
Destroys the given time entry record.
Returns HTTP status code 200 on success, or any other code (and possibly error information in JSON format) on error.
Return the set of time entries that match the given criteria. By default, it show time entries on projects for the last 6 months.
Name | Default | Description |
---|---|---|
include_personal |
false |
Include personal user time entries. |
include_projects |
true |
Include time entries related to projects. |
include_contacts |
false |
Include time entries related to contacts. |
include_cases |
false |
Include time entries related to cases. |
include_deals |
false |
Include time entries related to deals. |
from |
(6 months ago) | Start date in “YYYYMMDD” format (or in any other format accepted by the PHP function date() ). |
to |
(today) | End date in “YYYYMMDD” format (or in any other format accepted by the PHP function date() ). |
user_id |
none | Restrict to a single person's time entries. |
company_id |
none | Restrict to time entries of the given company. |
task_id |
none | Restrict to time entries related to the given task. |
project_id |
none | Restrict to time entries of the given project. |
with_totals |
false |
Add an object containing the totals to the response data. |
Please keep in mind that from
and to
cannot be used to get more than 6 months worth of entries for each query, and that contact-id
can be either a contact, a case or a deal.
{
"time-entries":[
{
"id":"87855111",
"time-category-id":"97996122",
"user-id":"68005042",
...
},
{
"id":"82171591",
"time-category-id":"48691502",
"user-id":"55071099",
...
},
...
],
// Only if you pass the “with_totals” parameter
"totals":{
"number-of-entries":30,
"sum-of-seconds":694680,
"sum-of-unset-seconds":"691080",
"sum-of-billable-seconds":0,
"sum-of-non-billable-seconds":0,
"sum-of-billed-seconds":"3600"
}
}