Issue Creating Booking for Course using Schedule

Question:
I have a service in Wix Bookings that I’m trying to add a booking for and then add it to the cart. However, I get an error unless I pick a specific slot. I want to do it for the entire course. Not a specific slot.

Product:
Wix Editor / Wix Bookings

What are you trying to achieve:
Similar to: https://www.wix.com/velo/example/custom-book-flow-on-booking-v2 - however my service is a “COURSE” type, not a booking one.

What have you already tried:
I used the below code:

import {bookings} from 'wix-bookings.v2'
import {elevate} from 'wix-auth'

const createBooking = elevate(bookings.createBooking)

const bookingObject = {
        totalParticipants: 1,
        bookingSource: {
            actor: "CUSTOMER",
            platform: "WEB"
        },
        contactDetails: {
            firstName: currentMemberDetails.contactDetails.firstName,
            lastName: currentMemberDetails.contactDetails.lastName,
            email: currentMemberDetails.loginEmail
        },
        "additionalFields": [{
            "id": "d62490a9-30a8-4235-bc3f-ed052ed6ea04",
            "value": studentId,
        }, ],
        bookedEntity: {
            tags: ["COURSE"],
            schedule: {
                scheduleId: serviceId,
                serviceId: serviceId,
                timezone: "America/New_York"
            }
        },
        status: "CONFIRMED"
    }

    console.log('about to create with booking object: ', bookingObject)

    const response = await createBooking(bookingObject, { sendSmsReminder: false })

But it produces the error:

message: 'Can\'t validate schedule availability for schedule a9076891-f4c2-4211-8507-4188f193fe96 due to FAILED_PRECONDITION: Failed to validate schedule availability: status: FailedPrecondition, code: FAILED_RESOLVING_SCHEDULE, description: Failed resolving schedule a9076891-f4c2-4211-8507-4188f193fe96 when validating schedule availability'
details:
applicationError:
description: 'Can\'t validate schedule availability for schedule a9076891-f4c2-4211-8507-4188f193fe96 due to FAILED_PRECONDITION: Failed to validate schedule availability: status: FailedPrecondition, code: FAILED_RESOLVING_SCHEDULE, description: Failed resolving schedule a9076891-f4c2-4211-8507-4188f193fe96 when validating schedule availability'
code: FAILED_VALIDATING_AVAILABILITY
data: {}"

If I replace the schedule with a specific slot under BookedEntity, it works fine, and I don’t get the error.

Additional information:
Looking for clarity on how to implement signing up for the course without signing up for a specific “slot” - the same as if I used the default registration for booking a “Course” through the UI.

The issue is here where it’s currently sending a Service ID rather than the expected Schedule ID.

@anthony, when I ran a wixData query on schedules, the scheduleId was always the same as the serviceId. Just to make sure though, I copied and pasted a scheduleId into it and it gave me the same error (because the scheduleId in my experience always matches the serviceId). Thanks for your help.

This does appear to be a bug and the team is on it!