Overview

The Hotel Search API allows you to search for hotels from multiple suppliers and retrieve the list of hotels around a specific location or point of interest for the guest count (occupants), stay period (check-in and check-out dates), and hotel preferences (such as hotel rates, star rating, or amenities) specified. You can search for up to 9 guests per room (occupancy) and up to 9 rooms per hotel. This limitation can vary per supplier.

To ensure best performance and flexibility, we have designed the following two-step Hotel Search API workflow:

  1. Initiate Hotel Search API allows you to initiate the search for hotels, which is typically the first step in the shopping process.

  2. Get Hotel Search Results API allows you to retrieve hotel search results based on the search request fields that were provided in the Initiate Hotel Search API call.

The following table lists the base URL and endpoints for the Hotel Search API endpoints:

APIMethodBase URLEndpoint
Initiate Hotel SearchPOSThttps://usg.cnxloyalty.com/api/hotels/search/init
Get Hotel Search ResultsGEThttps://usg.cnxloyalty.com/api/hotels/search/{sessionId}/results

Initiate Hotel Search

This API initiates an asynchronous search for hotels from multiple suppliers, which is typically the first step in the shopping process. You can search for hotels based on a hotel ID or a geolocation, which includes a radial search, a rectangular search, or a polygonal search.

This API returns the sessionId in the response. You can use the sessionId to retrieve search results at any point in time.

Note: Limitations on hotel search requests, such as same-day booking support, maximum number of rooms, maximum number of guests, and maximum length of stay are all supplier-specific.

Initiate Search for Hotels within a Radius

A radial search allows you to easily find hotels that are located within a specified distance (radius) from a given point of interest (location). This location is also called as the reference point or the center.

For example, with our API, you can easily search for all hotels that are located within a 5-kilometer radius from the CDG (Paris Charles de Gaulle Airport) airport.

Initiate Search for Hotels within a Rectangular Geo Region

A rectangular search allows you to easily find hotels that are located within a particular area or a given bounding box by using geocodes. When you search for hotels within a rectangular region, you must ensure that the distance is within 250 kilometers and the area is within a rectangle.

This API allows you to support a map-based search experience based on the view port. For example, you can provide an on-screen map and allow the user to select a rectangular region, which can then be used as the area where the hotel search must be performed. Users can then look at the list of hotels in the defined area to decide which hotel suits their needs.

Initiate Search for Hotels within a Polygonal Geo Region

A polygonal search allows you to define a geographic area when searching for hotels, rather than searching within a given radius based on a defined point, as in the radius search. A polygonal search allows you to easily find hotels that are located within a particular area or a bounding polygonal region by using geocodes. When you search for hotels within a polygonal region, you must provide geocodes for all the points that form the polygon, keeping in mind that the coordinates for the starting point and the end point of the polygon must be the same.

This API allows you to support a map-based search experience based on the view port. For example, you can provide an on-screen map and allow the user to select a polygonal region, which can then be used as the area where the hotel search must be performed. Users can then look at the list of hotels in the defined area to decide which hotel suits their needs.

Initiate Search for Specific Hotels

This API allows you to search for specific hotels by hotel ID.

Get Hotel Search Results

The Get Hotel Search Results API allows you to retrieve hotel search results based on the search request fields that were provided in the Initiate Hotel Search API call.

This API returns the hotels that are available in the given location for the given guest count (occupants) and the duration of stay (check-in and check-out dates). Every result set that the Get Hotel Search Results API returns has a unique token. This token enables you to retrieve any previously missed or timed-out search results based on the token provided. If you are calling the Get Hotel Search Results API for the first time, you do not need to set the value for this parameter. To get progressive results, in the token parameter of the next Get Hotel Search Results API call, use the value of the nextToken field from the appropriate Get Hotel Search Results API response.

<< Go to the Overview page     |      Go to the next API: Get Room Rates API >>

For any query or suggestions, feel free to drop an email to support@one-connect.io