---
title: "Allow to modify a block"
method: PUT
path: "/booking/v0-nsfw/block-actions/{id}/amend"
tags: ["BlockActions"]
---

# Allow to modify a block

`PUT /booking/v0-nsfw/block-actions/{id}/amend`

## Request

- Base URL: `https://api.apaleo.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.apaleo.com/booking/v0-nsfw/block-actions/{id}/amend`
- Auth: OAuth 2
  - Implicit: `https://identity.apaleo.com/connect/authorize`
  - Scopes: `blocks.manage`, `reservations.manage`, `admin`

Use this call to modify a block.<br>You must have at least one of these scopes: 'blocks.manage, reservations.manage'.<br>For fine-grained clients, you must have this permission: 'core.blocks.amend'.

## Path parameters

- `id` string, required

## Request body

- ReplaceBlockModel
  - `from` string, required: Start date and time from which the inventory will be blocked<br />Specify either a pure date or a date and time in UTC or with UTC offset as defined in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>
  - `to` string, required: End date and time until which the inventory will be blocked. Cannot be more than 5 years after the start date.<br />Specify either a pure date or a date and time in UTC or with UTC offset as defined in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>
  - `grossDailyRate` MonetaryValueModel, required
    - `amount` number, double, required
    - `currency` string, required
  - `timeSlices` CreateBlockTimeSliceModel[], required: The list of time slices
    - `blockedUnits` integer, required: Number of units blocked for the time slice
  - `status` 'Tentative' | 'Definite' | 'Canceled' | 'Optional', nullable: The status to transition the block to as part of this edit. When omitted, the block keeps its current status and the amend is a plain update. 'Canceled' is not supported here; use the cancel action. Changing the status to Optional requires OptionalCutoff, IsOptionalDeductingInventory and OptionalCutoffBehavior.
  - `optionalCutoff` string, nullable: The date and time by which a decision should be made on this optional block. Required when changing the block's status to Optional.<br />Specify either a pure date or a date and time in UTC or with UTC offset as defined in <a href="https://en.wikipedia.org/wiki/ISO_8601">ISO8601:2004</a>
  - `isOptionalDeductingInventory` boolean, nullable: Whether this optional block reduces availability like a definite block. Required when changing the block's status to Optional.
  - `optionalCutoffBehavior` 'DoNothing' | 'AutoRelease', nullable: What happens when the optional cutoff date is reached. Required when changing the block's status to Optional.

## Response `204`

Replace of the block was successful.

## Other responses

- `400`: Bad request.
- `401`: You are unauthorized.
- `403`: Forbidden.
- `404`: The Request-URI could not be found.
- `415`: Unsupported media type.
- `422`: Validation errors in the request body or query params.
- `499`: Client closed request.
- `500`: An unexpected error occurred.
- `503`: The server is currently unavailable. Please try later.

---

[API](https://skmtc.dev/apaleo/apis/apaleo-booking-api-not-safe-for-work.md) - [All operations](https://skmtc.dev/apaleo/apis/apaleo-booking-api-not-safe-for-work/llms.txt) - [OpenAPI document](https://skmtc.dev/apaleo/apis/apaleo-booking-api-not-safe-for-work/revisions/a1b6a2f6b879?raw)
