> ## 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.

# Update Resource

> Update an existing Resource record.

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

## 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 **`Resource-Edit`** role.
</Note>

## Enums

<Accordion title="eResourceType — SystemResourceType values">
  | Value | Name          |
  | ----- | ------------- |
  | 0     | None          |
  | 1     | MeetingRoom   |
  | 2     | HotDesk       |
  | 3     | PrivateOffice |
  | 4     | EventSpace    |
  | 5     | Lab           |
  | 6     | Kitchen       |
  | 7     | TreatmentRoom |
  | 9     | StorageUnit   |
  | 10    | Machine       |
  | 11    | DayPass       |
  | 12    | PhoneBooth    |
  | 99    | Other         |
</Accordion>

<Accordion title="eCancellationFeeType — CancellationFeeType values">
  | Value | Name       |
  | ----- | ---------- |
  | 0     | None       |
  | 1     | Absolute   |
  | 2     | Percentage |
</Accordion>

## Request Body

### Required Fields

<ParamField body="Id" type="integer" required>
  The Id of the Resource record to update.
</ParamField>

<ParamField body="BusinessId" type="integer" required>
  Business Id.
</ParamField>

<ParamField body="Name" type="string" required>
  Display name of the resource (e.g., 'Board Room A', 'Phone Booth 3')..
</ParamField>

<ParamField body="SystemResourceType" type="integer" required>
  Built-in resource category used for system behaviour (e.g., MeetingRoom, HotDesk, PhoneBooth). Distinct from the custom ResourceType..
</ParamField>

<ParamField body="ResourceTypeId" type="integer" required>
  Resource Type Id.
</ParamField>

<ParamField body="DisplayOrder" type="integer" required>
  Sort position when listing resources. Lower values appear first..
</ParamField>

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

### Optional Fields

<ParamField body="Description" type="string">
  Free-text description shown to users when viewing the resource details..
</ParamField>

<ParamField body="NewPictureUrl" type="string">
  New Picture Url.
</ParamField>

<ParamField body="ClearPictureFile" type="boolean">
  Clear Picture File.
</ParamField>

<ParamField body="EmailConfirmationContent" type="string">
  Custom HTML or text included in booking confirmation emails for this resource..
</ParamField>

<ParamField body="Visible" type="boolean">
  Whether the resource is visible and bookable by end users. Hidden resources can still be booked by admins..
</ParamField>

<ParamField body="RequiresConfirmation" type="boolean">
  When true, bookings for this resource are held as pending until an admin approves them..
</ParamField>

<ParamField body="GroupName" type="string">
  Optional grouping label used to cluster related resources together in the UI (e.g., 'Floor 2')..
</ParamField>

<ParamField body="Projector" type="boolean">
  Amenity flag: resource has a projector..
</ParamField>

<ParamField body="Internet" type="boolean">
  Amenity flag: resource has internet access..
</ParamField>

<ParamField body="ConferencePhone" type="boolean">
  Amenity flag: resource has a conference phone..
</ParamField>

<ParamField body="StandardPhone" type="boolean">
  Amenity flag: resource has a standard phone..
</ParamField>

<ParamField body="WhiteBoard" type="boolean">
  Amenity flag: resource has a whiteboard..
</ParamField>

<ParamField body="LargeDisplay" type="boolean">
  Amenity flag: resource has a large display..
</ParamField>

<ParamField body="Catering" type="boolean">
  Amenity flag: catering is available for this resource..
</ParamField>

<ParamField body="TeaAndCoffee" type="boolean">
  Amenity flag: tea and coffee are available..
</ParamField>

<ParamField body="Drinks" type="boolean">
  Amenity flag: drinks are available..
</ParamField>

<ParamField body="SecurityLock" type="boolean">
  Amenity flag: resource has a security lock..
</ParamField>

<ParamField body="CCTV" type="boolean">
  Amenity flag: resource has CCTV coverage..
</ParamField>

<ParamField body="VoiceRecorder" type="boolean">
  Amenity flag: resource has a voice recorder..
</ParamField>

<ParamField body="AirConditioning" type="boolean">
  Amenity flag: resource has air conditioning..
</ParamField>

<ParamField body="Heating" type="boolean">
  Amenity flag: resource has heating..
</ParamField>

<ParamField body="NaturalLight" type="boolean">
  Amenity flag: resource has natural light..
</ParamField>

<ParamField body="StandingDesk" type="boolean">
  Amenity flag: resource has a standing desk..
</ParamField>

<ParamField body="QuietZone" type="boolean">
  Amenity flag: resource is located in a quiet zone..
</ParamField>

<ParamField body="WirelessCharger" type="boolean">
  Amenity flag: resource has a wireless charger..
</ParamField>

