Skip to main content
PUT
/
api
/
spaces
/
resourceaccessrules
Update ResourceAccessRule
curl --request PUT \
  --url https://spaces.nexudus.com/api/spaces/resourceaccessrules \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "Id": 123,
  "BusinessId": 123,
  "Name": "<string>",
  "AppliedResourcesCount": 123,
  "EvaluationOrder": 123,
  "CancellationFeeType": 123
}
'
{
  "Status": 123,
  "Message": "<string>",
  "Value": "<any>",
  "WasSuccessful": true,
  "Errors": [
    {
      "AttemptedValue": "<any>",
      "Message": "<string>",
      "PropertyName": "<string>"
    }
  ]
}

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.

Updates an existing ResourceAccessRule record. You must include the Id of the record to update along with all required fields.

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-Edit role.

Enums

ValueName
0None
1Absolute
2Percentage

Request Body

Required Fields

Id
integer
required
The Id of the ResourceAccessRule record to update.
BusinessId
integer
required
ID of the business linked to this record.
Name
string
required
Rule name.
AppliedResourcesCount
integer
required
The applied resources count value for this resource access rule.
EvaluationOrder
integer
required
Order in which this rule is evaluated relative to other rules on the same resource. Lower values are evaluated first..
CancellationFeeType
integer
required
How the cancellation fee is calculated: Absolute (fixed amount) or Percentage (of booking cost)..

Optional Fields

Resources
integer[]
List of resources linked to this record.
AddedResources
integer[]
The added resources value for this resource access rule.
RemovedResources
integer[]
The removed resources value for this resource access rule.
Active
boolean
Whether this rule is currently active and evaluated during booking..
OnlyForContacts
boolean
When true, this rule applies only to contacts (non-member customers)..
ApplyRuleFrom
string
Date from which this rule starts being evaluated. Null means no start-date restriction..
ApplyRuleTo
string
Date after which this rule stops being evaluated. Null means no end-date restriction..
BookInAdvanceLimit
number
Maximum number of days in advance a booking can be made. Null means no limit..
LateBookingLimit
number
Minimum lead time (in minutes) required before a booking can start. Prevents last-minute bookings..
LateCancellationLimit
integer
Cut-off in minutes before the booking start time. Cancellations after this point are considered late and may incur a fee..
IntervalLimit
integer
Minimum interval (in minutes) between consecutive bookings on this resource, used as a buffer for setup or cleaning..
MaxBookingLength
integer
Maximum allowed duration for a single booking, in minutes..
MinBookingLength
integer
Minimum allowed duration for a single booking, in minutes..
NoReturnPolicy
integer
Cooldown in minutes: prevents the same user from booking this specific resource again within this window after their last booking ends..
NoReturnPolicyAllResources
integer
Cooldown in minutes: prevents the same user from booking any resource after booking this one, for the specified window..
NoReturnPolicyAllUsers
integer
Cooldown in minutes: prevents any user from booking this resource within the specified window after the previous booking ends..
RejectWithMessage
string
Message shown to the user when their booking is rejected by this rule..
OnlyForMembers
boolean
When true, this rule applies only to active members (coworkers with a plan)..
Tariffs
integer[]
List of tariffs linked to this record.
AddedTariffs
integer[]
The added tariffs value for this resource access rule.
RemovedTariffs
integer[]
The removed tariffs value for this resource access rule.
AllowedTariffs
integer[]
List of allowed tariffs linked to this record.
AddedAllowedTariffs
integer[]
The added allowed tariffs value for this resource access rule.
RemovedAllowedTariffs
integer[]
The removed allowed tariffs value for this resource access rule.
Members
integer[]
List of members linked to this record.
AddedMembers
integer[]
The added members value for this resource access rule.
RemovedMembers
integer[]
The removed members value for this resource access rule.
Teams
integer[]
List of teams linked to this record.
AddedTeams
integer[]
The added teams value for this resource access rule.
RemovedTeams
integer[]
The removed teams value for this resource access rule.
AllowedTeams
integer[]
List of allowed teams linked to this record.
AddedAllowedTeams
integer[]
The added allowed teams value for this resource access rule.
RemovedAllowedTeams
integer[]
The removed allowed teams value for this resource access rule.
EventCategories
integer[]
List of event categories linked to this record.
AddedEventCategories
integer[]
The added event categories value for this resource access rule.
RemovedEventCategories
integer[]
The removed event categories value for this resource access rule.
Courses
integer[]
List of courses linked to this record.
AddedCourses
integer[]
The added courses value for this resource access rule.
RemovedCourses
integer[]
The removed courses value for this resource access rule.
StopEvaluationIfRuleIsMet
boolean
When true, no further rules are evaluated after this one matches..
CancellationFeeProductId
integer
ID of the cancellation fee product linked to this record.
ChargeCancellationFee
boolean
When true, a fee is charged for late cancellations (past the LateCancellationLimit)..
CancellationFeeAmount
number
Fixed cancellation fee amount. Used when CancellationFeeType is Absolute..
CancellationFeePercentage
number
Cancellation fee as a percentage of the booking cost. Used when CancellationFeeType is Percentage..
RepeatBookingQuantityLimit
integer
Maximum number of occurrences allowed when creating a recurring booking under this rule..
RepeatBookingPeriodLimitInMonths
integer
Maximum time span (in months) over which a recurring booking series can extend under this rule..

Children

EligibleTimeSlots
object[]
Time slots defining when this rule applies (eligibility windows). The year, month and day component of FromTime/ToTime is always 1976-01-01.
TimeSlots
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

curl -X PUT \
  "https://spaces.nexudus.com/api/spaces/resourceaccessrules" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "BusinessId": 0,
    "Name": "",
    "AppliedResourcesCount": 0,
    "EvaluationOrder": 0,
    "CancellationFeeType": 0,
    "Id": 87654321,
    "EligibleTimeSlots": [
        {
            "DayOfWeek": 0,
            "FromTime": "2025-01-15T10:30:00Z",
            "ToTime": "2025-01-15T10:30:00Z"
        }
    ],
    "TimeSlots": [
        {
            "DayOfWeek": 0,
            "FromTime": "2025-01-15T10:30:00Z",
            "ToTime": "2025-01-15T10:30:00Z"
        }
    ]
}'

Response

200

Status
integer
HTTP status code. 200 on success.
Message
string
A human-readable message confirming the update.
Value
object
Contains the Id of the updated record.
WasSuccessful
boolean
true if the resourceaccessrule was updated successfully.
Errors
array
null on success.
Example Response
{
  "Status": 200,
  "Message": "ResourceAccessRule was successfully updated.",
  "Value": {
    "Id": 87654321
  },
  "OpenInDialog": false,
  "OpenInWindow": false,
  "RedirectURL": null,
  "JavaScript": null,
  "UpdatedOn": "2025-01-15T10:30:00Z",
  "UpdatedBy": "admin@example.com",
  "Errors": null,
  "WasSuccessful": true
}

400

Message
string
A summary of the validation error(s), in the format PropertyName: error message.
Value
any
null on validation failure.
Errors
object[]
Array of validation errors.
WasSuccessful
boolean
false when the request fails validation.
Example Response
{
  "Message": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}