Updating Scheduler PATCH/scheduler/schedules/{scheduleId} returns 400 when updating availability rule containing time for Wednesday

API Endpoint(s) and/or Zoom API Event(s)

Patch schedules​

PATCH /scheduler/schedules/{scheduleId}

Description
When updating a scheduler through the API, we were experiencing unusual 400 responses and we were not able to identify where for days. Accidentally we figured out that it was on the availability_rules section of the payload. Specifically segments_recurrence. When sending a recurrence for any day other than Wednesday, it works correctly. But when sending for Wednesday (being only Wednesday, or alongside any other weekday) it returns an error of 400 Bad Request. This is an oddly specific error, yet very critical for basic use of the scheduler, as it is impossible to update a Scheduler booking page that contains the day Wednesday.

Error
Request returns with 400 Bad Request and does not update the Scheduelr booking page.

How To Reproduce
Steps to reproduce the behavior:
1. Send a PATCH request to /scheduler/schedules/{scheduleId}
cURL Example:

curl --location --request PATCH 'https://api.zoom.us/v2/scheduler/schedules/{schedule_id}?user_id={user_id}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {bearer_token}' \
--data-raw '{
  "add_on_type": "zoomMeeting",
  "availability_override": false,
  "availability_rules": [
    {
      "email": "{user_id}@scheduler.zoom.us",
      "time_zone": "America/New_York",
      "use_custom": true,
      "segments_recurrence": {
        "mon": [{ "start": "09:00", "end": "11:30" }],
        "tue": [{ "start": "08:00", "end": "10:30" }],
        "wed": [{ "start": "09:00", "end": "17:00" }],
        "thu": [{ "start": "09:00", "end": "17:00" }],
        "fri": [{ "start": "09:00", "end": "17:00" }],
        "sat": [{ "start": "09:00", "end": "17:00" }],
        "sun": [{ "start": "09:00", "end": "17:00" }]
      }
    }
  ],
  "booking_limit": 0,
  "buffer": { "after": 0, "before": 0 },
  "capacity": 1,
  "color": "#fff200",
  "cushion": 0,
  "custom_fields": [
    {
      "enabled": true,
      "format": "text",
      "include_other": false,
      "name": "Please share anything that will help prepare for our meeting.",
      "position": 0,
      "required": false,
      "answer_choices": ["on-site"]
    }
  ],
  "description": "Follow-Up",
  "duration": 45,
  "end_date": "2023-12-28",
  "time_zone": "America/New_York",
  "location": "location abc",
  "interval_type": "unlimited",
  "secret": true,
  "slug": "follow-up",
  "start_date": "2023-12-21",
  "start_time_increment": 30,
  "summary": "Summary example",
  "schedule_type": "one",
  "active": true
}
'

2. Authentication method or app type
Request done with a bearer token with grant_type: account_credentials with Admin permissions on a Server-to-Server applications. The application includes scope scheduler:update:patch_schedule:admin
3. Any errors

{
    "error": {
        "code": 400,
        "errors": [
            {
                "appCode": 0,
                "domain": "global",
                "message": "Invalid request body",
                "reason": "invalidArgument"
            }
        ],
        "message": "Invalid request body",
        "reqId": "ZMAIL_6502e4c48b35bbbb1eb537c70db7983d",
        "status": "INVALID_ARGUMENT"
    }
}

Additional Information
If the following segment_recurrence objects are used instead in the availability_rules, the request returns 200 and the update is successfully made. Any combination of days of week works regardless of order as long as they are all lowercase, three letter abbreviation, and wed (Wednesday) is not included as one of the weekdays.

"segments_recurrence": {
    "mon": [{ "start": "09:00", "end": "11:30" }]
  }
"segments_recurrence": {
    "thu": [{ "start": "09:00", "end": "17:00" }],
    "sat": [{ "start": "09:00", "end": "17:00" }],
    "sun": [{ "start": "09:00", "end": "17:00" }]
  }
"segments_recurrence": {
    "thu": [{ "start": "09:00", "end": "17:00" }],
    "mon": [{ "start": "09:00", "end": "11:30" }],
    "fri": [{ "start": "09:00", "end": "17:00" }],
    "sun": [{ "start": "09:00", "end": "17:00" }],
    "tue": [{ "start": "08:00", "end": "10:30" }],
    "sat": [{ "start": "09:00", "end": "17:00" }]
  }

Hi @daniel.suazo
Thanks so much for reporting this.
I was able to replicate this on my end and reported this to our Engineering team ( ZSEE-151486 internal ticket number for reference)
I will get back to you as soon as I have an update

1 Like

Thanks @elisa.zoom

Please do report back with any updates when you have them. We have little workarounds for this and need to be able to update schedulers through the API for our business.
Thanks again!

Hi @daniel.suazo
I appreciate your patience here!
This has been identified as a bug and it will be fixed during this week’s release.

2 Likes

Hi @elisa.zoom

I just validated and it has been fixed. Thanks a lot for the timely resolution!

1 Like

Thank you for reporting this! @daniel.suazo

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.