<ParamField body="PrivacyScreen" type="boolean">
  Amenity flag: resource has a privacy screen..
</ParamField>

<ParamField body="Soundproof" type="boolean">
  Amenity flag: resource is soundproof..
</ParamField>

<ParamField body="VideoConferencing" type="boolean">
  Amenity flag: resource has video conferencing equipment..
</ParamField>

<ParamField body="DualDisplayScreen" type="boolean">
  Amenity flag: resource has a dual display screen..
</ParamField>

<ParamField body="DisplayScreen" type="boolean">
  Amenity flag: resource has a display screen..
</ParamField>

<ParamField body="WirelessPresentation" type="boolean">
  Amenity flag: resource has wireless presentation capabilities..
</ParamField>

<ParamField body="PaSystem" type="boolean">
  Amenity flag: resource has a PA system..
</ParamField>

<ParamField body="DesktopMonitor" type="boolean">
  Amenity flag: resource has a desktop monitor..
</ParamField>

<ParamField body="FlipChart" type="boolean">
  Amenity flag: resource has a flip chart..
</ParamField>

<ParamField body="SecureStorage" type="boolean">
  Amenity flag: resource has secure storage..
</ParamField>

<ParamField body="AllowMultipleBookings" type="boolean">
  When true, overlapping bookings are permitted up to the Allocation capacity..
</ParamField>

<ParamField body="Allocation" type="integer">
  Maximum number of attendees or concurrent bookings allowed. Used with AllowMultipleBookings to control capacity..
</ParamField>

<ParamField body="LimitVisitorsToAllocation" type="boolean">
  When true, the total number of visitors added to a booking cannot exceed the Allocation capacity..
</ParamField>

<ParamField body="BookInAdvanceLimit" type="number">
  Maximum number of days in advance a booking can be made for this resource. Null means no limit..
</ParamField>

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

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

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

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

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

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

<ParamField body="MaxBookingLength" type="integer">
  Maximum allowed duration for a single booking on this resource, in minutes..
</ParamField>

<ParamField body="MinBookingLength" type="integer">
  Minimum allowed duration for a single booking on this resource, in minutes..
</ParamField>

<ParamField body="Tariffs" type="integer[]">
  Tariffs.
</ParamField>

<ParamField body="AddedTariffs" type="integer[]">
  Added Tariffs.
</ParamField>

<ParamField body="RemovedTariffs" type="integer[]">
  Removed Tariffs.
</ParamField>

<ParamField body="Teams" type="integer[]">
  Teams.
</ParamField>

<ParamField body="AddedTeams" type="integer[]">
  Added Teams.
</ParamField>

<ParamField body="RemovedTeams" type="integer[]">
  Removed Teams.
</ParamField>

<ParamField body="Shifts" type="string">
  JSON-encoded shifts configuration defining the resource's availability schedule..
</ParamField>

<ParamField body="LinkedResources" type="integer[]">
  Linked Resources.
</ParamField>

<ParamField body="AddedLinkedResources" type="integer[]">
  Added Linked Resources.
</ParamField>

<ParamField body="RemovedLinkedResources" type="integer[]">
  Removed Linked Resources.
</ParamField>

<ParamField body="GoogleCalendarId" type="string">
  Google Calendar Id.
</ParamField>

<ParamField body="KisiGroupId" type="string">
  Kisi Group Id.
</ParamField>

<ParamField body="AccessControlGroupId" type="string">
  Access Control Group Id.
</ParamField>

<ParamField body="Longitude" type="number">
  GPS longitude coordinate of the resource's physical location..
</ParamField>

<ParamField body="Latitude" type="number">
  GPS latitude coordinate of the resource's physical location..
</ParamField>

<ParamField body="HideInCalendar" type="boolean">
  When true, this resource does not appear on the booking calendar view\..
</ParamField>

<ParamField body="Archived" type="boolean">
  When true, the resource is archived and hidden from all views. It cannot be booked..
</ParamField>

<ParamField body="UseSharedZoomAccount" type="boolean">
  When true, bookings for this resource use the location's shared Zoom account to create virtual meetings..
</ParamField>

<ParamField body="ZoomAccessToken" type="string">
  Zoom Access Token.
</ParamField>

<ParamField body="ZoomRefreshToken" type="string">
  Zoom Refresh Token.
</ParamField>

<ParamField body="ZoomUserId" type="string">
  Zoom user ID used to host virtual meetings when UseSharedZoomAccount is false..
</ParamField>

<ParamField body="LastCleanedAt" type="string">
  Timestamp of the last cleaning event for this resource..
</ParamField>

<ParamField body="Office365CalendarId" type="string">
  Office365Calendar Id.
</ParamField>

<ParamField body="LinkedResourceIds" type="string">
  Comma-separated string of linked resource IDs (read-only alternative view of LinkedResources)..
