---
title: "Creates a block"
method: POST
path: "/booking/v1/blocks"
tags: ["Block"]
---

# Creates a block

`POST /booking/v1/blocks`

<br>You must have at least one of these scopes: 'blocks.create, reservations.manage'.

## Headers

- `Idempotency-Key` string

## Request body

- CreateBlockModel
  - `groupId` string, required — ID of the group that reserved the block
  - `ratePlanId` string, required — The rate plan
  - `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 (without fractional second part) 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 (without fractional second part) 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[], nullable — The list of blocked units for each time slice
    - `blockedUnits` integer, required — Number of units blocked for the time slice
  - `blockedUnits` integer, nullable — Number of units to block for the defined time period
  - `promoCode` string, nullable — The promo code associated with a certain special offer
  - `corporateCode` string, nullable — The corporate code associated with a certain special offer
  - `marketSegmentId` string, nullable — The market segment Id for this block. Must be a valid market segment ID defined at the property level. Picked-up reservations will inherit this value by default

## Response `201`

The block was created successfully.

- BlockCreatedModel
  - `id` string, required — Block id

## 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.md) · [All operations](https://skmtc.dev/apaleo/apis/apaleo-booking-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apaleo/apaleo-booking-api/revisions/6510a7df7143/schema)
