> For the complete documentation index, see [llms.txt](https://traveloapi.gitbook.io/api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://traveloapi.gitbook.io/api/hotel-api/untitled-4.md).

# Book Hotel

## Book Hotel

<mark style="color:blue;">`GET`</mark> `https://traveloapi.com/yourapi/hotelapi/Hotel_book`&#x20;

#### Path Parameters

| Name                 | Type   | Description                                                                                                                                                                                 |
| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| gatkey               | string | gatkey (provided by traveloapi)                                                                                                                                                             |
| hotelID              | string | The search response returns a hotel-id along with each hotel found for the search criteria that was matched. The hotel-id of the hotel selected for booking should be passed here.          |
| checkInDate          | string | It represents Check in date. This value should be entered as string not less than and more than 10 characters in date format 'dd/mm/yyyy'.                                                  |
| checkOutDate         | string | It represents the Check-out date and should be entered as string not less than and more than 10 characters in date format 'dd/mm/yyyy'. It cannot be greater than journey date.             |
| supplierType         | string |                                                                                                                                                                                             |
| rateKey              | string |                                                                                                                                                                                             |
| rateCode             | string | Code for the different fare amount.                                                                                                                                                         |
| chargeableRate       | string |                                                                                                                                                                                             |
| Tax                  | string | It represents the tax amount.                                                                                                                                                               |
| Rooms                | string | It represents the information about the no. of rooms, room characteristic and information about the customer.                                                                               |
| Room                 | string | This contains the information about the no. of rooms, room characteristic, and information of persons.                                                                                      |
| Count                | string | Total number of rooms booked by the customer.                                                                                                                                               |
| roomTypeCode         | string | Room type code and description (Deluxe room, Executive room, Deluxe AC, etc.). This field may not be unique.                                                                                |
| Nights               | string | Actual number of room-nights requested including all rooms across all dates. In other words, if the search request was for 2 rooms for 2 nights, the room-nights value would be 2 \* 2 = 4. |
| HotelReservationInfo | string | Detail description of the hotel reserved by the customer.                                                                                                                                   |
| Email                | string | Email address of the customer.                                                                                                                                                              |
| firstName            | string | First Name of the customer.                                                                                                                                                                 |
| lastName             | string | Last name of the customer.                                                                                                                                                                  |
| homePhone            | string | Land-line number                                                                                                                                                                            |
| workPhone            | string | Office number of the customer.                                                                                                                                                              |
| BankCountryCode      | string | Valid 2 letter ISO country code.                                                                                                                                                            |
| BankName             | string | Name of the bank.                                                                                                                                                                           |
| cardType             | string | It represents the value of card type (credit card, debit card etc.)                                                                                                                         |
| cardNumber           | string | If the payment mode is a credit card, a valid card number should be passed.                                                                                                                 |
| ExpirationYear       | string | If the payment mode is a credit card, , a valid expiration year of the credit card should be passed.                                                                                        |
| expirationMonth      | string | If the payment mode is a credit card, a valid expiration month of the credit card should be passed.                                                                                         |
| creditCardIdentifier | string | If the payment mode is a credit card, the CVV found on the back of the card should be passed.                                                                                               |
| AddressDetail        | string | Address of the hotel booked.                                                                                                                                                                |
| city                 | string | It represents city name.                                                                                                                                                                    |
| stateCode            | string | It represents the state code.                                                                                                                                                               |
| countryCode          | string | It represents the country code                                                                                                                                                              |
| postalCode           | string | It represents postal code.                                                                                                                                                                  |
| address              | string | Address detail.                                                                                                                                                                             |
| HotelChain           | string | The group which owns the hotel.                                                                                                                                                             |
| post\_pay            | string | True: if Pay at Hotel is available, Else false.                                                                                                                                             |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "CustomerSessionID": null,
  "Error": null,
  "HotelEmailAddress": "saileelaresidency01@gmail.com",
  "HotelPhoneNumber": "+912228352836|+912228362837",
  "arrivalDate": null,
  "cancellationPolicy": null,
  "checkInInstructiuons": null,
  "confirmationNumbers": [
    "343752337"
  ],
  "departureDate": null,
  "drivingDirections": null,
  "existingItinerary": null,
  "hotelAddress": null,
  "hotelCity": null,
  "hotelCountryCode": null,
  "hotelName": null,
  "hotelPostalCode": null,
  "itineraryId": "343754809",
  "numberOfRoomsBooked": null,
  "processWithConfirmation": "CF",
  "reservationNumbers": "343754809",
  "reservationStatusCode": "CF",
  "roomDescription": null,
  "supplierType": null,
  "transactionid": 56274781,
  "xmlResponse": null
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
    "message": "Invalid Request",
    "status": "error",
    
}

