Skip to content

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
send_link Boolean No Whether to email the payment link to the guest after the booking is created. Defaults to true. Set to false if your integration will send the link manually. Ignored for agency bookings (no email is sent).

Example with query parameter

POST https://[base_url]/v2/bookings/hotel_id=11111?send_link=false

Body

Request using the POST method

PARAMETER TYPE REQ. DESCRIPTION
reservation Object Yes Reservation and guest data (see example below).
agency Object No Agency data when the booking is created on behalf of an agency.
send_link_by_email Boolean No Same behavior as the send_link query parameter. If present in the body, it overrides send_link. Defaults to true when omitted. Not applied for agency bookings.
{
    "send_link_by_email": true,
    "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"
}

When a booking is created successfully, Autocore generates a payment link (returned indirectly via chatbot_id). By default, the link URL is emailed to the address in reservation.email. Use send_link=false or "send_link_by_email": false when the partner integration will deliver the link through another channel. Email is only sent in non-development environments.