Search by Airport

In all use cases, the Actor is the developer implementing the interface between the JSON APIs and your company's application that provides travel results to your company's end users. Actors here are not searching/booking travel for themselves but instead are implementing this data handling for input from your company's travel customers.

This use case details a search request for properties within a specified radius around Charles de Gaulle airport (IATA code CDG).

Prerequisites

Next steps

To proceed with booking:

Use case v12: SearchComplete API

See the JSON Hotel APIs Guide for more about the Hotel Search APIs and which to use after v12 is released.

Action

Goals and steps

Code Example

Request

  1. In the  SearchComplete request payload, provide the required location details for the airport - we'll send the code CDG for Charles de Gaulle airport in Paris:

    • type value of airportIATACode

    • IATA airport code value CDG

    • Search radius around that city

    • Optional: Specify either mi or km for the unit of measure for the search radius

  2. You must also provide these additional required details (not shown in this example):

    • check in and out dates

    • guest count

"propertyFilter": {

"location": {

"type": "airportIATACode",

"details": {

"iataCode": "CDG"

},

"radius": {

"value": 5,

"unit": "mi"

}

}

}

Response

Depending on availability and search criteria, SearchComplete returns several instances of the object hotelsResponse/propertyItems. Each instance of propertyItems is a specific room available at a specified rate. In each instance, the property location is returned in the propertyInfo object, which returns multiple types of geographic details:

  • geolocation (coordinates of the property for this room)

  • distanceFromSearchPoint (in miles or kilometers as specified in the search)

  • address - per the example, this hotel is located in Paris

"propertyInfo": {

"geolocation": {

"center": {

"latitude": 48.8714,

"longitude": 2.3434

}

},

"distanceFromSearchPoint": {

"unitOfDistance": "Miles",

"value": 0

},

"address": {

"street": "30-32 BOULEVARD POISSONNI RE",

"city": "PARIS",

"countryCode": "FR",

"postalCode": "75009"

},

},

Use case v11: Search by Location API

See the JSON Hotel APIs Guide for more about the Hotel Search APIs and which to use after v12 is released.

Action

Goals and steps

Code Example

Request

To search by airport:

  1. In the Search by Location request payload, provide the required location details for the airport:

    • discriminator @type of SearchByAirport for the SearchBy object

    • IATA city code CDG

    • Search radius around the airport

    • Specify either Miles or Kilometers as the unit of measure for the search radius

  2. You must also provide these additional required details in these objects (not shown in the code example):

    • check in and out dates

    • guest count

  3. Send the request to the Search by Location API endpoint.

"SearchBy": {

"@type": "SearchByAirport",

"SearchRadius": {

"value": 25,

"unitOfDistance": "Miles"

},

"SearchAirport": "CDG"

}

Response

Depending on availability and search criteria, the Search by Location API returns several instances of the object Properties/PropertyInfo. Each instance of PropertyInfo is a specific room available at a specified rate. In each instance, the property location is returned in the GeoLocation and Address objects.

Per the example, location data shows the geographic coordinates and hotel address in Paris.

"GeoLocation": {

"latitude": 48.8714,

"longitude": 2.3434

},

"Image": [

{...}

],

"Address": {

"@type": "Address",

"AddressLine": [

"30-32 BOULEVARD POISSONNI RE"

],

"City": "PARIS",

"Country": {

"value": "FR"

},

"PostalCode": "75009"

},

"Telephone": [...],

},