# Call Handling API PATCH - Auto Receptionist Business Hours Update Defect

**URL:** <https://devforum.zoom.us/t/call-handling-api-patch-auto-receptionist-business-hours-update-defect/99079>\
**Category:** Phone\
**Tags:** api\
**Created:** [November 27, 2023, 3:18pm UTC](https://devforum.zoom.us/t/call-handling-api-patch-auto-receptionist-business-hours-update-defect/99079 "2023-11-27T15:18:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dylan.lewis](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dylan.lewis/32/47764_2.png) [@dylan.lewis](https://devforum.zoom.us/u/dylan.lewis)\
**Post date:** [November 27, 2023, 3:18pm UTC](https://devforum.zoom.us/t/call-handling-api-patch-auto-receptionist-business-hours-update-defect/99079/1 "2023-11-27T15:18:30Z")

</div>

**API Endpoint(s) and/or Zoom API Event(s)**  
[PATCH call handling settings endpoint](https://developers.zoom.us/docs/zoom-phone/apis/#operation/updateCallHandling)

**Description**  
Endpoint listed above does not allow updates via API with data like:

```auto
{
    "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:

```auto
{
    "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.

 ![Screen Shot 2023-11-24 at 7.50.41 AM](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/c/6c40d97769bf0b802869e9924d8936b251b31063.png)

This issue caused production impact for all 1160+ of our sites, and is a high priority for us to resolve.

**How To Reproduce**

```auto
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

```auto
{
    "code": 400,
    "message": "Invalid customer hours from/to time for weekday: 6."
}

```

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [November 28, 2023, 10:19pm UTC](https://devforum.zoom.us/t/call-handling-api-patch-auto-receptionist-business-hours-update-defect/99079/2 "2023-11-28T22:19:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dylan.lewis](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/dylan.lewis/32/47764_2.png) [@dylan.lewis](https://devforum.zoom.us/u/dylan.lewis)\
**Post date:** [November 29, 2023, 3:07pm UTC](https://devforum.zoom.us/t/call-handling-api-patch-auto-receptionist-business-hours-update-defect/99079/3 "2023-11-29T15:07:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [December 1, 2023, 5:51pm UTC](https://devforum.zoom.us/t/call-handling-api-patch-auto-receptionist-business-hours-update-defect/99079/4 "2023-12-01T17:51:08Z")

</div>

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

> **[Feature Requests](https://devforum.zoom.us/c/feature-requests/23)**
>
> Have an API or SDK feature request? Share it here!

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