Timesheets API
Scope: ZohoProjects.timesheets.{Operation}
Operations: READ, CREATE, UPDATE, DELETE, ALL
Use the ALL operation to gain the scope for all the other operations like READ, CREATE, UPDATE, and DELETE at once.
| Get All Time Logs GET /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/ |
| Get My Time Logs GET /restapi/portal/[PORTALID]/logs |
| Get Time Logs for a Task GET /restapi/portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/ |
| Add Time Log for a Task POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/ |
| Update Time Log for a Task POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/ |
| Approve Time Log for a Task POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/approval |
| Delete Time Log for a Task DELETE /restapi/portal/[PORTALID]/projects/[PROJECTID]/tasks/[TASKID]/logs/[LOGID]/ |
| Get Time Logs for a Bug GET /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[ISSUEID]/logs |
| Add Time Log for a Bug POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/ |
| Update Time Log for a Bug POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/ |
| Approve Time Log for a Bug POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/approval |
| Delete Time Log for a Bug DELETE /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/ |
| Add Time for a General Log POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/ |
| Update Time for a General Log POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/ |
| Approve Time for a General Log POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/approval |
| Delete Time for a General Log DELETE /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/ |
| Get Timesheet Layout Details GET /restapi/portal/[PORTALID]/projects/[PROJECTID]/timesheetlayouts |
| Get All Timesheet Custom Fields GET /restapi/portal/[PORTALID]/timesheetcustomfields |
Get All Time Logs
Gets all the time logs in the given project.
Scope: ZohoProjects.timesheets.READ
Request Parameters
| index | int | Index of the time log. |
| range | int | Range of the time logs. |
| users_list* | String or Long | User of the time logs must be provided as all or user ID. For multiple users, the user ID must be separated by commas.(all - String, user ID - Long) |
| view_type* | String | View type of the timesheet must be provided as day or week or month or custom_date |
| date* | String [MM-DD-YYYY] | Date of the timesheet view type. |
| custom_date | JSON Object | Range of the custom_date. The date range must not exceed 6 months. Format: {"start_date": "MM-DD-YYYY", "end_date": "MM-DD-YYYY"}. Mandatory parameter when view type is selected as custom_date. |
| bill_status* | String | Timesheet billable status must be provided as All or Billable or Non Billable. |
| component_type* | String | Type of the component must be provided as task or bug or general. |
| approval_status | String | Accepted values
|
| fetch_by_modifiedtime | Boolean | Value must be provided as true or false. |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"date": [
{
"date": "03-19-2021",
"display_format": "03-19-2021 12:00:00 AM",
"date_long": 1616092200000,
"total_hours": "4:30",
"tasklogs": [
{
"created_time_long": 1617004794745,
"hours": 4,
"notes": "",
"owner_name": "Monica Hemsworth",
"created_time_format": "03-29-2021 01:29:54 PM",
"minutes": 30,
"total_minutes": 270,
"owner_id": "703961433",
"approval_status": "Approved",
"approver_name": "Monica Hemsworth",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/zylker/projects/170876000010385143/tasks/170876000010385343/logs/170876000010969001/"
}
},
"last_modified_date": "03-29-2021",
"bill_status": "Billable",
"last_modified_time_long": 1617005067402,
"last_modified_time_format": "03-29-2021 01:34:27 PM",
"task": {
"sub_task_level": "0",
"is_sub_task": false,
"name": "Addition exercice",
"id_string": "170876000010385343",
"id": 170876000010385343,
"is_parent": false
},
"id_string": "170876000010969001",
"created_date": "03-29-2021",
"id": 170876000010969001,
"hours_display": "04:30",
"task_list": {
"name": "Math",
"id": 170876000010385293
}
}
]
}
],
"role": "admin",
"non_billable_hours": "00:00",
"billable_hours": "04:30",
"grandtotal": "04:30"
}
}
Get My Time Logs
Gets the time logs of all users or specific users.
Scope: ZohoProjects.timesheets.READ
Request Parameters
| index | int | Index of the time log. |
| range | int | Range of the time logs. |
| users_list* | String or Long | User of the time logs must be provided as all or user ID. For multiple users, the user ID must be separated by commas.(all - String, user ID - Long) |
| view_type* | String | View type of the timesheet must be provided as day or week or month or custom_date |
| date* | String [MM-DD-YYYY] | Date of the timesheet view type. |
| custom_date | JSON Object | Range of the custom_date. The date range must not exceed 6 months. Format: {"start_date": "MM-DD-YYYY", "end_date": "MM-DD-YYYY"}. Mandatory parameter when view type is selected as custom_date. |
| bill_status* | String | Timesheet billable status must be provided as All or Billable or Non Billable. |
| component_type* | String | Type of the component must be provided as task or bug or general. |
| approval_status | String | Accepted values
|
| fetch_by_modifiedtime | Boolean | Value must be provided as true or false. |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"date": [
{
"date": "03-12-2021",
"display_format": "03-12-2021 12:00:00 AM",
"date_long": 1615487400000,
"total_hours": "4:00",
"tasklogs": [
{
"created_time_long": 1615538447501,
"hours": 4,
"notes": "",
"owner_name": "Shoba S",
"created_time_format": "03-12-2021 02:10:47 PM",
"minutes": 0,
"total_minutes": 240,
"owner_id": "672004944",
"approval_status": "Approved",
"approver_name": "Shoba S",
"custom_fields": [],
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/zylker/projects/170876000007103005/tasks/170876000008213022/logs/170876000010826021/"
}
},
"last_modified_date": "03-12-2021",
"project": {
"name": "Zylker Coffee Shop",
"id_string": "170876000007103005",
"id": 170876000007103000
},
"bill_status": "Non Billable",
"last_modified_time_long": 1615538486728,
"last_modified_time_format": "03-12-2021 02:11:26 PM",
"task": {
"sub_task_level": "0",
"is_sub_task": false,
"name": "Task 43",
"id_string": "170876000008213022",
"id": 170876000008213020,
"is_parent": false
},
"id_string": "170876000010826021",
"created_date": "03-12-2021",
"id": 170876000010826020,
"hours_display": "04:00",
"task_list": {
"name": "General",
"id": 170876000008213020
}
}
]
}
],
"role": "admin",
"non_billable_hours": "00:00",
"billable_hours": "04:00",
"grandtotal": "04:00"
}
}
Get Time Logs for a Task
Gets the time logs under a specific task.
Scope: ZohoProjects.timesheets.READ
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"total_log_hours": "2:00",
"tasklogs": [
{
"notes": "",
"owner_id": "703961433",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/zylker/projects/170876000010385143/tasks/170876000010385343/logs/170876000010969001/"
}
},
"last_modified_date": "03-29-2021",
"log_date_long": 1616696999000,
"is_parent": false,
"sub_task_level": "0",
"last_modified_time_long": 1617004794745,
"id": 170876000010969001,
"task_list": {
"name": "Math",
"id": 170876000010385293
},
"log_date_format": "03-25-2021 11:59:59 PM",
"created_time_long": 1617004794745,
"hours": 2,
"owner_name": "Monica Hemsworth",
"created_time_format": "03-29-2021 01:29:54 PM",
"is_sub_task": false,
"minutes": 0,
"total_minutes": 120,
"approval_status": "Pending",
"bill_status": "Billable",
"last_modified_time_format": "03-29-2021 01:29:54 PM",
"task": {
"name": "Addition exercice",
"id_string": "170876000010385343",
"id": 170876000010385343
},
"log_date": "03-25-2021",
"id_string": "170876000010969001",
"created_date": "03-29-2021",
"hours_display": "02:00"
}
]
}
}
Add Time Log for a Task
Adds the time log to a task.
Scope: ZohoProjects.timesheets.CREATE
Request Parameters
| date* | String [MM-DD-YYYY] | Date of the timesheet. |
| owner | Long | User ID. |
| bill_status* | String | Timesheet billable status must be provided as Billable or Non Billable. |
| hours* | String [hh:mm] | Time period of the timesheet. |
| notes | String | Additional information about the time log. |
| custom_fields | JSON Object | Value of the custom field. Example: {"UDF_CHAR1":"Hello"} |
| cost_per_hour | float | Specify the Cost per hour. |
Sample Response
Status: 201 Created Content Type: application/json;charset=utf-8
{
"timelogs": {
"tasklogs": [
{
"notes": "",
"owner_id": "703961433",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/zylker/projects/170876000010385143/tasks/170876000010385343/logs/170876000010969001/"
}
},
"last_modified_date": "03-29-2021",
"log_date_long": 1616696999000,
"is_parent": false,
"sub_task_level": "0",
"last_modified_time_long": 1617004794745,
"id": 170876000010969001,
"task_list": {
"name": "Math",
"id": 170876000010385293
},
"log_date_format": "03-25-2021 11:59:59 PM",
"created_time_long": 1617004794745,
"hours": 2,
"owner_name": "Monica Hemsworth",
"created_time_format": "03-29-2021 01:29:54 PM",
"is_sub_task": false,
"minutes": 0,
"total_minutes": 120,
"approval_status": "Pending",
"bill_status": "Billable",
"last_modified_time_format": "03-29-2021 01:29:54 PM",
"task": {
"name": "Addition exercice",
"id_string": "170876000010385343",
"id": 170876000010385343
},
"log_date": "03-25-2021",
"id_string": "170876000010969001",
"created_date": "03-29-2021",
"hours_display": "02:00"
}
]
}
}
Update Time Log for a Task
Updates the time log for a task
Scope: ZohoProjects.timesheets.UPDATE
Request Parameters
| date* | String [MM-DD-YYYY] | Date of the timesheet. |
| owner | Long | User ID. |
| bill_status* | String | Timesheet billable status must be provided as Billable or Non Billable. |
| hours* | String [hh:mm] | Time period of the timesheet. |
| notes | String | Additional information about the time log. |
custom_fields | JSON Object | Value of the custom field. Example: {"UDF_CHAR1":"Hello"} |
| cost_per_hour | float | Specify the Cost per hour. |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"tasklogs": [
{
"notes": "",
"owner_id": "703961433",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/zylker/projects/170876000010385143/tasks/170876000010385343/logs/170876000010969001/"
}
},
"last_modified_date": "03-29-2021",
"log_date_long": 1616178599000,
"is_parent": false,
"sub_task_level": "0",
"last_modified_time_long": 1617005022730,
"id": 170876000010969001,
"task_list": {
"name": "Math",
"id": 170876000010385293
},
"log_date_format": "03-19-2021 11:59:59 PM",
"created_time_long": 1617004794745,
"hours": 4,
"owner_name": "Monica Hemsworth",
"created_time_format": "03-29-2021 01:29:54 PM",
"is_sub_task": false,
"minutes": 30,
"total_minutes": 270,
"approval_status": "Pending",
"bill_status": "Billable",
"last_modified_time_format": "03-29-2021 01:33:42 PM",
"task": {
"name": "Addition exercice",
"id_string": "170876000010385343",
"id": 170876000010385343
},
"log_date": "03-19-2021",
"id_string": "170876000010969001",
"created_date": "03-29-2021",
"hours_display": "04:30"
}
]
}
}
Approve Time Log for a Task
Approve time log for a task.
Scope: ZohoProjects.timesheets.UPDATE
Request Parameters
| approval | String | Accepted values
|
| reason | String | Reason should be mentioned if the time log is rejected. The reason shouldn't exceed 250 characters. |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"tasklogs": [
{
"notes": "",
"owner_id": "703961433",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/zylker/projects/170876000010385143/tasks/170876000010385343/logs/170876000010969001/"
}
},
"last_modified_date": "03-29-2021",
"log_date_long": 1616178599000,
"is_parent": false,
"sub_task_level": "0",
"last_modified_time_long": 1617005067402,
"id": 170876000010969001,
"task_list": {
"name": "Math",
"id": 170876000010385293
},
"log_date_format": "03-19-2021 11:59:59 PM",
"created_time_long": 1617004794745,
"hours": 4,
"owner_name": "Monica Hemsworth",
"created_time_format": "03-29-2021 01:29:54 PM",
"is_sub_task": false,
"minutes": 30,
"total_minutes": 270,
"approver_name": "Monica Hemsworth",
"approval_status": "Approved",
"bill_status": "Billable",
"last_modified_time_format": "03-29-2021 01:34:27 PM",
"task": {
"name": "Addition exercice",
"id_string": "170876000010385343",
"id": 170876000010385343
},
"log_date": "03-19-2021",
"id_string": "170876000010969001",
"created_date": "03-29-2021",
"hours_display": "04:30"
}
]
}
}
Delete Time Log for a Task
Deletes the time log for a task.
Scope: ZohoProjects.timesheets.DELETE
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"response": "Timesheet log Deleted Successfully"
}Get Time Logs for a Bug
Gets the time logs under a specific bug.
Scope: ZohoProjects.timesheets.READ
Request Parameters
| index | int | Index of the time log. |
| range | int | Range of the time logs. |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"buglogs": [
{
"notes": "timesheet log : start time -04-15-2020 15:19 end time 04-15-2020 15:2g",
"owner_id": "60104829",
"link": {
"self": {
"url": "https://projects.zoho.com/restapi/portal/cdn/projects/62308000000045027/bugs/62308000000363043/logs/62308000000363058/"
}
},
"last_modified_date": "09-28-2020",
"log_date_long": 1587061799000,
"last_modified_time_long": 1601285769138,
"invoice_id": 56928000000281000, //for portals integrated with Zoho Invoice
"id": 62308000000363060,
"log_date_format": "04-16-2020 11:29:59 AM",
"created_time_long": 1586944159298,
"hours": 2,
"cost": "₹ 11.34",
"owner_name": "hey ranjith",
"created_time_format": "04-15-2020 02:49:19 AM",
"minutes": 16,
"total_minutes": 136,
"approver_name": "hey ranjith",
"approval_status": "Approved",
"custom_fields": [
{
"column_name": "UDF_BOOLEAN1",
"label_name": "check box",
"value": "false"
}
],
"end_time": "05:35 PM",
"bill_status": "Billable",
"start_time": "03:19 PM",
"last_modified_time_format": "09-28-2020 02:36:09 AM",
"bug": {
"id_string": "62308000000363043",
"id": 62308000000363040,
"title": "hel"
},
"log_date": "04-16-2020",
"id_string": "62308000000363058",
"created_date": "04-15-2020",
"hours_display": "02:16"
}
],
"total_log_hours": "02:16"
}
}
Add Time Log for a Bug
Adds the time log to a bug.
Scope: ZohoProjects.timesheets.CREATE
Request Parameters
| date* | String [MM-DD-YYYY] | Date of the timesheet. |
| owner | Long | User ID. |
| bill_status* | String | Timesheet billable status must be provided as Billable or Non Billable. |
| hours* | String [hh:mm] | Time period of the timesheet. |
| notes | String | Additional information about the time log. |
custom_fields | JSON Object | Value of the custom field. Example: {"UDF_CHAR1":"Hello"} |
| cost_per_hour | float | Specify the Cost per hour. |
Sample Response
Status: 201 Created Content Type: application/json;charset=utf-8
{
"timelogs": {
"buglogs": [
{
"created_time_long": 1534159650174,
"hours": 5,
"notes": "",
"owner_name": "Helen Collins",
"created_time_format": "08-13-2018 04:27:30 AM",
"minutes": 0,
"total_minutes": 300,
"owner_id": "639283127",
"approval_status": "Pending",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000003055013/bugs/170876000003237035/logs/170876000005413005/"
}
},
"last_modified_date": "08-13-2018",
"log_date_long": 1531983599000,
"bill_status": "all",
"last_modified_time_long": 1534159650174,
"last_modified_time_format": "08-13-2018 04:27:30 AM",
"bug": {
"id_string": "170876000003237035",
"id": 170876000003237020,
"title": "I grew up in north Philadelphia. The youngest of three, I have two older sisters, five and eight years older than me. In my 35 years of living, I have yet to meet my \n"
},
"log_date": "07-18-2018",
"id_string": "170876000005413005",
"id": 170876000005413000,
"created_date": "08-13-2018",
"log_date_format": "07-18-2018 11:59:59 PM",
"hours_display": "05:00"
}
]
}
}Update Time Log for a Bug
Updates the time log for a bug.
POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/
Scope: ZohoProjects.timesheets.UPDATE
Request Parameters
| date* | String [MM-DD-YYYY] | Date of the timesheet. |
| owner | Long | User ID. |
| bill_status* | String | Timesheet billable status must be provided as Billable or Non Billable. |
| hours* | String [hh:mm] | Time period of the timesheet. |
| notes | String | Additional information about the time log. |
custom_fields | JSON Object | Value of the custom field. Example: {"UDF_CHAR1":"Hello"} |
| cost_per_hour | float | Specify the Cost per hour. |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"buglogs": [
{
"created_time_long": 1534159650174,
"hours": 5,
"notes": "",
"owner_name": "Helen Collins",
"created_time_format": "08-13-2018 04:27:30 AM",
"minutes": 0,
"total_minutes": 300,
"owner_id": "639283127",
"approval_status": "Pending",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000003055013/bugs/170876000003237035/logs/170876000005413005/"
}
},
"last_modified_date": "08-13-2018",
"log_date_long": 1531983599000,
"bill_status": "billable",
"last_modified_time_long": 1534159817712,
"last_modified_time_format": "08-13-2018 04:30:17 AM",
"bug": {
"id_string": "170876000003237035",
"id": 170876000003237020,
"title": "I grew up in north Philadelphia. The youngest of three, I have two older sisters, five and eight years older than me. In my 35 years of living, I have yet to meet my \n"
},
"log_date": "07-18-2018",
"id_string": "170876000005413005",
"id": 170876000005413000,
"created_date": "08-13-2018",
"log_date_format": "07-18-2018 11:59:59 PM",
"hours_display": "05:00"
}
]
}
}Approve Time Log for a Bug
Approve time log for a bug.
POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/approval
Scope: ZohoProjects.timesheets.UPDATE
Request Parameters
| approval | String | Accepted values
|
| reason | String | Reason should be mentioned if the time log is rejected. The reason shouldn't exceed 250 characters. |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"buglogs": [{
"bug": {
"id": 170876000001829171,
"name": "UI Issue in Gantt"
},
"approval_status": "Approved"
"id": 170876000001849055,
"notes": "",
"log_date": "05-26-2014 11:59 PM",
"log_date_long": 1401157799000,
"hours": 3,
"minutes": 30,
"hours_display": "03:30",
"total_minutes": 210,
"owner_id": "2060758",
"owner_name": "Patricia Boyle",
"bill_status": "Billable",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000000147021/bugs/170876000001829171/logs/170876000001849055/"
}
}
}]
}
}Delete Time Log for a Bug
Deletes the time log for a bug.
DELETE /restapi/portal/[PORTALID]/projects/[PROJECTID]/bugs/[BUGID]/logs/[LOGID]/
Scope: ZohoProjects.timesheets.DELETE
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"response": "Timesheet log Deleted Successfully"
}Add Time for a General Log
Adds the time log to other tasks.
POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/
Scope: ZohoProjects.timesheets.CREATE
Request Parameters
| name* | String | Name of the other tasks. |
| owner | Long | User ID. |
| date* | String [MM-DD-YYYY] | Date of the timesheet. |
| bill_status* | String | Timesheet billable status must be provided as Billable or Non Billable. |
| hours* | String [hh:mm] | Time period of the timesheet. |
| notes | String | Additional information about the time log. |
custom_fields | JSON Object | Value of the custom field. Example: {"UDF_CHAR1":"Hello"} |
Sample Response
Status: 201 Created Content Type: application/json;charset=utf-8
{
"timelogs": {
"generallogs": [
{
"created_time_long": 1534159664291,
"hours": 5,
"notes": "",
"owner_name": "Helen Collins",
"created_time_format": "08-13-2018 04:27:44 AM",
"minutes": 0,
"total_minutes": 300,
"owner_id": "639283127",
"approval_status": "Pending",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000003055013/logs/170876000005413009/"
}
},
"last_modified_date": "08-13-2018",
"log_date_long": 1531983599000,
"bill_status": "all",
"last_modified_time_long": 1534159664291,
"last_modified_time_format": "08-13-2018 04:27:44 AM",
"log_date": "07-18-2018",
"name": "general-log",
"id_string": "170876000005413009",
"id": 170876000005413020,
"created_date": "08-13-2018",
"log_date_format": "07-18-2018 11:59:59 PM",
"hours_display": "05:00"
}
]
}
}Update Time for a General Log
Updates the time log for other tasks.
Scope: ZohoProjects.timesheets.UPDATE
Request Parameters
| name* | String | Name of the other tasks. |
| owner | Long | User ID. |
| date* | String [MM-DD-YYYY] | Date of the timesheet. |
| bill_status* | String | Timesheet billable status must be provided as Billable or Non Billable. |
| hours* | String [hh:mm] | Time period of the timesheet. |
| notes | String | Additional information about the time log. |
custom_fields | JSON Object | Value of the custom field. Example: {"UDF_CHAR1":"Hello"} |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"generallogs": [
{
"created_time_long": 1534159664291,
"hours": 10,
"notes": "",
"owner_name": "Helen Collins",
"created_time_format": "08-13-2018 04:27:44 AM",
"minutes": 0,
"total_minutes": 600,
"owner_id": "639283127",
"approval_status": "Pending",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000003055013/logs/170876000005413009/"
}
},
"last_modified_date": "08-13-2018",
"log_date_long": 1531983599000,
"bill_status": "all",
"last_modified_time_long": 1534159890445,
"last_modified_time_format": "08-13-2018 04:31:30 AM",
"log_date": "07-18-2018",
"name": "general-log",
"id_string": "170876000005413009",
"id": 170876000005413020,
"created_date": "08-13-2018",
"log_date_format": "07-18-2018 11:59:59 PM",
"hours_display": "10:00"
}
]
}
}Approve Time for a General Log
Approve general time log.
POST /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/approval
Scope: ZohoProjects.timesheets.UPDATE
Request Parameters
| approval | String | Accepted values
|
| reason | String | Reason should be mentioned if the time log is rejected. The reason shouldn't exceed 250 characters. |
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"timelogs": {
"generallogs": [{
"approval_status": "Approved"
"id": 170876000001849059,
"name": "Client Call",
"notes": "",
"log_date": "05-26-2014 11:59 PM",
"log_date_long": 1401157799000,
"hours": 2,
"minutes": 30,
"hours_display": "02:30",
"total_minutes": 150,
"owner_id": "2060758",
"owner_name": "Patricia Boyle",
"bill_status": "Billable",
"link": {
"self": {
"url": "https://projectsapi.zoho.com/restapi/portal/2063927/projects/170876000000147021/logs/170876000001849059/"
}
}
}]
}
}Delete Time for a General Log
Deletes the time log for other tasks.
DELETE /restapi/portal/[PORTALID]/projects/[PROJECTID]/logs/[LOGID]/
Scope: ZohoProjects.timesheets.DELETE
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"response": "Timesheet log Deleted Successfully"
}Get Timesheet Layout Details
Fetch details of the timesheet layout in the given project
GET /restapi/portal/[PORTALID]/projects/[PROJECTID]/timesheetlayouts
Scope: ZohoProjects.timesheets.READ
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"CURRENCY": "EUR",
"layout_id": "69822000000206063",
"section_details": [
{
"section_id": "69822000000206065",
"section_name": "zp.customfields.defaulttimesheetsection",
"customfield_details": [
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000073013",
"column_name": "LOGDATE",
"is_mandatory": true,
"is_default": true,
"display_name": "zp.general.date",
"column_type": "date"
},
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000073011",
"column_name": "USER",
"is_mandatory": true,
"is_default": true,
"display_name": "zp.general.user",
"column_type": "userpicklist"
},
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000073019",
"column_name": "DAILYLOG",
"is_mandatory": true,
"is_default": true,
"display_name": "zp.loghourrestriction.dailylog",
"column_type": "decimal"
},
{
"picklist_details": [
"zp.timesheet.billable",
"zp.timesheet.nonbillable"
],
"picklist_usermap": [],
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000073017",
"column_name": "BILLING",
"default_value": "zp.timesheet.billable",
"is_mandatory": false,
"is_default": true,
"display_name": "zp.timesheet.taskbill",
"column_type": "picklist"
},
{
"picklist_details": [
"zp.timesheet.approved",
"zp.timesheet.unapproved",
"zp.timesheet.rejected"
],
"picklist_usermap": [],
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000073021",
"column_name": "APPROVAL",
"is_mandatory": false,
"is_default": true,
"display_name": "zp.customfields.approval",
"column_type": "picklist"
},
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000073023",
"column_name": "LOGCOST",
"is_mandatory": false,
"is_default": true,
"display_name": "zp.formulaDefault.logcost",
"column_type": "decimal"
},
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000760039",
"column_name": "UDF_LONG4",
"is_mandatory": false,
"is_default": false,
"display_name": "number",
"column_type": "int"
},
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000073015",
"column_name": "LOGNOTES",
"is_mandatory": true,
"is_default": true,
"display_name": "Notes",
"column_type": "multiline"
}
],
"is_default": false
},
{
"section_id": "69822000000206067",
"section_name": "Untitled Section ",
"customfield_details": [
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000917052",
"column_name": "UDF_CHAR14",
"is_mandatory": false,
"is_default": false,
"display_name": "My Field",
"column_type": "singleline"
},
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000917050",
"column_name": "UDF_DATE4",
"is_mandatory": false,
"is_default": false,
"display_name": "My Date",
"column_type": "date"
},
{
"is_pii": false,
"is_encrypted": false,
"pcfid": "69822000000918013",
"column_name": "UDF_CHAR14",
"is_mandatory": false,
"is_default": false,
"display_name": "My Field",
"column_type": "singleline"
}
],
"is_default": false
}
],
"currency": "€"
}Get All Timesheet Custom Fields
Fetch all timesheet custom fields across the project
GET /restapi/portal/[PORTALID]/timesheetcustomfields
Scope: ZohoProjects.timesheets.READ
Sample Response
Status: 200 Success Content Type: application/json;charset=utf-8
{
"data_type": "plain_text",
"id": "69822000000187051",
"unique_column": "UDF_CHAR1",
"field_name": "My Single Line"
},
{
"data_type": "text",
"id": "69822000000187053",
"unique_column": "UDF_TEXT1",
"field_name": "My Multi Line"
},
{
"data_type": "double",
"id": "69822000000276001",
"unique_column": "UDF_DECIMAL1",
"field_name": "My Currency"
},
{
"data_type": "date",
"id": "69822000000291001",
"unique_column": "UDF_DATE1",
"field_name": "My Date"
}