Time Entries
Time entries are various entries of time made by users in a project, based on the time they spent on a project, in a task.
Possible error codes:
Error Code | Message |
---|---|
1002 | This task does not exist in this project. Hence, this timesheet entry cannot be made |
20050 | This timesheet entry is already being timed |
20054 | This timesheet is being timed. Hence, it cannot be edited |
Attribute
Date Format [yyyy-mm-dd]
{
"time_entry_id": "460000000044021",
"project_id": "460000000044019",
"project_name": "REAL TIME TRAFFIC FLUX",
"customer_id": "460000000044001",
"customer_name": "SAF Instruments Inc",
"task_id": "460000000044009",
"task_name": "Distribution Analysis",
"user_id": "460000000024003",
"user_name": "John David",
"is_current_user": true,
"log_date": "2013-09-17",
"begin_time": "03:00",
"end_time": "04:00",
"log_time": "05:00",
"is_billable": true,
"billed_status": "unbilled",
"invoice_id": "",
"notes": " ",
"timer_started_at": " ",
"timer_started_at_utc_time": "",
"timer_duration_in_minutes": " ",
"timer_duration_in_seconds": "",
"created_time": "2013-09-11T18:05:27+0530",
"timesheet_custom_fields": ""
}
Log time entries
Logging time entries. oauthscope : ZohoInvoice.projects.CREATE
Arguments
Date Format [yyyy-dd-mm]
Time-Format [HH:mm]
Time-Format [HH:mm]
Time-Format [HH:mm]
Maximum length [500]
$ curl https://invoice.zoho.com/api/v3/projects/timeentries
-X POST
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Content-Type: application/json;charset=UTF-8"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
-d '{"field":"value","field":"value"}'
{
"project_id": "Network Distribution",
"task_id": "460000000044001",
"user_id": "460000000024003",
"log_date": "2013-09-17",
"log_time": " ",
"begin_time": "10:00",
"end_time": "15:00",
"is_billable": true,
"notes": " ",
"start_timer": " "
}
{
"code": 0,
"message": "Your timesheet entry has been added.",
"time_entry": {
"time_entry_id": "460000000044021",
"project_id": "460000000044019",
"project_name": "REAL TIME TRAFFIC FLUX",
"customer_id": "460000000044001",
"customer_name": "SAF Instruments Inc",
"task_id": "460000000044009",
"task_name": "Distribution Analysis",
"user_id": "460000000024003",
"user_name": "John David",
"is_current_user": true,
"log_date": "2013-09-17",
"begin_time": "03:00",
"end_time": "04:00",
"log_time": "05:00",
"is_billable": true,
"billed_status": "unbilled",
"invoice_id": "",
"notes": " ",
"timer_started_at": " ",
"timer_started_at_utc_time": "",
"timer_duration_in_minutes": " ",
"timer_duration_in_seconds": "",
"created_time": "2013-09-11T18:05:27+0530",
"timesheet_custom_fields": ""
}
}
List time entries.
List all time entries with pagination. oauthscope : ZohoInvoice.projects.READ
Query Parameters
Date.All
, Date.Today
, Date.ThisWeek
, Date.ThisMonth
, Date.ThisQuarter
, Date.ThisYear
, Date.PreviousDay
, Date.PreviousWeek
, Date.PreviousMonth
, Date.PreviousQuarter
, Date.PreviousYear
, Date.CustomDate
, Status.Unbilled
and Status.Invoiced
project_name
, task_name
, user_name
, log_date
, timer_started_at
and customer_name
$ curl https://invoice.zoho.com/api/v3/projects/timeentries
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"time_entries": [
{
"time_entry_id": "460000000044021",
"project_id": "460000000044019",
"project_name": "REAL TIME TRAFFIC FLUX",
"customer_id": "460000000044001",
"customer_name": "SAF Instruments Inc",
"task_id": "460000000044009",
"task_name": "Distribution Analysis",
"user_id": "460000000024003",
"is_current_user": true,
"user_name": "John David",
"log_date": "2013-09-17",
"begin_time": "03:00",
"end_time": "04:00",
"log_time": "05:00",
"is_billable": true,
"billed_status": "unbilled",
"invoice_id": "",
"notes": " ",
"timer_started_at": " ",
"timer_duration_in_minutes": " ",
"created_time": "2013-09-11T18:05:27+0530"
},
{...},
{...}
]
}
Delete time entries
Deleting time entries. oauthscope : ZohoInvoice.projects.DELETE
$ curl https://invoice.zoho.com/api/v3/projects/timeentries
-X DELETE
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "The selected timesheet entries have been deleted"
}
Update time entry
Update logged time entry. oauthscope : ZohoInvoice.projects.UPDATE
Arguments
Date Format [yyyy-mm-dd]
Time Format [HH:mm]
Time Format [HH:mm]
Time Format [HH:mm]
Maximum length [500]
$ curl https://invoice.zoho.com/api/v3/projects/timeentries/{time_entry_id}
-X PUT
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Content-Type: application/json;charset=UTF-8"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
-d '{"field":"value","field":"value"}'
{
"project_id": "Network Distribution",
"task_id": "460000000044001",
"user_id": "460000000024003",
"log_date": "2013-09-17",
"log_time": " ",
"begin_time": "10:00",
"end_time": "15:00",
"is_billable": true,
"notes": " ",
"start_timer": " "
}
{
"code": 0,
"message": "The timesheet's information has been updated.",
"time_entry": {
"time_entry_id": "460000000044021",
"project_id": "460000000044019",
"project_name": "REAL TIME TRAFFIC FLUX",
"customer_id": "460000000044001",
"customer_name": "SAF Instruments Inc",
"task_id": "460000000044009",
"task_name": "Distribution Analysis",
"user_id": "460000000024003",
"user_name": "John David",
"is_current_user": true,
"log_date": "2013-09-17",
"begin_time": "03:00",
"end_time": "04:00",
"log_time": "05:00",
"is_billable": true,
"billed_status": "unbilled",
"invoice_id": "",
"notes": " ",
"timer_started_at": " ",
"timer_started_at_utc_time": "",
"timer_duration_in_minutes": " ",
"timer_duration_in_seconds": "",
"created_time": "2013-09-11T18:05:27+0530",
"timesheet_custom_fields": ""
}
}
Get a time entry
Get details of a time entry. oauthscope : ZohoInvoice.projects.READ
$ curl https://invoice.zoho.com/api/v3/projects/timeentries/{time_entry_id}
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"time_entry": {
"time_entry_id": "460000000044021",
"project_id": "460000000044019",
"project_name": "REAL TIME TRAFFIC FLUX",
"customer_id": "460000000044001",
"customer_name": "SAF Instruments Inc",
"task_id": "460000000044009",
"task_name": "Distribution Analysis",
"user_id": "460000000024003",
"user_name": "John David",
"is_current_user": true,
"log_date": "2013-09-17",
"begin_time": "03:00",
"end_time": "04:00",
"log_time": "05:00",
"is_billable": true,
"billed_status": "unbilled",
"invoice_id": "",
"notes": " ",
"timer_started_at": " ",
"timer_started_at_utc_time": "",
"timer_duration_in_minutes": " ",
"timer_duration_in_seconds": "",
"created_time": "2013-09-11T18:05:27+0530",
"timesheet_custom_fields": ""
}
}
Delete time entry
Deleting a logged time entry. oauthscope : ZohoInvoice.projects.DELETE
$ curl https://invoice.zoho.com/api/v3/projects/timeentries/{time_entry_id}
-X DELETE
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "The time entry has been deleted."
}
Start timer
Start tracking time spent. oauthscope : ZohoInvoice.projects.CREATE
$ curl https://invoice.zoho.com/api/v3/projects/timeentries/{time_entry_id}/timer/start
-X POST
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "The timer has been started.",
"time_entry": {
"time_entry_id": "460000000044021",
"project_id": "460000000044019",
"project_name": "REAL TIME TRAFFIC FLUX",
"customer_id": "460000000044001",
"customer_name": "SAF Instruments Inc",
"task_id": "460000000044009",
"task_name": "Distribution Analysis",
"user_id": "460000000024003",
"user_name": "John David",
"is_current_user": true,
"log_date": "2013-09-17",
"begin_time": "03:00",
"end_time": "04:00",
"log_time": "05:00",
"is_billable": true,
"billed_status": "unbilled",
"invoice_id": "",
"notes": " ",
"timer_started_at": " ",
"timer_started_at_utc_time": "",
"timer_duration_in_minutes": " ",
"timer_duration_in_seconds": "",
"created_time": "2013-09-11T18:05:27+0530",
"timesheet_custom_fields": ""
}
}
Stop timer
Stop tracking time, say taking a break or leaving. oauthscope : ZohoInvoice.projects.CREATE
$ curl https://invoice.zoho.com/api/v3/projects/timeentries/timer/stop
-X POST
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "Timer has been stopped successfully.",
"time_entry": {
"time_entry_id": "460000000044021",
"project_id": "460000000044019",
"project_name": "REAL TIME TRAFFIC FLUX",
"customer_id": "460000000044001",
"customer_name": "SAF Instruments Inc",
"task_id": "460000000044009",
"task_name": "Distribution Analysis",
"user_id": "460000000024003",
"user_name": "John David",
"is_current_user": true,
"log_date": "2013-09-17",
"begin_time": "03:00",
"end_time": "04:00",
"log_time": "05:00",
"is_billable": true,
"billed_status": "unbilled",
"invoice_id": "",
"notes": " ",
"timer_started_at": " ",
"timer_started_at_utc_time": "",
"timer_duration_in_minutes": " ",
"timer_duration_in_seconds": "",
"created_time": "2013-09-11T18:05:27+0530",
"timesheet_custom_fields": ""
}
}
Get timer
Get current running timer. oauthscope : ZohoInvoice.projects.READ
$ curl https://invoice.zoho.com/api/v3/projects/timeentries/runningtimer/me
-H "X-com-zoho-invoice-organizationid: 10234695"
-H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"
{
"code": 0,
"message": "success",
"time_entry": {
"time_entry_id": "460000000044021",
"project_id": "460000000044019",
"project_name": "REAL TIME TRAFFIC FLUX",
"customer_id": "460000000044001",
"customer_name": "SAF Instruments Inc",
"task_id": "460000000044009",
"task_name": "Distribution Analysis",
"user_id": "460000000024003",
"user_name": "John David",
"is_current_user": true,
"log_date": "2013-09-17",
"begin_time": "03:00",
"end_time": "04:00",
"log_time": "05:00",
"is_billable": true,
"billed_status": "unbilled",
"invoice_id": "",
"notes": " ",
"timer_started_at": " ",
"timer_started_at_utc_time": "",
"timer_duration_in_minutes": " ",
"timer_duration_in_seconds": "",
"created_time": "2013-09-11T18:05:27+0530",
"timesheet_custom_fields": ""
}
}