Airlines
You can use the 'includecarrierrs' and “excludecarriers” option. This removes any airlines from the API response so they’ll not be seen – but it doesn’t do the same job for travel agents (worth knowing in case airlines need filtered out quickly).
Agents
To get rid of an agent – the easiest way is to do a quick lookup in the API response for “Agents”:
"Agents":
[ {
"Id": 1963108,
"Name": "Mytrip",
"ImageUrl": "https://s1.apideeplink.com/images/websites/at24.png",
"Status": "UpdatesComplete",
"OptimisedForMobile": true,
"BookingNumber": "+448447747881",
"Type": "TravelAgent"
},
With this, you can see a particular partner and their “Name” – so keep a note of the “Id” number. Elsewhere in our API results, every price we get for a particular itinerary and the “Id” is used to show all the agents.
In the “PricingOptions” segment for each itinerary, you can see this ID being used:
"PricingOptions": [ {
"Agents": [ 4499211 ],
"QuoteAgeInMinutes": 0,
"Price": 83.41,
"DeeplinkUrl": "https://partners.api.skyscanner.net/apiservices/deeplink/v2?_cje=jzj5DawL5zJyT%2bnfe1..."
},
With some coding, you can skip this result / hide it before you show it to your users.
Comments
0 comments
Please sign in to leave a comment.