Edit a Time Sheet
Purpose
To update the time sheet of a service appointment.
Request URL
https://fsm.zoho.com/fsm/v1/Time_Sheets
Request Method
PUT
Scope
scope=ZohoFSM.modules.TimeSheets.UPDATE
Input JSON Parameters
Name | Description | Type | Mandatory |
id | The ID of the time sheet that you want to update. Use the id in the Timesheet key present in the List Time Sheets API response. | String | Yes |
Description | Any change you want to make to the description of the time sheet | String | |
Start_Date_Time | Any change you want to make to the start date and time of the time sheet. The value must be in the ISO format: YYYY-MM-DDThh:mm:ssTZD | DateTime | |
End_Date_Time | Any change you want to make to the end date and time of the time sheet.The value must be in the ISO format: YYYY-MM-DDThh:mm:ssTZD | DateTime | |
Service_Line_Items | The IDs of the service line items in the appointment for which you want to include in the time sheet. You can obtain this from the API response of Get a Service Appointment. The value that you need to use is the id in the Service_Line_Item key. Use the Service Line Item Name in the appointment to identify the service line item in the API response of Get a Service Appointment. | Array | Yes, when there are no service task line items for the service |
Service_Tasks_Line_Items | The IDs of the service task line items in the appointment for which you want to include in the time sheet. You can obtain this from the API response of Get a Service Appointment. The value that you need to use is the id in the Service_Task_Line_Item key. Use the Service Task Line Item Name in the appointment to identify the service task line item in the API response of Get a Service Appointment. | Array | Yes, if service tasks are present for the service. |
Sample Request
Copiedcurl --request PUT 'https://fsm.zoho.com/fsm/v1/Time_Sheets' \
--header 'Authorization: Zoho-oauthtoken 1000.26xxxxxxxxxx.xxxxxxxxxx0' \
--header 'content-type: application/json' \
--data "{"field1":"value1","field2":"value2"}"
Sample Input
Copied{
"data": [
{
"id": "1003000002333127",
"Service_Tasks_Line_Items": [
"1003000002329354"
]
}
]
}
Sample Response
Copied{
"data": [
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2025-01-22T17:56:12+05:30",
"Modified_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
},
"Created_Time": "2025-01-22T17:41:41+05:30",
"id": "1003000002333127",
"Created_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
}
},
"message": "record updated",
"status": "success"
}
]
}
Sample Error Response
Copied//If service tasks are present for the service, then atleast one service task of the service must be included
{
"code": "MANDATORY_KEY_NOTFOUND",
"details": {},
"message": "Atleast one service task must be selected.",
"status": "error"
}