*REST API › Endpoint reference › Catalog & inventory › Spaces*

# Replace the amenities and equipment

> Fully REPLACES the two lists of the space: the amenities offered with it (wifi, 24/7 access, parking) and the physical equipment delivered with it (projector, whiteboard, sound).

It is PUT and not PATCH because both lists are replaced whole: always send both, including the one that does not change. Returns the updated space in detail.

`PUT /api/v1/spaces/{spaceId}/amenities` — scope `spaces:write`

Scope: `spaces:write` · 120/min · Strict tenancy · Idempotency-Key · If-Match · MCP: `filmo_spaces_amenities_replace`

## Authorizations

Bearer API key with the scope below. `spaces:write`

## Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | string | No | Unique identifier of the request, chosen by the client (a UUID works). Between 1 and 255 characters: an empty header is rejected with 400 `validation_error`, because the client would believe itself protected. Repeating the same key with the SAME body within 24 h returns the stored response without executing again, with the `Idempotent-Replay: true` header. With a DIFFERENT body it returns 422. It is the safe way to retry after a network timeout. |
| `If-Match` | string | No | Optimistic locking: the `ETag` you read from the resource (or `*`). If the resource changed since, the write is rejected with `412 precondition_failed` before doing anything; read it again and retry. Without the header the write always proceeds. |

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `spaceId` | string | Yes | Space identifier. |

## Body

Body schema: `SpaceAmenitiesBody`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `commodities` | string[] | Yes | Services offered with the space (wifi, 24/7 access, parking...). REPLACES the whole list. |
| `amenities` | string[] | Yes | Physical equipment delivered with the space (projector, whiteboard, sound...). REPLACES the whole list. |

## Request examples

*Replace the amenities and equipment*

**cURL**

```bash
curl https://app.filmo.io/api/v1/spaces/spac_8f2a1c/amenities \
  --request PUT \
  --header "Authorization: Bearer $FILMO_API_KEY" \
  --header "Idempotency-Key: $(uuidgen 2>/dev/null || cat /proc/sys/kernel/random/uuid)" \
  --header 'Content-Type: application/json' \
  --data '{
  "commodities": [
    "Wifi",
    "Acceso 24/7",
    "Parking",
    "Aseos"
  ],
  "amenities": [
    "Proyector",
    "Pizarra",
    "Equipo de sonido"
  ]
}'
```

**Node.js**

```javascript
fetch('https://app.filmo.io/api/v1/spaces/spac_8f2a1c/amenities', {
  method: 'PUT',
  headers: {
    Authorization: 'Bearer YOUR_FILMO_API_KEY',
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    commodities: ['Wifi', 'Acceso 24/7', 'Parking', 'Aseos'],
    amenities: ['Proyector', 'Pizarra', 'Equipo de sonido']
  })
})
```

**Python**

```python
import uuid
import requests

requests.put(
    "https://app.filmo.io/api/v1/spaces/spac_8f2a1c/amenities",
    headers={
      "Authorization": "Bearer YOUR_FILMO_API_KEY",
      "Idempotency-Key": str(uuid.uuid4()),
      "Content-Type": "application/json"
    },
    json={
      "commodities": [
        "Wifi",
        "Acceso 24/7",
        "Parking",
        "Aseos"
      ],
      "amenities": [
        "Proyector",
        "Pizarra",
        "Equipo de sonido"
      ]
    }
)
```

## Response

Response schema: `SpaceDetailDto`

| Status | Description |
| --- | --- |
| 200 | Successful response. |
| 400 | Invalid request (validation_error): malformed query or body. `errors[]` lists every offending field with its stable code. |
| 401 | Authentication failed (unauthorized, api_key_invalid, api_key_revoked, api_key_expired, api_key_owner_inactive, api_key_owner_not_admin). |
| 403 | Not allowed (insufficient_scope: the API key does not have the required scope, named in `requiredScope`; forbidden: the owner of the key lacks the permission the operation requires). `insufficient_scope` is answered before the request counts against the rate limit, so it carries no `RateLimit-*` headers; `forbidden` does. |
| 404 | Resource not found (not_found): it does not exist or is outside the scope of the API key. |
| 409 | Conflict (conflict): the current state of the resource prevents the operation, a request with that Idempotency-Key is already in progress, or another conditional write (`If-Match`) held the resource for more than five seconds. `errors[0].code` says which: `in_progress` and `lock_timeout` are solved by retrying; `invalid_state` is not, because the state of the resource forbids the operation. |
| 412 | Precondition failed (precondition_failed): the `If-Match` entity tag does not match the current representation. Read the resource again and retry. |
| 422 | Idempotency-Key reused (idempotency_key_reused): the same key was used before with a different body. Change the key. |
| 429 | Rate limit exceeded (rate_limited): retry after `Retry-After` seconds; `RateLimit-*` says which quota ran out. |
| 500 | Internal error (internal_error). |

**200**

