Closed Dates & Blackout API
Overview
Blocks a hotel or specific room type from bookings across a date range due to maintenance, private events, or seasonal closures.
- Endpoint:
/api/availability/closed-dates - Method:
POST
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
hotelId | String (UUID) | Conditional | Target hotel ID |
hotelRoomId | String (UUID) | Conditional | Target room ID |
startDate | String | Yes | Blackout start date (YYYY-MM-DD) |
endDate | String | Yes | Blackout end date (YYYY-MM-DD) |
reason | String | No | Reason for closure |
Request Body Example
{
"hotelId": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"startDate": "2026-11-01",
"endDate": "2026-11-05",
"reason": "Annual Maintenance & Property Renovation"
}
List Closed Dates (GET /api/availability/closed-dates)
Overview
Lists active blackout dates for a hotel or hotel room.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
hotelId | String (UUID) | Conditional | Target hotel ID |
hotelRoomId | String (UUID) | Conditional | Target room ID |
Delete Closed Date (POST /api/availability/closed-dates/delete)
Overview
Deactivates a closed date blackout by setting active: false.
Request Body Schema
| Field | Type | Required | Description |
|---|---|---|---|
id | String (UUID) | Conditional | Closed Date ID to deactivate |
closedDateId | String (UUID) | Conditional | Alias for Closed Date ID |
Response Example (200 OK)
{
"success": true,
"data": {
"id": "closed_11223344",
"active": false
},
"message": "Closed date blackout deleted successfully"
}