v1

latestOpenAPI 3.1.02026-07-2422707.0 MB

Create Membership Advanced Booking Rules

This API Creates one or more membership advance booking rules for the organization. Each rule maps a membership to a specific class or amenity with a configured number of days in advance that the member can book. When multiple item_ids are supplied, one DB row is created per item_id in a single request.

post/v1/organizations/settings/membership_advance_booking_rules

Request body

membership_idsstring

List of membership IDs to which the booking rule applies. Cannot contain empty GUID values.

item_typestring

Type of item for which the rule is being created. Valid values: 0 (Class), 1 (Amenity).

item_idsstring

List of item identifiers. For classes (item_type=0), provide the class ID as a string (for example, "1001"). For amenities (item_type=1), provide the amenity GUID. One rule is created per item ID.

advance_booking_daysinteger

Number of days in advance that members can book. Must be greater than 0.

Response

200

OR

Example response

{
  "rule_ids": [
    "a1b2c3d4-1111-2222-3333-444444444444"
  ]
}