| Name | Type | Description |
| --- | --- | --- |
| `data` | object | Detail of a warehouse or rentable space. |
| `data.id` | string | Unique space identifier. |
| `data.name` | string | Space name. |
| `data.internalReference` | string | Internal reference of the space, useful for matching with external systems; null if it has none. |
| `data.isWarehouse` | boolean | true if the space is a warehouse that manages stock and can be the main warehouse of an order; false if it is a rentable space. |
| `data.collectionId` | string | Identifier of the collection it belongs to; null if it is in none. |
| `data.collectionName` | string | Full collection path, for example "Estudios > Fotografía"; null if not applicable. |
| `data.building` | string | Building it is located in; null if not applicable. |
| `data.floor` | number | Floor it is located on; null if not applicable. |
| `data.location` | object | Physical location of the space. |
| `data.location.address` | string | Postal address; null if not recorded. |
| `data.location.city` | string | Municipality; null if not recorded. |
| `data.location.postalCode` | string | Postal code; null if not recorded. |
| `data.location.country` | string | Country; null if not recorded. |
| `data.location.lat` | number | Latitude in decimal degrees; null if not geolocated. |
| `data.location.lng` | number | Longitude in decimal degrees; null if not geolocated. |
| `data.createdAt` | string<date-time> | Creation date in ISO 8601 UTC. |
| `data.updatedAt` | string<date-time> | Last modification date in ISO 8601 UTC. |
| `data.description` | string | Space description; null if it has none. |
| `data.capacity` | number | Capacity in people; null if not defined. |
| `data.area` | number | Area in square metres; null if not defined. |
| `data.dimensions` | string | Dimensions as free text; null if not defined. |
| `data.amenities` | string[] | Additional services available (wifi, projector...). |
| `data.equipments` | string[] | Fixed equipment available in the space. |
| `data.pricingSettings` | object | Rental pricing of the space; null if not configured. The same fields that PATCH /pricing accepts. |
| `data.pricingSettings.type` | string | Pricing mode; null if not configured. `periodPrice`, `fixedPrice`, `pricingStructure` |
| `data.pricingSettings.price` | string | Base rental price as a decimal string; null if not configured. |
| `data.pricingSettings.period` | string | Period unit of the price; null if not configured. `hour`, `day`, `week`, `month` |
| `data.insuranceEnabled` | boolean | Whether the space allows insurance. |
| `data.discountEnabled` | boolean | Whether the space allows a discount. |
| `data.depositValue` | string | Security deposit amount as a decimal string; null if not set. |
| `data.bufferBefore` | number | Time buffer reserved BEFORE the rental; null if none. |
| `data.bufferBeforeUnit` | string | Unit of the preceding buffer; null if none. `hour`, `day` |
| `data.bufferAfter` | number | Time buffer reserved AFTER the rental; null if none. |
| `data.bufferAfterUnit` | string | Unit of the following buffer; null if none. `hour`, `day` |
| `data.customFields` | object<string, any> | Custom field values by custom field identifier; the definitions are in `/api/v1/custom-fields`. |
| `meta` | object | Additional information about the response. |
| `meta.warnings` | object[] | Lifecycle warnings; present only when the operation is deprecated. |
| `meta.warnings.code` | string | Stable warning code. `deprecated` |
| `meta.warnings.message` | string | For people: what is deprecated, until when, and what to use. |
| `meta.warnings.sunset` | string | Day (YYYY-MM-DD) the operation stops being served. |
| `meta.warnings.replacement` | string | `operationId` of the operation to use instead, or null if there is none. |
| `meta.warnings.link` | string | Where the deprecation is documented (the changelog). |

*Example response · 200*

```json
{
  "data": {
    "id": "space_9f3a2b",
    "name": "Example space",
    "internalReference": "2026-0001",
    "isWarehouse": true,
    "collectionId": "collection_9f3a2b",
    "collectionName": "Example collection name",
    "building": "Example building",
    "floor": 1,
    "location": {
      "address": "Example address",
      "city": "Madrid",
      "postalCode": "28001",
      "country": "ES",
      "lat": 1,
      "lng": 1
    },
    "createdAt": "2026-09-01T08:00:00.000Z",
    "updatedAt": "2026-09-01T08:00:00.000Z",
    "description": "Example text.",
    "capacity": 1,
    "area": 1,
    "dimensions": "Example dimensions",
    "amenities": [
      "Example amenities"
    ],
    "equipments": [
      "Example equipments"
    ],
    "pricingSettings": {
      "type": "periodPrice",
      "price": "120.00",
      "period": "hour"
    },
    "insuranceEnabled": true,
    "discountEnabled": true,
    "depositValue": "120.00",
    "bufferBefore": 1,
    "bufferBeforeUnit": "hour",
    "bufferAfter": 1,
    "bufferAfterUnit": "hour",
    "customFields": {
      "example": "example"
    }
  }
}
```

## Errors

| Status | Codes | Meaning |
| --- | --- | --- |
| 400 | `validation_error` | Malformed query or body. `errors[]` lists every offending field with its stable code. |
| 404 | `not_found` | It does not exist or is outside the scope of the API key. |
| 409 | `conflict` | The current state of the resource prevents the operation, a request with that Idempotency-Key is already in progress, or another conditional write (`If-Match`) held the resource for more than five seconds. `errors[0].code` says which: `in_progress` and `lock_timeout` are solved by retrying; `invalid_state` is not, because the state of the resource forbids the operation. |
| 412 | `precondition_failed` | The `If-Match` entity tag does not match the current representation. Read the resource again and retry. |
| 422 | `idempotency_key_reused` | The same key was used before with a different body. Change the key. |

## Deprecation

This operation is not deprecated. Deprecations are announced with a Deprecation header and a sunset date.

---

Canonical URL: https://docs.filmo.io/rest-api/endpoint-reference/spaces/replace-the-amenities-and-equipment  
Last updated: 2026-10-25