Step 2 - API key
Now that the endpoint has been updated we now need to update the API key. It used to be sent from the body with the apiKey attribute.
Now you have to add a header to the request called x-api-key with the API key as the value.
The header you need to add to your request to /indicative/search
info
What are the variables
- {endpoint} :
browsequotes,browseroutesorbrowsedates
curl --location --request POST 'https://partners.api.skyscanner.net/apiservices/{endpoint}/v1.0/' \
--header 'x-api-key: prtl6749387986743898559646983194' \
--data-raw '...'
info
Differences between v1.0 to v3:
v1.0 (before)
curl --location --request POST 'http://partners.api.skyscanner.net/apiservices/{endpoint}/v1.0/' \
--data-urlencode 'cabinclass=Economy' \
--data-urlencode 'country=UK' \
--data-urlencode 'currency=GBP' \
--data-urlencode 'locale=en-GB' \
--data-urlencode 'apikey=prtl6749387986743898559646983194'
v3 (after)
curl --location --request POST 'https://partners.api.skyscanner.net/apiservices/v3/flights/indicative/search' \
--header 'x-api-key: prtl6749387986743898559646983194' \
--data-raw '...'