Skip to main content
POST
Create ResourceAccessRule
A ResourceAccessRule defines overriding booking policies and restrictions for one or more resources or for all resources in a location, scoped by date/time, customer, team, plan, or other criteria. Rules are evaluated in EvaluationOrder and can optionally stop further evaluation when matched (StopEvaluationIfRuleIsMet). When a rule matches, it overrides the resource-level booking policies and restrictions for that booking. The booking-policy fields (BookInAdvanceLimit, LateBookingLimit, LateCancellationLimit, IntervalLimit, MaxBookingLength, MinBookingLength, NoReturnPolicy fields, cancellation-fee fields, and repeat-booking limits) mirror those on Resource and carry the same semantics — they override the resource-level defaults when the rule matches. SCOPE: When the rule is connected to a Business and NO Resources are selected, it applies to ALL resources within that business AND all child businesses. When the rule is connected to one or more specific Resources, it applies ONLY to those resources. Use scope fields (OnlyForMembers, OnlyForContacts, Tariffs, Teams, Members, Courses, EventCategories) to control who the rule applies to, and allowed fields (AllowedTariffs, AllowedTeams) to control who can book when the rule fires.

Authentication

This endpoint requires OAuth2 authentication. Include a valid bearer token in the Authorization header. The authenticated user must be a full unrestricted administrator or have the ResourceAccessRule-Create role.

Enums

Request Body

Required Fields

integer
required
ID of the location linked to this rule.
string
required
Rule name.
integer
required
Count of resources this rule is currently applied to (read-only).
integer
required
Order in which this rule is evaluated relative to other rules on the same resource. Lower values are evaluated first.
integer
required
How the cancellation fee is calculated: Absolute (fixed amount) or Percentage (of booking cost). Defaults to eCancellationFeeType.Absolute.

Optional Fields

integer[]
List of specific resources this rule applies to. When empty and BusinessId is set, applies to all resources in that location and all child locations. When one or more resources are specified, applies only to those specific resources.
boolean
Whether this rule is currently active and evaluated during booking.
boolean
When true, this rule applies only to contacts (non-member customers).
string
Date from which this rule starts being evaluated. Null means no start-date restriction.
string
Date after which this rule stops being evaluated. Null means no end-date restriction.
integer
Apply this rule only if the booking is within this many minutes of its start time.
integer
Apply this rule only if the booking is more than this many minutes away from its start time.
number
Apply this rule only if the booking price is at least this amount.
number
Apply this rule only if the booking price does not exceed this amount.
number
Maximum number of hours in advance a booking can be made. Null means no limit.
number
Minimum lead time (in hours) required before a booking can start. Prevents last-minute bookings.
integer
Cut-off in minutes before the booking start time. Cancellations after this point are considered late and may incur a fee.
integer
Minimum interval (in minutes) between consecutive bookings on this resource, used as a buffer for setup or cleaning.
integer
Maximum allowed duration for a single booking, in minutes.
integer
Minimum allowed duration for a single booking, in minutes.
integer
Cooldown in minutes: prevents the same user from booking this specific resource again within this window after their last booking ends.
integer
Cooldown in minutes: prevents the same user from booking any resource after booking this one, for the specified window.
integer
Cooldown in minutes: prevents any user from booking this resource within the specified window after the previous booking ends.
string
Message shown to the user when their booking is rejected by this rule.
boolean
When true, this rule applies only to active members (coworkers with a plan).
integer[]
List of pricing plans this rule applies to. When set, the rule only fires for customers on one of these plans.
integer[]
Only customers on one of these pricing plans are allowed to book when the rule applies to them.
integer[]
Specific customers this rule applies to. When set, the rule only fires for these customers.
integer[]
Teams this rule applies to. When set, the rule only fires for members of one of these teams.
integer[]
Only members of one of these teams are allowed to book when the rule applies to them.
integer[]
The rule applies only to customers who have attended (checked in to) an event in one of these categories.
integer[]
The rule applies only to customers who have completed one of these courses.
boolean
When true, no further rules are evaluated after this one matches.
integer
Product to charge for late cancellations when ChargeCancellationFee is true.
boolean
When true, a fee is charged for late cancellations (past the LateCancellationLimit).
number
Fixed cancellation fee amount. Used when CancellationFeeType is Absolute.
number
Cancellation fee as a percentage of the booking cost. Used when CancellationFeeType is Percentage.
integer
Maximum number of occurrences allowed when creating a recurring booking under this rule.
integer
Maximum time span (in months) over which a recurring booking series can extend under this rule.

Children

object[]
Time slots defining when this rule applies (eligibility windows). The year, month and day component of FromTime/ToTime is always 1976-01-01.
object[]
The days and times the resources can be booked when this rule applies. The year, month and day component of FromTime/ToTime is always 1976-01-01.

Code Examples

Response

200

integer
HTTP status code. 200 on success.
string
A human-readable message confirming the creation.
object
Contains the Id of the newly created record.
boolean
true if the resourceaccessrule was created successfully.
array
null on success.
Example Response

400

string
A summary of the validation error(s), in the format PropertyName: error message.
any
null on validation failure.
object[]
Array of validation errors.
boolean
false when the request fails validation.
Example Response