Skip to main content

Step 5 - Session token

Now when we get back the response from the /search/create we can get the session token.

The session token can now be retrieved from the body response on v3 rather than the header location on v1.0

{
SessionToken: '[your-session-token-here]'
"status": "RESULT_STATUS_INCOMPLETE",
"action": "RESULT_ACTION_REPLACED",
"content": {...}
}

Great! We have now migrated the create search endpoint 🥳

We have our session token that you can use for polling flight to get all the search results

tip

You can now start showing your flight results

With the v3 response for /search/create we send back the flight search data alongside the SessionKey, so you can start showing results straight away.

The data returned from the /search/create endpoint is not the full results but part of them, to retrieve all of the data you will need to use the poll search endpoint.

You can see an index on the changes to the response so you can map the fields correctly Response Mapping Index

That's it for the /search/create! You can now use /search/poll endpoint to check for the search to be finished.