Black Bookings


Endpoints that interact with Black Bookings in BookyFlow

Black bookings is a term used to define bookings which are not made by a guest. Instead they are used by the system to take a room or rooms out of service, typically for renovation or because the property is on holiday.

Scope

Property Get / Property Set

Get Black Bookings

Endpoint

GET https://yourdomain.com/bookyflow/api/blackbookings/{{property_id}}/roomlist/{{black_booking_date}}

Path Parameters

Parameter Description
{{property_id}} (Required parameter)
{{black_booking_date}} (Required parameter)

Response Example

Status: OK (200)

{
  "data": {
    "blackbooking": [
      {
        "room_uid": 53,
        "room_name": "",
        "room_number": "01",
        "room_floor": "",
        "contract_uid": 67,
        "black_booking": 1,
        "date": "2020/09/18"
      },
      {
        "room_uid": 54,
        "room_name": "",
        "room_number": "02",
        "room_floor": "",
        "contract_uid": 81,
        "black_booking": 1,
        "date": "2020/08/02"
      },
      {
        "room_uid": 81,
        "room_name": "",
        "room_number": "05",
        "room_floor": "",
        "contract_uid": 78,
        "black_booking": 1,
        "date": "2020/08/07"
      }
    ]
  },
  "meta": {
    "code": 200
  }
}

Add Black Booking

Endpoint

POST https://yourdomain.com/bookyflow/api/blackbookings/{{property_id}}/{{room_id}}/{{black_booking_date}}

Create a black booking after sending the property uid, date and room uid. Responds with N where N = the contract id of the black booking. Date must be sent in Y-m-d format.

Returns the contract id

Path Parameters

Parameter Description
{{property_id}} (Required parameter)
{{room_id}} (Required parameter)
{{black_booking_date}} (Required parameter)

Response Example

Status: No Content (204)

{
  "meta": {
    "code": 204,
    "error_message": "Room already booked this date"
  }
}

Delete Black Bookings

Endpoint

DELETE https://yourdomain.com/bookyflow/api/blackbookings/{{property_id}}/{{black_booking_contract_id}}

bookyflow/api/blackbookings/@property_id/@contract_id

Delete a specific black booking, sending the property id and contract id

Path Parameters

Parameter Description
{{property_id}} (Required parameter)
{{black_booking_contract_id}} (Required parameter)

Response Example

Status: OK (200)

{
  "data": {
    "blackbookingsdeleted": "81"
  },
  "meta": {
    "code": 200
  }
}