</ParamField>

<ParamField body="OnlyForContacts" type="boolean">
  When true, only contacts (non-member customers) can book this resource..
</ParamField>

<ParamField body="OnlyForMembers" type="boolean">
  When true, only active members (coworkers with a plan) can book this resource..
</ParamField>

<ParamField body="OnlyForInvoicingBusiness" type="boolean">
  When true, only coworkers invoiced by this specific location can book this resource..
</ParamField>

<ParamField body="BookingAvailabilityExceptions" type="integer[]">
  Booking Availability Exceptions.
</ParamField>

<ParamField body="AddedBookingAvailabilityExceptions" type="integer[]">
  Added Booking Availability Exceptions.
</ParamField>

<ParamField body="RemovedBookingAvailabilityExceptions" type="integer[]">
  Removed Booking Availability Exceptions.
</ParamField>

<ParamField body="CancellationFeeProductId" type="integer">
  Cancellation Fee Product Id.
</ParamField>

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

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

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

<ParamField body="RepeatBookingQuantityLimit" type="integer">
  Maximum number of occurrences allowed when creating a recurring booking for this resource..
</ParamField>

<ParamField body="RepeatBookingPeriodLimitInMonths" type="integer">
  Maximum time span (in months) over which a recurring booking series can extend..
</ParamField>

### Children

<ParamField body="TimeSlots" type="object[]">
  The days and times this resource is available for booking. The year, month and day component of FromTime/ToTime is always 1976-01-01.

  <Expandable>
    <ParamField body="DayOfWeek" type="integer" required>
      Day Of Week.
    </ParamField>

    <ParamField body="FromTime" type="string" required>
      Start time.
    </ParamField>

    <ParamField body="ToTime" type="string" required>
      End time.
    </ParamField>
  </Expandable>
</ParamField>

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT \
    "https://spaces.nexudus.com/api/spaces/resources" \
    -H "Authorization: Bearer YOUR_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{
      "BusinessId": 0,
      "Name": "",
      "SystemResourceType": 0,
      "ResourceTypeId": 0,
      "DisplayOrder": 0,
      "CancellationFeeType": 0,
      "Id": 87654321,
      "TimeSlots": [
          {
              "DayOfWeek": 0,
              "FromTime": "2025-01-15T10:30:00Z",
              "ToTime": "2025-01-15T10:30:00Z"
          }
      ]
  }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/spaces/resources',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        BusinessId: 0,
        Name: '',
        SystemResourceType: 0,
        ResourceTypeId: 0,
        DisplayOrder: 0,
        CancellationFeeType: 0,
        Id: 87654321,
        TimeSlots: [object Object]
      })
    }
  );

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

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

  response = requests.put(
      'https://spaces.nexudus.com/api/spaces/resources',
      headers={
          'Authorization': 'Bearer YOUR_TOKEN',
          'Content-Type': 'application/json'
      },
      json={
          'BusinessId': 0,
          'Name': '',
          'SystemResourceType': 0,
          'ResourceTypeId': 0,
          'DisplayOrder': 0,
          'CancellationFeeType': 0,
          'Id': 87654321,
          'TimeSlots': [object Object]
      }
  )

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

## Response

### 200

<ResponseField name="Status" type="integer">
  HTTP status code. `200` on success.
</ResponseField>

<ResponseField name="Message" type="string">
  A human-readable message confirming the update.
</ResponseField>

<ResponseField name="Value" type="object">
  Contains the `Id` of the updated record.
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `true` if the resource was updated successfully.
</ResponseField>

<ResponseField name="Errors" type="array">
  `null` on success.
</ResponseField>

```json Example Response theme={null}
{
  "Status": 200,
  "Message": "Resource 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

<ResponseField name="Message" type="string">
  A summary of the validation error(s), in the format `PropertyName: error message`.
</ResponseField>

<ResponseField name="Value" type="any">
  `null` on validation failure.
</ResponseField>

<ResponseField name="Errors" type="object[]">
  Array of validation errors.

  <Expandable>
    <ResponseField name="AttemptedValue" type="any">
      The value that was submitted for the field, or `null` if missing.
    </ResponseField>

    <ResponseField name="Message" type="string">
      The validation error message.
    </ResponseField>

    <ResponseField name="PropertyName" type="string">
      The name of the property that failed validation.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="WasSuccessful" type="boolean">
  `false` when the request fails validation.
</ResponseField>

```json Example Response theme={null}
{
  "Message": "Name: is a required field",
  "Value": null,
  "Errors": [
    {
      "AttemptedValue": null,
      "Message": "is a required field",
      "PropertyName": "Name"
    }
  ],
  "WasSuccessful": false
}
```
