Skip to content

Hotel Booking

Create Booking

Book a hotel room with specified details.

Endpoint: POST /api/v1/hotels/{hotelId}/book

Parameters:

  • hotelId (path, required): Hotel ID
  • locale (query, optional): 2-letter language code (e.g., en, fr)

Request Body:

json
{
  "id": "booking-123",
  "startAt": "2024-06-15",
  "endAt": "2024-06-20",
  "customerLastName": "Smith",
  "customerFirstName": "John",
  "customerEmail": "john.smith@email.com",
  "customerPhoneNumber": "+33123456789",
  "customerCity": "Paris",
  "customerZipCode": "75001",
  "customerAddress": "123 Rue de Rivoli",
  "customerCompany": "Travel Corp",
  "customerInternalReference": "TC-2024-001",
  "customerFileId": "file-456",
  "tourOperatorName": "Paris Tours",
  "networkName": "Hotel Network",
  "toReference": "TO-789",
  "note": "Late check-in requested",
  "roomsToBook": [
    {
      "bedCompositionId": "bed-choice-1",
      "promotionId": "promo-123",
      "hotelRoomId": "room-1",
      "travelers": [
        {
          "kind": "adult",
          "gender": "male",
          "firstName": "John",
          "lastName": "Smith",
          "nationality": "US",
          "passportNumber": "P123456789",
          "expirationDate": "2030-12-31T00:00:00Z",
          "birthdate": "1980-05-15T00:00:00Z",
          "ageIsExact": true
        }
      ],
      "tags": [
        {
          "label": "Anniversary",
          "startAt": "2024-06-15T00:00:00Z",
          "endAt": "2024-06-20T00:00:00Z"
        }
      ]
    }
  ],
  "userId": "user-123",
  "bookingKind": "confirmed"
}

Response:

json
{
  "bookingId": "booking-456"
}

Please refer to the bookings documentation for more details on retrieving and managing bookings.