```

{% endtab %}
{% endtabs %}

## Hotel Booking Request Example :

```css
{
  "AddressDetail": {
    "address": "Unit 5 R.K Mandir Road Saidham Industrial Area Kondivita MIDC Andheri East Mumbai 400059",
    "city": "Kolkata",
    "countryCode": "IN",
    "postalCode": "700153",
    "stateCode": "WB"
  },
  "SessionId": "a4d47cd2209a4657b0cf6b9f7f822d31",
  "BookingID": "String content",
  "CancellationPolicy": "<ul><li>GST (if applicable) to be paid at check-in.</li><li>This is non refundable and cannot be changed or cancelled, Cancellation charges will be 100%.</li></ul>",
  "City": "Mumbai",
  "Country": "",
  "CouponCode": "",
  "CouponValue": "0",
  "CurrencyCode": "INR",
  "EMTCommonID": "EMTHotel-1165875",
  "EngineID": "23",
  "GSTDetails": {
    "CustomerAddress": "String content",
    "CustomerName": "String content",
    "CustomerState": "String content",
    "GSTCity": "String content",
    "GSTCompanyAddres": "String content",
    "GSTCompanyEmailId": "String content",
    "GSTCompanyName": "String content",
    "GSTNumber": "String content",
    "GSTPhoneISD": "String content",
    "GSTPhoneNumber": "String content",
    "GSTPinCode": "String content",
    "GSTState": "String content"
  },
  "HotelChain": "String content",
  "HotelReservationInfo": {
    "BankCountryCode": "IN",
    "BankName": "String content",
    "Email": "redchillies309@gmail.com",
    "ExpirationYear": "",
    "Title": "Mr.",
    "cardNumber": "",
    "cardType": "",
    "creditCardIdentifier": "",
    "expirationMonth": "",
    "firstName": "Debashis ",
    "homePhone": "7479083818",
    "lastName": "Chakroborty",
    "workPhone": "7479083818"
  },
  "MealType": "",
  "Name": "Hotel Sai Leela",
  "Nights": "1",
  "SearchKey": "15~INR~Mumbai~03-07-2019~03-08-2019~2~3_1_~~~GoalltripTours~~~0~~IN",
  "Tax": "458",
  "TransactionRefNo": "GLTHTL.67132237",
  "Transactionid": 67132237,
  "UniqueID": "5c809a2c2bfc6",
  "chargeableRate": "2997",
  "checkInDate": "2019-03-07",
  "checkOutDate": "2019-03-08",
  "hotelID": "1265358",
  "rateCode": "acc8b06a-8280-5e9d-76dd-f6eecdbb72d1",
  "rateKey": "8475180|1|INR|529329|acc8b06a-8280-5e9d-76dd-f6eecdbb72d1|606110667303650995|B2B",
  "roomTypeCode": "acc8b06a-8280-5e9d-76dd-f6eecdbb72d1",
  "supplierType": "23",
  "Rooms": {
    "Count": "2",
    "Room": [
      {
        "AdultDetails": [
          {
            "Age": 25,
            "PaxType": 0,
            "Prefix": "Mr.",
            "firstName": "Debashis ",
            "lastName": "Chakroborty"
          },
          {
            "Age": 25,
            "PaxType": 0,
            "Prefix": "Mr.",
            "firstName": "Bidyut",
            "lastName": "Roy"
          },
          {
            "Age": 25,
            "PaxType": 0,
            "Prefix": "Mr.",
            "firstName": "Avijit",
            "lastName": "Talukdar"
          }
        ],
        "MealType": "Breakfast",
        "rateCode": "acc8b06a-8280-5e9d-76dd-f6eecdbb72d1",
        "rateKey": "8475180|1|INR|529329|acc8b06a-8280-5e9d-76dd-f6eecdbb72d1|606110667303650995|B2B",
        "roomType": "Deluxe Room",
        "roomTypeCode": "acc8b06a-8280-5e9d-76dd-f6eecdbb72d1",
        "smokingPreference": ""
      },
      {
        "AdultDetails": [
          {
            "Age": 25,
            "PaxType": 0,
            "Prefix": "Mr.",
            "firstName": "Abhijit",
            "lastName": "Das"
          }
        ],
        "MealType": "Breakfast",
        "rateCode": "acc8b06a-8280-5e9d-76dd-f6eecdbb72d1",
        "rateKey": "8475180|1|INR|529329|acc8b06a-8280-5e9d-76dd-f6eecdbb72d1|606110667303650995|B2B",
        "roomType": "Deluxe Room",
        "roomTypeCode": "acc8b06a-8280-5e9d-76dd-f6eecdbb72d1",
        "smokingPreference": ""
      }
    ]
  }
}
```
