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

# Update the pricing of a space

> Sets the rental rate of the space, the deposit, whether it allows insurance and discount, and the time margins that block it around the booking.

The internal cost, the external cost and the tax configuration are NOT part of the public contract. Note: the public record of a space does not emit its commercial policy, so what you write here cannot be read back through the API. Returns the updated space in detail.

`PATCH /api/v1/spaces/{spaceId}/pricing` — scope `spaces:write`

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

## 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: `SpacePricingBody`

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `pricingSettings` | object | No | Rental pricing of the space, the three fields together; null clears it. |
| `pricingSettings.type` | string | Yes | Pricing mode. `periodPrice`, `fixedPrice`, `pricingStructure` |
| `pricingSettings.price` | string | Yes | Base rental price, as a decimal string. |
| `pricingSettings.period` | string | Yes | Period unit of the price. `hour`, `day`, `week`, `month` |
| `insuranceEnabled` | boolean | No | Whether the space allows insurance. |
| `depositValue` | string | No | Security deposit amount, as a decimal string; null clears it. |
| `discountEnabled` | boolean | No | Whether the space allows a discount. |
| `bufferBefore` | number | No | Time buffer reserved BEFORE the rental; null clears it together with its unit. |
| `bufferBeforeUnit` | string | No | Unit of the preceding buffer; null only together with `bufferBefore: null`. `hour`, `day` |
| `bufferAfter` | number | No | Time buffer reserved AFTER the rental; null clears it together with its unit. |
| `bufferAfterUnit` | string | No | Unit of the following buffer; null only together with `bufferAfter: null`. `hour`, `day` |

## Request examples

*Update the pricing of a space*

**cURL**

```bash
curl https://app.filmo.io/api/v1/spaces/spac_8f2a1c/pricing \
  --request PATCH \
  --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 '{
  "pricingSettings": {
    "type": "periodPrice",
    "price": "90.00",
    "period": "hour"
  },
  "depositValue": "500.00",
  "insuranceEnabled": false,
  "discountEnabled": true,
  "bufferBefore": 2,
  "bufferBeforeUnit": "hour",
  "bufferAfter": 2,
  "bufferAfterUnit": "hour"
}'
```

**Node.js**

```javascript
fetch('https://app.filmo.io/api/v1/spaces/spac_8f2a1c/pricing', {
  method: 'PATCH',
  headers: {
    Authorization: 'Bearer YOUR_FILMO_API_KEY',
    'Idempotency-Key': crypto.randomUUID(),
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    pricingSettings: {
      type: 'periodPrice',
      price: '90.00',
      period: 'hour'
    },
    depositValue: '500.00',
    insuranceEnabled: false,
    discountEnabled: true,
    bufferBefore: 2,
    bufferBeforeUnit: 'hour',
    bufferAfter: 2,
    bufferAfterUnit: 'hour'
  })
})
```

**Python**

```python
import uuid
import requests

requests.patch(
    "https://app.filmo.io/api/v1/spaces/spac_8f2a1c/pricing",
    headers={
      "Authorization": "Bearer YOUR_FILMO_API_KEY",
      "Idempotency-Key": str(uuid.uuid4()),
      "Content-Type": "application/json"
    },
    json={
      "pricingSettings": {
        "type": "periodPrice",
        "price": "90.00",
        "period": "hour"
      },
      "depositValue": "500.00",
      "insuranceEnabled": False,
      "discountEnabled": True,
      "bufferBefore": 2,
      "bufferBeforeUnit": "hour",
      "bufferAfter": 2,
      "bufferAfterUnit": "hour"
    }
)
```

## 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/update-the-pricing-of-a-space  
Last updated: 2026-10-25