Open Booking
Open booking is a concept designed for multi-club organizations. It allows clubs to define agreements enabling members from Club A to book sessions in Club B.
What are the technical impacts?
Without open booking
Various endpoints are used to manage schedules and bookings:
/events
/attendees
/studios
/coaches
/activities
/showcase_activities
/clubs
Technical limitation
Open booking is only possible if the booking contact is identified.
Therefore, it is necessary to use the client_credentials
authentication mode for each of the following calls.
With open booking
The mechanism is strictly identical; only the endpoints change:
/events
becomes/club_network/class_events
(see appendix below)/attendees
becomes/club_network/attendees
https://doc.resamania.com/api/booking#operation/club_network_getAttendeeCollection/studios
becomes/club_network/studios
https://doc.resamania.com/api/club#operation/club_network_getStudioCollection/coaches
becomes/club_network/coaches
https://doc.resamania.com/api/club#operation/club_network_get_collectionCoachCollection/activities
becomes/club_network/activities
https://doc.resamania.com/api/booking#operation/club_network_getActivityCollection/showcase_activities
becomes/club_network/showcase_activities
https://doc.resamania.com/api/booking#operation/club_network_getShowcaseActivityCollection/clubs
becomes/club_network/clubs/
https://doc.resamania.com/api/club#operation/club_network_getClubCollection
Open booking or not? How to determine it?
As both modes coexist, it is important to know which set of endpoints to use.
Open booking is a club-level setting. It is determined by checking the response of GET /clubs
or GET /clubs/{id}
.
The club response contains the parameter sharingBookingClubs
to be interpreted as follows:
- If NULL or an empty array, the club is NOT using open booking
- If NOT NULL, the club IS using open booking
With which other clubs is booking shared?
Looking at the sharingBookingClubs
parameter, one might think it gives the full list of clubs. That's true, but it includes both clubs and groups of clubs. Therefore, interpretation is needed.
One API endpoint performs this interpretation for you and returns only the unitary clubs:GET /club_network_domain/sharingBooking
You must pass the IRI of the source club (same as the one used in the header, though not needed for this endpoint).
Technical appendices
Difference between /events
and /class_events
These two endpoints both allow you to fetch the class schedule, with different filtering capabilities.
The response format is strictly identical!
Only the /class_events
endpoint has been adapted for open booking.
It is therefore recommended to migrate all schedule-related operations to /class_events
, whether or not open booking is used.
API documentation snippet GET /{client_token}/club_network_domain/sharingBooking
Official documentation will be available soon on the online developer portal. In the meantime, here is what you need to know:
PATH PARAMETERS
Parameter (📌 = required) | Description |
---|---|
client_token 📌 | string |
QUERY PARAMETERS
Parameter (📌 = required) | Description |
---|---|
clubId 📌 | Club IRI (example: /myclub/clubs/1234) |
page | integer The collection page number |
itemsPerPage | integer The number of items per page (30 by default) |
API documentation snippet GET /{client_token}/club_network/class_events
Official documentation will be available soon on the online developer portal. In the meantime, here is what you need to know:
PATH PARAMETERS
Parameter (📌 = required) | Description |
---|---|
client_token 📌 | string |
QUERY PARAMETERS
Parameter (📌 = required) | Description |
---|---|
club | string |
club[] | Array of string |
coach | string |
coach[] | Array of string |
activity | string |
activity[] | Array of string |
activity.activityGroups | string |
activity.activityGroups[] | Array of string |
studio | string |
studio[] | Array of string |
attendees.contactId | string |
attendees.contactId[] | Array of string |
attendees.state | string |
attendees.state[] | Array of string |
startedAt[before] | string |
startedAt[strictly_before] | string |
startedAt[after] | string |
startedAt[strictly_after] | string |
order[startedAt] | string |
available | string |
time | string |
archived | string Enum:"0" "1" "false" "true" "no" "yes" "only" Example: "only". Apply a filter on archived resources. 0, false, no hides archived resources. 1, true, yes includes archived resources. only displays only archived resources |
page | integer The collection page number |
itemsPerPage | integer The number of items per page (30 by default) |