PUT - Update business hours profile

 

Purpose  

Use this API to update an existing business hours profile.

 

Authorization 

HeaderKey

Description

Authorization*

Zoho-oauthtoken<space><ACCESS_TOKEN>

Accept*

Set to application/json.

Request URL 

Method: PUT

https://voice.zoho.com/rest/json/zv/workday

Scope: ZohoVoice.telephony.UPDATE

Parameters:

Param Name

Data Type

Description

profileId*

Long

Represents the ID of an existing profile.

profileName*

String

Represents the name of the profile.

timezone*

String

Represents the timezone of the profile.

holidayPid

Long

Represents the ID of an existing holiday profile to be linked to this business hours profile.

emailId

String

Represents the email address to receive alerts when calls land outside the configured business hours.

hours*

JSONObject

Represents the business hours configured for each day of the week. Day "0" corresponds to Monday.

 

Sample Request Body:

{

"0":[ {"startTime":"09:00", "endTime":"17:00"}],

"1":[{"startTime":"09:00","endTime":"17:00"}],

"2":[{"startTime":"09:00","endTime":"17:00"}],

"3":[{"startTime":"09:00","endTime":"17:00"}],

"4":[{"startTime":"09:00","endTime":"17:00"}],

"5":[{"startTime":"09:00","endTime":"17:00"}],

"6":[{"startTime":"09:00","endTime":"17:00"}]

}

fallback*

JSONObject

Represents the fallback configuration for calls received outside the configured business hours.

 

Sample Request Body:

{
 "mode": "text",
 "message": "Hi there. Sorry, we could not pick your call. You have called outside our business hours. Please call later.",
 "config": {
   "name": "Default Action Handler",
   "busy": {
     "actionType": "group",
     "id": "910000002819000",
     "fallback": {
       "actionType": "voicemail",
       "mode": "text",
       "message": "Sorry, you've reached voicemail. Please leave a message."
     }
   },
   "offline": {
     "actionType": "group",
     "id": "910000002819000",
     "fallback": {
       "actionType": "voicemail",
       "mode": "text",
       "message": "Sorry, you've reached voicemail. Please leave a message."
     }
   }
 }
}

Sample Request

Copiedcurl "https://voice.zoho.com/rest/json/zv/workday" \
-X PUT \
--data-raw 'data=ENCODE({"profileId":"91000000418000","profileName":"US Weekday Hours", "emailId":"","timezone":"PST","holidayPid":"", "hours":{"0":[{"startTime":"09:00","endTime":"17:00"}],"1":[{"startTime":"09:00","endTime":"17:00"}],"2":[{"startTime":"09:00","endTime":"17:00"}],"3":[{"startTime":"09:00","endTime":"17:00"}],"4":[{"startTime":"09:00","endTime":"17:00"}],"5":[{"startTime":"09:00","endTime":"17:00"}],"6":[{"startTime":"09:00","endTime":"17:00"}]}, "fallback":{"mode":"text","audioId":"","message":"Hi there. Sorry, we could not pick your call. You have called outside our business hours. Please call later.","audioName":"","config":{"name":"Default Action Handler", "busy":{"actionType":"voicemail","mode":"text","message":"Sorry, you've reached voicemail. Please leave a message.","audioId":"","audioLanguage":"en-US","audioVoice":"2"},"offline":{"actionType":"voicemail","mode":"text","message":"Sorry, you've reached voicemail. Please leave a message.","audioId":"","audioLanguage":"en-US","audioVoice":"2"}},"audioLanguage":"en-US","audioVoice":"2"}})'

-H "Content-Type: application/json"
-H "Authorization:Zoho-oauthtoken *****"

Sample Response - Success

Copied{
  "code": "200",
  "message": "success",
  "status": "SUCCESS"
}

Sample Response - Error

Copied{
  "status": "ERROR",
  "code": "ZVT0095",
  "message": "Start time must be earlier than end time."
}