Skip to main content

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

FieldTypeRequiredDescription
hotelIdString (UUID)ConditionalTarget hotel ID
hotelRoomIdString (UUID)ConditionalTarget room ID
startDateStringYesBlackout start date (YYYY-MM-DD)
endDateStringYesBlackout end date (YYYY-MM-DD)
reasonStringNoReason 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"
}