Edit a Time Off
Purpose
To update a time off record.
Request URL
https://fsm.zoho.com/fsm/v1/Time_Off/<record_id>
record_id - The unique ID of the record. You can obtain this ID from the List Time Offs API.
Request Method
PUT
Scope
scope=ZohoFSM.modules.TimeOff.UPDATE
Input JSON Parameters
Name | Description | Type |
Service_Resource | The ID provided should be of the user for whom the time off is created, else you will get an error response. | String |
Time_Off_Type | The possible values are:
Mandatory, if Start_Date_Time and End_Date_Time are provided | String |
Start_Date_Time | If the value for Time_Off_Type is - Date: Provide the start date for the time off in the format YYYY-MM-DD - DateTime: Provide the start date and time for the time off in the ISO format YYYY-MM-DDThh:mm:ssTZD. Mandatory if End_Date_Time is provided. | String or DateTime |
End_Date_Time | If the value for Time_Off_Type is - Date: Provide the end date for the time off in the format YYYY-MM-DD - DateTime: Provide the end date and time for the time off in the ISO format YYYY-MM-DDThh:mm:ssTZD. Mandatory if Start_Date_Time is provided | String or DateTime |
Sample Request
Copiedcurl --request PUT 'https://fsm.zoho.com/fsm/v1/Time_Off/1003000001496159' \
--header 'Authorization: Zoho-oauthtoken 1000.3xxxxxxxxx.xxxxxxxxxxxxx0e'
--header 'content-type: application/json' \
--data "{"field1":"value1","field2":"value2"}"
Sample Input
Copied{
"data": [
{
"Time_Off_Type": "Date",
"Start_Date_Time": "2024-04-04",
"End_Date_Time": "2024-04-05"
}
]
}
Sample Response
Copied{
"data": [
{
"code": "SUCCESS",
"details": {
"Modified_Time": "2024-04-02T17:43:25+05:30",
"Modified_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
},
"Created_Time": "2024-04-02T15:55:05+05:30",
"id": "1003000001496159",
"Created_By": {
"name": "Marianne Sheehan",
"id": "1003000000208001"
}
},
"message": "record updated",
"status": "success"
}
]
}
Sample Error Response
Copied{
"data": [
{
"code": "INVALID_DATA",
"details": {},
"message": "You can't change the service resource id on record update.",
"status": "error"
}
]
}