# Hotel Search

## Hotel Search Request & Response

<mark style="color:green;">`POST`</mark> `https://traveloapi.com/yourapi/hotelapi/hotel_search`&#x20;

#### Path Parameters

| Name           | Type   | Description                                                                                                                                                                    |
| -------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| gatkey         | string | gatkey (provided by traveloapi)                                                                                                                                                |
| City           | string | This value represents source city name.                                                                                                                                        |
| CityName       | string | City name to search for hotel.                                                                                                                                                 |
| 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 'yyyy-MM-dd'.                                     |
| 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 'yyyy-MM-dd'. It cannot be greater than CheckInDate. |
| country        | string | Two letter ISO country code.                                                                                                                                                   |
| rooms          | string | It represents the information about the no. of rooms, room characteristic and information about the customer.                                                                  |
| Room           | string | It represents contains the information about the no. of rooms, room characteristic, and information of persons.                                                                |
| NumberOfAdults | string | It represents the value of total number of adults. Domain for this field contains values from 1-4.                                                                             |
| Child          | string | Total number of children. Domain for this field contains values from 1-4.                                                                                                      |
| NumberOfChild  | string | It represents the value of total number of children                                                                                                                            |
| childAge       | string | It represents the age of the children. This is optional, but recommended if this parameter is passed, child's age is taken as 11 by default.                                   |
| Count          | string | It represents the value of number of rooms.                                                                                                                                    |
| currency       | string | It represents the currency code for different countries.                                                                                                                       |
| Nights         | string | It represents the value of total number of nights.                                                                                                                             |
| engine         | string |                                                                                                                                                                                |

{% tabs %}
{% tab title="200 Cake successfully retrieved." %}
```javascript
{
    "name": "Cake's name",
    "recipe": "Cake's recipe name",
    "cake": "Binary cake"
}
```
{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}
```javascript
{
    "message": "Invalid Request",
    "status": "error",
    
}
```
{% endtab %}
{% endtabs %}

### Request Example :

```css
{
  "City": "Agra",
  "CityName": "Agra , India",
  "CheckInDate": "2018-10-29",
  "CheckOutDate": "2018-10-30",
  "Nights": "1",
  "isFareRecheck": false,
  "rooms": {
    "Count": "1",
    "Room": [
      {
        "NumberOfAdults": "2",
        "Child": {
          "NumberOfChild": "0"
        }
      }
    ]
  }
}
```
