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"
}
Response Example (201 Created)
{
"success": true,
"data": {
"id": "closed_11223344",
"hotelId": "7a8b9c1d-2e3f-4a5b-6c7d-8e9f0a1b2c3d",
"startDate": "2026-11-01T00:00:00.000Z",
"endDate": "2026-11-05T00:00:00.000Z",
"reason": "Annual Maintenance & Property Renovation",
"active": true
},
"message": "Closed date blackout created successfully"
}