Return Additional Search Results

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.

Scope

This use case details how to retrieve an additional page of search results when a search finds more than 100 properties. This process is called paginationClosed Search setting in offersPerPage that controls the number of offers returned in the initial Search response. When pagination is requested, all offers are cached on the server but only the number in offersPerPage is returned in the initial response. Request additional offers by sending the Pagination request. **Also controls whether search results are cached. Without pagination, results for a journey-based Search request are not cached. If your workflow uses subsequent transactions that reference a Search result, you must request pagination and invoke caching. See the Pagination API Reference..

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

Additional search results are available only if the search returns more than 100 properties, as indicated by a value greater than 100 in pagination/totalItems. If totalItems returns a value less than 100, you may be able to return additional results by resending your SearchComplete request with less strict search criteria, such as by increasing the radius around your search point or, if searching by chain codes, increasing the number of chain codes sent.
  1. In the  SearchComplete Pagination request endpoint, per the following example:

    1. Send the value returned in the preceding SearchComplete response in pagination/paginationToken.

    2. Send the pageNumber query parameter set to the next page of results to retrieve.

     

If the SearchComplete response doesn't return paginationToken, all available search results are returned in the initial response, and pagination is not available.

 

Endpoint: 

GET

https://api.travelport.com/12/hotel/search/searchcomplete/8f81930b-b5c5-4188-9bb6-d21ca2570dae?pageNumber=2

Response

The response returns the next page of search results using the standard SearchComplete v12 response format. The response indicates that this is the second page of search results.

"pagination": {

"page": 2,

"pageSize": 100,

"totalPages": 5,

"totalItems": 470,

"paginationToken": "ec044728-a0bd-4757-bbd3-af9506060082"

},

 

Use case v11: Search by Location or ID 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

Additional search results are available only if the search returns more than 100 properties, as indicated by a value greater than 100 in Properties/totalProperties. If totalProperties returns a value less than 100, you may be able to return additional results by resending your Search by Location request with less strict search criteria, such as by increasing the radius around your search point. For Search by ID, add more property keys to your request.
  1. In the  Search Pagination request endpoint, per the following example:

    1. Send the value returned in the preceding search response in Properties/Identifier/value.

    2. Send the pageNumber query parameter set to the next page of results to retrieve.

     

 

 

Endpoint: 

GET

https://api.travelport.com/11/hotel/search/properties/b461b27d-5ca2-4387-a1b2-7d5ca263873d?pageNumber=2

Response

The response returns the next page of search results using the standard Search v11 response format. The response does not indicate what page of search results is returned.

None applicable.