> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get one ResourceAccessRule

> Retrieve a single ResourceAccessRule record by its Id.

A **ResourceAccessRule** defines additional booking policies and restrictions for one or more `Resource`(s) or for all resources in a location (`Business`), scoped by date/time, customer, team, plan, or other criteria. Rules are evaluated in `EvaluationOrder` and can optionally stop further evaluation when matched (`StopEvaluationIfRuleIsMet`).

The booking-policy fields (`BookInAdvanceLimit`, `LateBookingLimit`, `LateCancellationLimit`, `IntervalLimit`, `MaxBookingLength`, `MinBookingLength`, `NoReturnPolicy*`, 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.

When `BusinessId` is set and `Resources` is empty, the rule applies to all resources in the business and its children (if any). When specific `Resources` are listed, the rule applies only to those resources.

### Scope: who the rule applies to

* `OnlyForMembers` / `OnlyForContacts` — quick toggles to limit the rule to members or contacts.
* `Tariffs` — pricing plans this rule applies to. When set, the rule only fires for customers on one of these plans.
* `Teams` — teams this rule applies to. When set, the rule only fires for members of one of these teams.
* `Courses` — the rule applies only to customers who have completed one of these courses.
* `EventCategories` — the rule applies only to customers who have attended (checked in to) an event in one of these categories.

### Scope: who is allowed to book when the rule fires

* `AllowedTariffs` — only customers on one of these plans are allowed to book when the rule applies to them.
* `AllowedTeams` — only members of one of these teams are allowed to book when the rule applies to them.

### List mutation helpers

For each list field (`Tariffs`, `AllowedTariffs`, `Teams`, `AllowedTeams`, `Members`, `EventCategories`, `Courses`) there are `Added*` and `Removed*` variants that append or remove entries on update without replacing the full list.

## Authentication

<Note>
  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-Read`** role.
</Note>

## Path Parameters

<ParamField path="id" type="integer" required>
  The Id of the ResourceAccessRule record to retrieve.
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/spaces/resourceaccessrules/87654321" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/spaces/resourceaccessrules/87654321',
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const record = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/spaces/resourceaccessrules/87654321',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  record = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="BusinessId" type="integer">
  Business Id.
</ResponseField>

<ResponseField name="Resources" type="integer[]">
  Resources.
</ResponseField>

<ResponseField name="Name" type="string">
  Rule name.
</ResponseField>

<ResponseField name="Active" type="boolean">
  Whether this rule is currently active and evaluated during booking..
</ResponseField>

<ResponseField name="OnlyForContacts" type="boolean">
  When true, this rule applies only to contacts (non-member customers)..
</ResponseField>

<ResponseField name="ApplyRuleFrom" type="string">
  Date from which this rule starts being evaluated. Null means no start-date restriction..
</ResponseField>

<ResponseField name="ApplyRuleTo" type="string">
  Date after which this rule stops being evaluated. Null means no end-date restriction..
</ResponseField>

<ResponseField name="BookInAdvanceLimit" type="number">
  Maximum number of days in advance a booking can be made. Null means no limit..
</ResponseField>

<ResponseField name="LateBookingLimit" type="number">
  Minimum lead time (in minutes) required before a booking can start. Prevents last-minute bookings..
</ResponseField>

<ResponseField name="LateCancellationLimit" type="integer">
  Cut-off in minutes before the booking start time. Cancellations after this point are considered late and may incur a fee..
</ResponseField>

<ResponseField name="IntervalLimit" type="integer">
  Minimum interval (in minutes) between consecutive bookings on this resource, used as a buffer for setup or cleaning..
</ResponseField>

<ResponseField name="MaxBookingLength" type="integer">
  Maximum allowed duration for a single booking, in minutes..
</ResponseField>

<ResponseField name="MinBookingLength" type="integer">
  Minimum allowed duration for a single booking, in minutes..
</ResponseField>

<ResponseField name="AppliedResourcesCount" type="integer">
  Applied Resources Count.
</ResponseField>

<ResponseField name="NoReturnPolicy" type="integer">
  Cooldown in minutes: prevents the same user from booking this specific resource again within this window after their last booking ends..
</ResponseField>

<ResponseField name="NoReturnPolicyAllResources" type="integer">
  Cooldown in minutes: prevents the same user from booking any resource after booking this one, for the specified window\..
</ResponseField>

<ResponseField name="NoReturnPolicyAllUsers" type="integer">
  Cooldown in minutes: prevents any user from booking this resource within the specified window after the previous booking ends..
</ResponseField>

<ResponseField name="RejectWithMessage" type="string">
  Message shown to the user when their booking is rejected by this rule..
</ResponseField>

<ResponseField name="OnlyForMembers" type="boolean">
  When true, this rule applies only to active members (coworkers with a plan)..
</ResponseField>

<ResponseField name="Tariffs" type="integer[]">
  Tariffs.
</ResponseField>

<ResponseField name="AllowedTariffs" type="integer[]">
  Allowed Tariffs.
</ResponseField>

<ResponseField name="Members" type="integer[]">
  Members.
</ResponseField>

<ResponseField name="Teams" type="integer[]">
  Teams.
</ResponseField>

<ResponseField name="AllowedTeams" type="integer[]">
  Allowed Teams.
</ResponseField>

<ResponseField name="EventCategories" type="integer[]">
  Event Categories.
</ResponseField>

<ResponseField name="Courses" type="integer[]">
  Courses.
</ResponseField>

<ResponseField name="EvaluationOrder" type="integer">
  Order in which this rule is evaluated relative to other rules on the same resource. Lower values are evaluated first..
</ResponseField>

<ResponseField name="StopEvaluationIfRuleIsMet" type="boolean">
  When true, no further rules are evaluated after this one matches..
</ResponseField>

<ResponseField name="CancellationFeeProductId" type="integer">
  Cancellation Fee Product Id.
</ResponseField>

<ResponseField name="CancellationFeeProductName" type="string">
  Name of the cancellation fee product (read-only, resolved from CancellationFeeProductId)..
</ResponseField>

<ResponseField name="ChargeCancellationFee" type="boolean">
  When true, a fee is charged for late cancellations (past the LateCancellationLimit)..
</ResponseField>

<ResponseField name="CancellationFeeType" type="integer">
  How the cancellation fee is calculated: Absolute (fixed amount) or Percentage (of booking cost)..
</ResponseField>

<ResponseField name="CancellationFeeAmount" type="number">
  Fixed cancellation fee amount. Used when CancellationFeeType is Absolute..
</ResponseField>

<ResponseField name="CancellationFeePercentage" type="number">
  Cancellation fee as a percentage of the booking cost. Used when CancellationFeeType is Percentage..
</ResponseField>

<ResponseField name="RepeatBookingQuantityLimit" type="integer">
  Maximum number of occurrences allowed when creating a recurring booking under this rule..
</ResponseField>

<ResponseField name="RepeatBookingPeriodLimitInMonths" type="integer">
  Maximum time span (in months) over which a recurring booking series can extend under this rule..
</ResponseField>

<ResponseField name="Id" type="integer">
  Unique record identifier.
</ResponseField>

<ResponseField name="UniqueId" type="string">
  UUID of the record.
</ResponseField>

<ResponseField name="CreatedOn" type="string">
  Date and time the record was created (ISO 8601).
</ResponseField>

<ResponseField name="UpdatedOn" type="string">
  Date and time the record was last updated (ISO 8601).
</ResponseField>

<ResponseField name="UpdatedBy" type="string">
  Email of the user who last updated this record.
</ResponseField>

<ResponseField name="IsNew" type="boolean">
  Whether the record was recently created.
</ResponseField>

<ResponseField name="SystemId" type="string">
  External system identifier.
</ResponseField>

```json Example Response theme={null}
{
  "BusinessId": 0,
  "Resources": [],
  "Name": "",
  "Active": false,
  "OnlyForContacts": false,
  "ApplyRuleFrom": null,
  "ApplyRuleTo": null,
  "BookInAdvanceLimit": null,
  "LateBookingLimit": null,
  "LateCancellationLimit": null,
  "IntervalLimit": null,
  "MaxBookingLength": null,
  "MinBookingLength": null,
  "AppliedResourcesCount": 0,
  "NoReturnPolicy": null,
  "NoReturnPolicyAllResources": null,
  "NoReturnPolicyAllUsers": null,
  "RejectWithMessage": null,
  "OnlyForMembers": false,
  "Tariffs": [],
  "AllowedTariffs": [],
  "Members": [],
  "Teams": [],
  "AllowedTeams": [],
  "EventCategories": [],
  "Courses": [],
  "EvaluationOrder": 0,
  "StopEvaluationIfRuleIsMet": false,
  "CancellationFeeProductId": null,
  "CancellationFeeProductName": null,
  "ChargeCancellationFee": false,
  "CancellationFeeType": 0,
  "CancellationFeeAmount": null,
  "CancellationFeePercentage": null,
  "RepeatBookingQuantityLimit": null,
  "RepeatBookingPeriodLimitInMonths": null,
  "Id": 87654321,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "CreatedOn": "2025-01-10T08:00:00Z",
  "UniqueId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "UpdatedBy": "admin@example.com",
  "IsNew": false,
  "SystemId": null,
  "ToStringText": "ResourceAccessRule Example",
  "LocalizationDetails": null,
  "CustomFields": null
}
```
