- What you will find in this article
-Here you can find the procedure for how to get results through our API for AeroCRS and FlySafair.
- What are the steps
How to generate a token
- First, you need to generate a token, you can do that you go to the Public Access token and for the parameter client name put Unique Website Code that support gives to you. Also, you can find that code under the website settings:
How to search ONE WAY
- You can do the search and in the response, you will receive the flights from AeroCRS or FlySafair. You should take ItemId and SessionId, copy them and paste them into the method for adding the itinerary to the shopping cart:
How to search ROUND TRIP
If you want to add items to the shopping cart you should pay attention to:
1. parameter SectorSequence , because you can only add different in the shopping cart
(That means that you can add itemId from the "SectorSequence": 1 and "SectorSequence": 2 )
2. The procedure is that when adding to the shopping cart, you must separate the items with a Pipe or vertical bar "|".
3. You need the same provider Itineraries, which means that you can't add one AeroCRS and other FlySafair
Round Trip Errors
Here you can find possible errors if you search Round Trip for the AeroCRS and FlySafair:
-If you add one AeroCRS and one FlySafair to the shopping cart, you will receive the error all_itineraries_must_have_same_provider:
-If you add the same ItemId for the same SectorSequence then you will receive the error invalid_itineraries_added.
This is because you cannot add to the shopping cart 2 flights in the same direction you are looking for the round trip.
-If you want to search round trip and you copy and paste only one itemId, then you will receive the invalid_number_of_itinerarie because you looking for roundtrip and you need to add two itemId to the shopping cart:
Additional information
- In the response under the parameter "Matrix" you can find the lowest price as well as which airline is in question
- In the response under the parameter "AirlineFareFamilies" you can find the fare family display for a specific airline under the parameter "Owner":
- In the shopping cart in the response, you will see the price which will be the total price for both directions: