API Docs
Timesheets

Timesheets

Timesheets in Zoho Shifts can be used to record worked hours of your employees.

End Points
Get all time entries
Create a time entry
Get a time entry
Update a time entry
Delete a time entry

Get all time entries

Required OAuth Scope: ZohoShifts.timesheets.READ

Query Parameters

schedules
Comma separated schedule IDs to filter time entries by schedules.
status
Any of pending, approved to filter time entries by status.
employee_id
Filter time entries by employee.
start_date
(Required)
Start date of range in yyyy-mm-dd format.
end_date
(Required)
End date of range in yyyy-mm-dd format.
limit
The number of entries to return per page. Default: 50 Max: 100
page
The page number to fetch. Default: 1

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/timesheets -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "time_entries": [ { "id": "7238362363823", "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "employee_id": "7238362363823", "employee": "John Doe", "schedule_id": "7238362363823", "schedule": "Midtown", "position_id": "7238362363823", "position": "Barista", "job_site_id": "7238362363823", "job_site": "North Plaza", "type": "timeentry", "duration": 8.75, "break_duration": 1.5, "notes": "Notes for this time entry", "status": "pending", "timeoff_request_id": "7238362363823", "timeoff_type_id": "7238362363823", "timeoff_type": "Sick", "in_lat": 12.831082, "in_lng": 80.049353, "out_lat": 12.831082, "out_lng": 80.049353, "latitude": 12.831082, "longitude": 80.049353, "shift_id": "7238362363823", "breaks": [ { "break_id": "7238362363823", "break_name": "Meal Break", "duration_mins": 45, "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "is_paid": true } ] } ], "meta": { "count": 100, "limit": 50, "page": 1 } }

Create a time entry

Required OAuth Scope: ZohoShifts.timesheets.CREATE

Arguments

start_time
date-time
(Required)
Start time of the time entry
end_time
date-time
End time of the time entry
employee_id
string
(Required)
schedule_id
string
(Required)
position_id
string
(Required)
job_site_id
string
notes
string
shift_id
string
breaks
array
Show Sub-Attributes arrow
break_id
string
(Required)
duration_mins
int32
start_time
date-time
end_time
date-time

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/timesheets -X POST -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "employee_id": "7238362363823", "schedule_id": "7238362363823", "position_id": "7238362363823", "job_site_id": "7238362363823", "notes": "Notes for this time entry", "shift_id": "7238362363823", "breaks": [ { "break_id": "7238362363823", "duration_mins": 45, "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z" } ] }

Response Example

{ "id": "7238362363823", "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "employee_id": "7238362363823", "employee": "John Doe", "schedule_id": "7238362363823", "schedule": "Midtown", "position_id": "7238362363823", "position": "Barista", "job_site_id": "7238362363823", "job_site": "North Plaza", "type": "timeentry", "duration": 8.75, "break_duration": 1.5, "notes": "Notes for this time entry", "status": "pending", "timeoff_request_id": "7238362363823", "timeoff_type_id": "7238362363823", "timeoff_type": "Sick", "in_lat": 12.831082, "in_lng": 80.049353, "out_lat": 12.831082, "out_lng": 80.049353, "latitude": 12.831082, "longitude": 80.049353, "shift_id": "7238362363823", "breaks": [ { "break_id": "7238362363823", "break_name": "Meal Break", "duration_mins": 45, "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "is_paid": true } ] }

Get a time entry

Required OAuth Scope: ZohoShifts.timesheets.READ

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/timesheets/{id} -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "id": "7238362363823", "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "employee_id": "7238362363823", "employee": "John Doe", "schedule_id": "7238362363823", "schedule": "Midtown", "position_id": "7238362363823", "position": "Barista", "job_site_id": "7238362363823", "job_site": "North Plaza", "type": "timeentry", "duration": 8.75, "break_duration": 1.5, "notes": "Notes for this time entry", "status": "pending", "timeoff_request_id": "7238362363823", "timeoff_type_id": "7238362363823", "timeoff_type": "Sick", "in_lat": 12.831082, "in_lng": 80.049353, "out_lat": 12.831082, "out_lng": 80.049353, "latitude": 12.831082, "longitude": 80.049353, "shift_id": "7238362363823", "breaks": [ { "break_id": "7238362363823", "break_name": "Meal Break", "duration_mins": 45, "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "is_paid": true } ] }

Update a time entry

Required OAuth Scope: ZohoShifts.timesheets.UPDATE

Arguments

start_time
date-time
Start time of the time entry
end_time
date-time
End time of the time entry
employee_id
string
schedule_id
string
position_id
string
job_site_id
string
notes
string
shift_id
string
breaks
array
Show Sub-Attributes arrow
break_id
string
(Required)
duration_mins
int32
start_time
date-time
end_time
date-time

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/timesheets/{id} -X PUT -H "Content-Type: application/json;charset=UTF-8" -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f" -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "employee_id": "7238362363823", "schedule_id": "7238362363823", "position_id": "7238362363823", "job_site_id": "7238362363823", "notes": "Notes for this time entry", "shift_id": "7238362363823", "breaks": [ { "break_id": "7238362363823", "duration_mins": 45, "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z" } ] }

Response Example

{ "id": "7238362363823", "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "employee_id": "7238362363823", "employee": "John Doe", "schedule_id": "7238362363823", "schedule": "Midtown", "position_id": "7238362363823", "position": "Barista", "job_site_id": "7238362363823", "job_site": "North Plaza", "type": "timeentry", "duration": 8.75, "break_duration": 1.5, "notes": "Notes for this time entry", "status": "pending", "timeoff_request_id": "7238362363823", "timeoff_type_id": "7238362363823", "timeoff_type": "Sick", "in_lat": 12.831082, "in_lng": 80.049353, "out_lat": 12.831082, "out_lng": 80.049353, "latitude": 12.831082, "longitude": 80.049353, "shift_id": "7238362363823", "breaks": [ { "break_id": "7238362363823", "break_name": "Meal Break", "duration_mins": 45, "start_time": "2019-08-24T14:15:22Z", "end_time": "2019-08-24T14:15:22Z", "is_paid": true } ] }

Delete a time entry

Required OAuth Scope: ZohoShifts.timesheets.DELETE

Request Example

Click to copy
$ curl https://shifts.zoho.com/api/v1/{org_id}/timesheets/{id} -X DELETE -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "message": "Time entry deleted" }
© 2024, Zoho Corporation Pvt. Ltd. All Rights Reserved.