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.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Response Details

CreateMembershipAdvancedBookingRuleResponse

Json propertyData typeDescription
rule_idsListList of generated rule identifiers. One RuleId is returned for each membership rule created successfully.
violating_itemsListNames of classes or amenities that violate the master data advance booking configuration. Returned only when error code MAB002 occurs.
errorAPIV2ErrorModelError details. Returns null when the request succeeds.

APIV2ErrorModel

Json propertyData typeDescription
codestringError code indicating the type of validation or processing failure.
messagestringDescription of the error.

BookingRulesItemType

ValueNameDescription
0ClassRule applies to one or more classes.
1AmenityRule applies to one or more amenities.

Error Codes

Error CodeHTTP StatusDescription
GE002400 Bad RequestInvalid request input such as empty GUIDs, invalid item type, empty item list, or invalid advance booking days.
MAB001409 ConflictA booking rule already exists for the specified membership and class/amenity combination.
MAB002400 Bad RequestThe specified advance booking days conflict with the master data configuration of one or more selected classes or amenities.
GE403403 ForbiddenUser does not have permission to access this resource.
GE500500 Internal Server ErrorAn unexpected server error occurred while processing the request.
Body Params
string

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

string

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

string

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.

int32

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

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/plain