API Endpoint(s) and/or Zoom API Event(s)
PATCH call handling settings endpoint
Description
Endpoint listed above does not allow updates via API with data like:
{
"settings": {
"custom_hours_settings": [
{
"weekday": 6,
"type": 2,
"from": "05:00",
"to": "00:00"
}
],
"type": 2
},
"sub_setting_type": "custom_hours"
}
In this scenario we want to update an Auto Receptionist to have business hours from 5am to 12am (Black Friday store hours), but when submitting the data above via API to the endpoint mentioned, the following error is returned:
{
"code": 400,
"message": "Invalid customer hours from/to time for weekday: 6."
}
I believe this is due to 00:00 being “before” 05:00, but there doesn’t seem to be a way to designate that 00:00 in this case should be the morning of the following day and therefore after 05:00 of the current day. When setting these hours in the web console, there is a designation for hours of the following day (see screenshot), but again I’m not sure if this is possible via API.
This issue caused production impact for all 1160+ of our sites, and is a high priority for us to resolve.
How To Reproduce
import requests
import json
url = "https://api.zoom.us/v2/phone/extension/{your auto receptionist extension ID here}/call_handling/settings/business_hours"
payload = json.dumps({
"settings": {
"custom_hours_settings": [
{
"weekday": 6,
"type": 2,
"from": "05:00",
"to": "00:00"
}
],
"type": 2
},
"sub_setting_type": "custom_hours"
})
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {your token here}'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
above code will return
{
"code": 400,
"message": "Invalid customer hours from/to time for weekday: 6."
}