Return Additional Search Results
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 pagination
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
|
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.
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
|
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.
|
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. |