Refresh Prices
A request for refresh prices will return the most up-to-date prices for the selected itinerary. Some of the prices returned in the previous requests might be cached and slightly older. By creating a refresh prices session you'll receive the most up-to-date price which we can get from our partners.
Sample requests
/itineraryrefresh/create
In the response from the /create
retrieve the sessionToken
and paste it in the /itineraryrefresh/create
URI replacing the SESSION_TOKEN
placeholder below. Also replace the ITINERARY_ID
placeholder with the itinerary id requested for price refresh:
curl --request POST 'https://partners.api.skyscanner.net/apiservices/v3/flights/live/itineraryrefresh/create/SESSION_TOKEN-cells1' --header 'x-api-key: your-api-key' --data ' {
"itinerary_id": "ITINERARY_ID"
}'
/itineraryrefresh/poll
In the response from the /itineraryrefresh/create
retrieve the refreshToken
and paste it in the /itineraryrefresh/poll
URI replacing the REFRESH_SESSION_TOKEN
placeholder as below:
curl --location --request GET 'https://partners.api.skyscanner.net/apiservices/v3/flights/live/itineraryrefresh/poll/REFRESH_SESSION_TOKEN' --header 'x-api-key: your-api-key'
Performance
When it comes to the performance metrics related to itinerary refresh, it's important to consider the time it takes for the search to be completed, which can vary depending on the age of the session (the amount of time since the original live prices search).
Within 10 minutes
Refresh requests within 10 minutes of the initial search are likely to complete immediately. This is because we cache prices, with a TTL of 10 minutes to ensure price accuracy.
Between 10 minutes and 1 hour
If the refresh request is made between 10 minutes and 1 hour after the initial search, there may be an increase in the time it takes the refresh to complete. This is because fresh quotes and prices may need to be fetched from our supply partners, which takes some additional time compared to returning cached data. Note that even though performance may be affected, it enables us to return more accurate prices.
More than 1 hour
If the refresh request is made more than 1 hour after the initial search, there is a further increase in the time it takes the refresh to complete. In such cases, a new full search is required to generate fresh itineraries and quotes. This process is similar to performing a new flight search from scratch, which takes longer to obtain updated results.
Overall, our API provides efficient itinerary refresh capabilities with varying performance based on the time elapsed since the initial search. The API's performance is optimized for quick updates within the first hour, while longer durations may result in increased time for the refresh to complete, as fresh data is retrieved.
API documentation
For more information please see flights live prices API documentation.