Create RoomCloud booking
Request to create a reservation in RoomCloud. Guest information, card information, and room reservation details are requested. If a reservation reaches its deadline without being paid, a notification is sent via webhook to inform about its expiration.
POST https://[base_url]/v2/bookings/hotel_id={hotel_id}
Example:
POST https://[base_url]/v2/bookings/hotel_id=11111
Query parameters
| PARAMETER | TYPE | REQ. | DESCRIPTION |
|---|---|---|---|
| hotel_id | Integer | Yes | Integer representing the unique identifier of the hotel in Roomcloud |
Body
Request using the POST method
{
"reservation": {
"checkin": "2024-05-16",
"checkout": "2024-05-19",
"nights": "3",
"firstName": "Jhon",
"lastName": "Doe",
"rooms": "2",
"adults": "3",
"children": "2",
"children_ages": "2,3",
"city": "Cartagena",
"country": "COL",
"email": "[email protected]",
"telephone": "573011234567",
"currency": "EUR",
"notes": "Some additional reservation note",
"ccData": {
"ccCode": "123",
"ccNumber": "4111111111111111",
"ccExpireDate": "04/2028",
"ccHolder": "Jhon Doe"
},
"roomsData": [
{
"id": "19366",
"checkin": "2024-05-06",
"checkout": "2024-05-09",
"rateId": "12059",
"quantity": "1",
"currency": "EUR",
"adults": "1",
"children": "1"
},
{
"id": "19366",
"checkin": "2024-05-06",
"checkout": "2024-05-09",
"rateId": "12054",
"quantity": "1",
"currency": "EUR",
"adults": "1",
"children": "1"
}
]
}
}
Endpoint response
Status code: 200
{
"msg": "Reserva registrada exitosamente. Por favor realice su pago para confirmar la reserva",
"chatbot_id": "ChatBot-code"
}
or
{
"msg": "No hay disponibilidad de las habitaciones solicitadas",
"no_available_rooms": [
{
"room": "19366",
"product": "12059"
},
{
"room": "19366",
"product": "12054"
}
]
}
Status code: 401, 403, 404
{
"code": "Status code",
"message":"Error description",
"detail": "Error details"
}