Yatra Flight API - V1.0
Yatra Flight API - V1.0
Client
Onboarding Process
Table of Contents
Objective 3
Scope 3
Audience 3
Process 3
Reference Documents 4
Objective
Yatra is one of the largest online travel services companies in India, offering the widest range of
travel products at the most competitive rates. There are other travel businesses currently doing
business with Yatra either using the API or the B2B portal. The objective of this document is to
establish a smooth onboarding process for the upcoming API customers consuming Yatra’s
services.
Scope
The scope of this document is to define the process and guidelines for onboarding an
API customer.
Audience
The audience of this document are
● Product Team
● Integration Support Team
● Technology Team
Process
Typically, the integration of Yatra Flight API has two stages sales process and the sales
process
Sales Process
Pre-Requisites
After signing the Yatra Flight API contracta, a generic credential will be given to integrate the
Flight API. You may request for a specific credential for yourself which may take additional time.
You also need to send your IP/range from where we will receive the request. We need to whitelist
those IPs to provide you access.
Processes
1. Search: Every user/agent will be provided with a unique tenant value from our side,
which the user will have to incorporate in the request itself, different tenant values are
given for domestic and international separately . ie. b2bdom(for domestic search),
b2bint( for international search).
a. Sample Request Url:
■ One Way(Domestic):
http://203.189.91.50/flightsapi/air-service/b2bdom/search?type=O&vie
wName=normal&flexi=0&noOfSegments=1&origin=BOM&originCountry
=IN&destination=DEL&destinationCountry=IN&flight_depart_date=10/03
/2018&ADT=1&CHD=0&INF=0&class=Economy&hb=0&source=fresco-
h ome&booking-type=official
■ One Way (International):
http://203.189.91.50/flightsapi/air-service/b2bint/search?type=O&view
Name=normal&flexi=0&noOfSegments=1&origin=DEL&originCountry=I
N
&destination=SIN&destinationCountry=SG&flight_depart_date=14/12/2
017&ADT=1&CHD=0&INF=0&class=Economy&hb=0&source=fresco-h
o me&booking-type=official
■ Round Trip(Domestic):
http://203.189.91.50/flightsapi/air-service/b2bdom/search?type=R&vie
wName=normal&flexi=0&noOfSegments=2&origin=DEL&originCountry
=I
N&destination=BOM&destinationCountry=IN&flight_depart_date=02/01/
2018&arrivalDate=20/01/2018&ADT=1&CHD=0&INF=0&class=Econom
y &hb=0&source=fresco-home&booking-type=official
■ Round Trip(International):
http://203.189.91.50/flightsapi/air-service/b2bint/search?type=R&view
Name=normal&flexi=0&noOfSegments=2&origin=DEL&originCountry=IN
&destination=SIN&destinationCountry=SG&flight_depart_date=08/11/2
017&arrivalDate=13/12/2017&ADT=1&CHD=0&INF=0&class=Economy
& hb=0&source=fresco-home&booking-type=official
■ Multicity(Domestic):
http://203.189.91.50/flightsapi/air-service/b2bdom/search?viewName
=normal&flexi=0&type=M&ADT=1&CHD=0&INF=0&class=Economy&noO
fSegments=3&hb=0&unique=860814371532&flight_depart_date_0=23/
10/2017&origin_0=BOM&originCountry_0=IN&destination_0=DEL&desti
nationCountry_0=IN&flight_depart_date_1=31/10/2017&origin_1=DEL&
originCountry_1=IN&destination_1=MAA&destinationCountry_1=IN&flig
ht_depart_date_2=02/11/2017&origin_2=MAA&originCountry_2=IN&des
tination_2=BLR&destinationCountry_2=IN
b. Request Headers:
■ Email Id: [email protected]
■ Password: apitest1234
■ Apikey: f674b053-d558-49e1-b591-99d34d190d43
c. Request Type: GET
d. Url Path:
■ Search: For the agents to get search results.
■ Tenant name: Every user given a specific one (b2bdom here).
e. Request Parameters:
■ Type: O/R/M //triptype: (One way/round trip/multi city)
■ Number of segments: Number of segments based on trip type(one way,
round trip, multicity)
■ Origin: origin city code
■ originCountry: origin country(based on universal country code)
■ Destination: destination city code.
■ destinationCountry: destination country (based on universal country
code).
■ origin_0: first origin country(in case of multicity search)
■ destination_0: first destination country(in case of multi city search)
■ flight_depart_date: flight departure date
■ flight_return_date: flight arrival/return date
■ Flight_depart date_0: first departure date (in case of multicity search)
■ ADT: number of adults
■ CHD: number of children
■ INF: number of infants
■ Class: airline class(economy/business/premium economy)
f. Sample response for one way: Refer to Sample
Responses.pdf Document(sample response(one way)).
Mode of search
resultData.fltSchedul String
,instant
e.flightArray[].mode
In format: "02:10"
Flight number
resultData.fltSchedul Integer
e.flightArray.OD[].FS[]
. fl
Arrival Airport
resultData.fltSchedul String
Location Code
e.flightArray.OD[].FS[].
aac
Departure Airport
resultData.fltSchedul String
Terminal
e.flightArray.OD[].FS[].
ddt
■ Fare details: "fareDetails": Generally fare details has one node:”O” but
another node “R” can also exist which indicates special return discount
and allows the user to make round trip saving.(described in detail in round
trip cases).
1. "DELBOMSG157SG20160719": {
applicable else NA
applicable else NA
26. “hff”: true for hold bookings (in case of INT flights) if
applicable else false
27. “tktl”: ticketing time limit for hold bookings (in case of INT
flights) if applicable
2. "O": {
3. "ADT": { Adult
Rest of the response nodes are the same as one way search.
■ One Way(domestic):
http://203.189.91.50/flightsapi/air-service/b2bdom/price?searchId=36b3
4ff6-afe9-4e7e-b7d9-bcc74d535e71&msid=36b34ff6-afe9-4e7e-b7d9-bcc
74d535e71&mode=Instant&sc=6EAPI&flightIdCSV=BOMDEL6E2482017
1 010OTI029&flightPrice=8354&bpc=false&isSR=false
■ One Way(International):
http://203.189.91.50/flightsapi/air-service/b2bint/price?searchId=e978ee
b0-9db5-408a-a5af-f2b1ae2692e5&msid=e978eeb0-9db5-408a-a5af-f2b1
ae2692e5&mode=Instant&sc=6EAPI&flightIdCSV=DELBLR6E126201712
1
4BLRSIN6E7320171214OTI029&flightPrice=9081&bpc=false&isSR=false
■ Round trip(domestic):
http://203.189.91.50/flightsapi/air-service/b2bdom/price?searchId=10b4
6458-0fac-4b2e-8d9c-45a77fcfeff0&msid=10b46458-0fac-4b2e-8d9c-45a
77fcfeff0&mode=Instant&sc=6EAPI,GALDOM&flightIdCSV=DELAMD6E4
3
220180102AMDBOM6E31320180102OTI029,BOMDEL9W83920180420
P
2801942&flightPrice=7431&bpc=true&isSR=false
■ Round trip(international):
http://203.189.91.50/flightsapi/air-service/b2bint/price?searchId=5cd6f1
6a-c70d-4b58-a127-c3153e029345&msid=5cd6f16a-c70d-4b58-a127-c3
1
53e029345&mode=Instant&sc=6EAPI&flightIdCSV=DELBLR6E6695201
71
108BLRSIN6E7320171108,SINBLR6E5820171213BLRDEL6E60652017
12
13OTI029&flightPrice=19981&bpc=false&isSR=false
■ Multicity(domestic):
http://203.189.91.50/flightsapi/air-service/b2bdom/price?searchId=122c
d26e-f699-4b49-99be-24d7fb224230&msid=122cd26e-f699-4b49-99be-2
4d7fb224230&mode=Instant&sc=6EAPI&flightIdCSV=BOMDEL6E36122
0
171023OTI029,DELHYD6E601HB20171031HYDMAA6E121HB2017103
1O
TI029,MAABLR6E271HB20171102OTI029&flightPrice=15087&bpc=false
& isSR=false
b. Request Headers:
■ apikey: {AGENT_API_KEY}
c. Request Type: GET
d. Dependency: The pricing call is dependent on the search api for the
following request parameters:
■ SearchId: A unique search id is generated for every search done,
this search id is required as a request parameter in the pricing hit
and is available in the search response.
■ Msid: Generally it is the same as searchId but in some cases it
may be different.
■ flightIdCSV: This flight id is present in the search response and is
required as a request parameter in pricing call.
e. Request Parameters:
■ searchId =? (Present in the Search Response)
■ Mode =? ( Instant /Lazy/Background ) preferred mode is background.
■ Bpc = ? ( bypass cache ) if true the results will not come from cache.
■ isSR =? (Is special return ) Special return parameter explained in
previous section.
■ flightIdCSV =? Present in search response. It is of type
(DELBLRUK84920170331: made up of
:origin+destination+supplier code+flight number+date of travel)
■ flightPrice =? (The price of the flight shown to the user on search page )
f. Fare Breakup Calculation:
7236(bf) //base fare
150(fsc) //fuel and surcharges
211(OTR) //other charges
374(GAST) //gst
153(PSF) //passenger service fee
12(UDF) //User development
fee 10(wholeSalerFee)
//Booking fee 1.8(wsfIgst) //igst
------------------------------------------
8147.8(tf) //total fare
------------------------------------------
"fareDetails": {
"ylp": "0",
"icb": "0",
"DELPAT20180420": {
"DELPATG814920180420": {
"O": {
"ADT": {
"bf": "7236",
"tf": "8136.0",
"fsc": "150",
"px": "ADT",
"qt": "1",
"YQ": "150",
"GST": "0",
"GAST": "374",
"PSF": "153",
"UDF": "12",
"TF": "0",
"OC": "474",
"YST": "0",
"crmkp": "0.0",
"OTROnly": "100",
"OTR": "211.0"
},
"revisedFareDetails": {
"ylp": "",
"bf": "7236",
"fsc": "150",
"totcrmkp": "0.0",
"tf": "8147.8",
"nf": "8003.96",
"tsc": "0",
"tds": "7.57",
"OTROnly": "100",
"OTR": "211.0",
"tbf": "0",
"sr": "0",
"dmark": "0",
"crfee": "0.0",
"crdis": "0.0",
"dismrk": "0",
"mtf": "0",
"af": "7386",
"pta": "G8",
"servicetax": "0.0",
"commision": "151.41",
"YQ": "150",
"GST": "0",
"GAST": "374",
"PSF": "153",
"UDF": "12",
"TF": "0",
"OC": "474",
"YST": "0",
"dismark": "0.0",
"distmark": "0.0",
"gst": "0.0",
"igst": "18.0",
"cgst": "0.0",
"sgst": "0.0",
"utgst": "0.0",
"wholeSalerFee": "10.0",
"wsfIgst": "1.8",
"wsfCgst": "0.0",
"wsfSgst": "0.0",
"wsfUtgst": "0.0",
"sdistmark": "111.0",
"wholeSalerFeeWithGst": "11.8",
"totalcrdis": "151.41"
}
}
}
}
},
■ pricingId: “2811-6e-90tyh56-2341-00-678”
■ superPnr : “4736271”
2. Mandatory Parameters:
Name of node Type Description
3. Traveller Params:
travellerDetails.id
passengerClass
dateOfBirth
Discount (-)”
■ Total Break up: The total break up node contains the break up for all
add ons like meals + baggage + seats + insurance+markup and others.
■ Sample Responses:
1. SAVE_REVIEW_FAILED:
4. Fare Rules: This api contains fare details in case if a customer wants to
cancel the ticket like cancellation policy, return fare, partial cancellation policy.
1) Domestic Url:
http://203.189.91.50/flightsapi/air-service/b2bdom/getFareRules?fareBa
sisCode=XXXXX&AirlineCode=SG&resBookDesigCode=&searchId=671
47
4b9-6357-484c-ad07-c0d3c62e2799&supplierCode=SGAPI&flightIdCSV
= DELBOMSG15920180112??LKORT30000
2) International Url:
http://203.189.91.50/flightsapi/air-service/b2bint/getminifarerules?searc
hId=30f61ae1-b1e3-4119-b6c2-2b2c684362c2&sc=1AWSINT4&flightIdC
S V=CCUBOM9W62820180215BOMDXB9W58020180216DELYT33ZP
3) Baggage Info Url:
http://203.189.91.50/flightsapi/air-service/b2bint/getbaggageinfo?searc
hId=30f61ae1-b1e3-4119-b6c2-2b2c684362c2&sc=1AWSINT4&flightIdC
S V=CCUBOM9W62820180215BOMDXB9W58020180216DELYT33ZP
4) Request Headers:
a) Apikey: {AGENT_API_KEY}
5) Sample Response: Refer to the sample responses.pdf document.
6) Response description:
Name of the node Type Description
ri string Re-issuance
cm Not required
o origin
d String destination
Search Validation
- Origin destination will not be the same.
- Infant Count will be equivalent to Adult.
- Maximum 9 passengers can search at a time.
Passenger Validation
- No special characters will be allowed into the Passenger name.
- First name Minimum 1 Character and Maximum 32 Characters(Alphabets).
- Last Name Minimum 2 Characters and Maximum 32 Characters(Alphabets).
Certification Process:
Phase 1 - Development has to be done on QA servers. You have to verify the entire
Search, Pricing, Booking flow.
Phase 2 - Cancellation API(My-bookings) integration has to be done and verify the
cancellation.
Phase 4 - Once the certification is done by Yatra Team; We will share Production
credentials with You and then you can access it on Production.