Call Handling API PATCH - Auto Receptionist Business Hours Update Defect

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."
}

Hi @dylan.lewis
Thanks for reaching out to us!
I have seen a similar issue to this. Could you try passing 23:59?
Sometimes, the behavior of our API is not 100% the same as the browser.

Hi Elisa, using 23:59 close time is exactly what I’ve done as a workaround, but this endpoint should be able to accept 00:00 and designate it as midnight of the following day.

We have downstream automations that use the store open/close time from the auto receptionists to generate greeting prompts including hours among other things. I have workarounds in place to make these work as expected as well, but long-term we need this endpoint to be able to accept 00:00 as a close time.

Hi @dylan.lewis
I understand what you are saying.
Could you please open up a feature request here:

And tag me on it so I can follow up with our Engineering team?
Cheers,
Elisa