Our API has mobile optimisation features. These are notification of when a carrier has a mobile-optimised website; and pagination of results (downloading of results in instalments of a fixed size). The aim of these features is to reduce the payload downloaded on mobile devices, increasing performance and reducing consumption of a user's data allowance.
Without paging, you receive all itineraries available thus far in each poll. With paging, you receive a subset of available results (you choose how many) in each poll, and you can avoid repeatedly downloading lookup data you already have.
Example: you poll page 0 and find details of a flight with Acme Airlines. You store the Acme lookup details and skip downloading them again when another Acme itinerary appears in page 1. The Location header included in the page 0 poll response is the next poll URL with the lookup omissions pre-set in the query string; we assume you're saving them.
Pagination of session-polling results
The paging behaviour followed by your application should depend on whether the status of polling is UpdatesPending or UpdatesComplete:
UpdatesPending: keep requesting page 0 until UpdatesComplete.
UpdatesComplete: you may request any page, or download all results. We have no facility to tell you how many pages exist. Beyond the end of results, you will receive successful, empty, responses.
When the status is UpdatesPending, you should request only page 0 because the contents of each page are liable to change until updates are complete. Repeatedly requesting page 0 will show your users progressive results. Providing a (partial) result as soon as possible assures users that the system is working.
Supplying results in pages, rather than all results available, can reduce unnecessary downloading and enhance user experience. Loading time and scrolling are reduced. Note, however, that changing the sorting options changes the contents of each page. You may wish to omit lookup data in your polling, but receive all results, when sorting changes.
To use the pagination feature, you have to slightly modify your session-polling queries. Please refer to the Optional Parameters for Mobile Usage in session polling, in particular 'pageindex' and 'pagesize'.
Optimising polling of booking details
Pagination is not available when polling booking details, but you may omit lookup data you have already retrieved. Please refer to Optional Parameters for Mobile Usage in booking details polling.
The agent details in poll responses include a flag, OptimisedForMobile, indicating that the agent has a mobile-optimised website. This is provided for your information and does not change our deeplinking behaviour.