0% found this document useful (0 votes)
102 views38 pages

Yatra Flight API - V1.0

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views38 pages

Yatra Flight API - V1.0

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 38

API

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

The sales process includes Search, Pricing and Booking.


1. Search: This module helps to search flights based on the origin, destination, date
of travel, preferred class etc. It returns a list of flight options to offer to the traveler.
2. Pricing: This module re-prices the selected flight option(s) to ensure the seat and price
is still available. In case there is an increase in price in the flight it offers the new price to
the customer.

3. Bookings/Confirmation: After successful payment based on the payment terms


agreed, the flight booking is made with the airline system and the booking confirmation
details are sent back to the customer.

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)).

■ Key parameters in search response json:


1. scid(searchId): This is a unique id which is unique to
every search hit to the Api.
2. “fltSchedule” (Flight Schedule): This node is a key node since
it contains search id, flight ids,airline names,city names,airport
names and absence of this node could imply invalid
response.
3. "fareDetails"(Fare Details): This node provides us with
complete fare information of all the flights available for each
supplier including the base fare,total fare,tax breakup for
adult,children
,infant separately.

Name of the node Type description

Json.eagerFetch String Always true in this


case

resultData List of objects Json array of flight


data

resultData.isFlights Integer No. of Flights Found


(if 0 ,no flights were
found for the given
search).

resultData.isError Integer No. of Errors Found


in Search Response

resultData.iswarnings integer No. Of warnings


found in search
response

resultData.flt object This node contains


Schedule the flight schedules
for the corresponding
search done.

resultData.fltSchedule.s String Search Id (Unique


cid to every search)

resultData.fltSchedule.fli List of objects Unique key which


ghtArray[] includes
origin+destination
+date, two keys like
this are present in
case of round trip.
■ Search response Json description:

resultData.fltSchedul String Flight id ,of the


e.flightArray[].ID type:”DELBOMSG15
7 SG20160719”

Mode of search
resultData.fltSchedul String
,instant
e.flightArray[].mode

resultData.fltSchedul String The search


e.flightArray.supplier response is
Code aggregated from
different suppliers
which have unique
supplier code,each
supplier provide
multiple flights
Contains all details
resultData.fltSchedul List of objects
about that particular
e.flightArray.OD[]
flight

Always NF i.e normal


resultData.fltSchedul String
fare
e.flightArray.OD[].fTy
pe

resultData.fltSchedul Integer Baggage Allowance


e.flightArray.OD[].bga

resultData.fltSchedul boolean Hand baggage


e.flightArray.OD[].isH allowance flag,if
B true,only hand
baggage is allowed in
the given flight.

resultData.fltSchedul String Cabin class type


e.flightArray.OD[].isH :Economy/Premium/
B.classtype Business class

resultData.fltSchedul Integer Yatra Loyalty Points(e


e.flightArray.OD[].ylp cash earned by the
user if the given flight
is booked )
resultData.fltSchedul String Flight id of the type
e.flightArray.OD[].fid (DELHYD6E76520170
331HYDBLR6E15120
170331)

resultData.fltSchedul String Time duration of the


e.flightArray.OD[].tdu given flight

In format: "02:10"

resultData.fltSchedul List of flight Flight Segment


e.flightArray.OD[].FS[] segments (Multiple in case of
multi city flights)

resultData.fltSchedul Airline code Validating carrier code


e.flightArray.OD[].FS[]. OR Marketing airline
vc code if Validating
carrier code is not
present

resultData.fltSchedul String Airline Code


e.flightArray.OD[].FS[]. like “SG”,”I5”
ac

resultData.fltSchedul String DepartureAirport


e.flightArray.OD[].FS[]. country name
dcn

resultData.fltSchedul String ArrivalAirport country


e.flightArray.OD[].FS[]. name
acn

resultData.fltSchedul String Equipment name


e.flightArray.OD[].FS[].
eq

resultData.fltSchedul String Stop over


e.flightArray.OD[].FS[].
so
resultData.fltSchedul String FareBasis code
e.flightArray.OD[].FS[].
fbc

resultData.fltSchedul Not applicable here


e.flightArray.OD[].FS[].
isCorp

resultData.fltSchedul boolean 1 if markup is enable


e.flightArray.OD[].FS[]. else 0
isCommF

resultData.fltSchedul Not applicable here


e.flightArray.OD[].FS[].
isWFare

Flight number
resultData.fltSchedul Integer
e.flightArray.OD[].FS[]
. fl

resultData.fltSchedul String Departure Airport


e.flightArray.OD[].FS[]. Location Code
dac
Ex. “DEL”,”BOM

Arrival Airport
resultData.fltSchedul String
Location Code
e.flightArray.OD[].FS[].
aac

Departure Airport
resultData.fltSchedul String
Terminal
e.flightArray.OD[].FS[].
ddt

resultData.fltSchedul String Arrival date


e.flightArray.OD[].FS[].
adt

resultData.fltSchedul String Operating


e.flightArray.OD[].FS[]. Airline Code
oac
resultData.fltSchedul String Departure Airport
e.flightArray.OD[].FS[]. Terminal
dt

resultData.fltSchedul String Arrival Airport


e.flightArray.OD[].FS[]. Terminal
at

resultData.fltSchedul boolean if ft=1 ,then flight is


e.flightArray.OD[].FS[] refundable, if ft=0 ,
. ft then flight is non
refundable

Object Contains names of all


resultData.fltSchedul
airlines available for
e.airlineNames
the search done.

Object This node gives the


resultData.fltSchedul
names of all the cities
e.cityNames
corresponding to the
search response.

Object This node gives the


resultData.fltSchedul
different labels
e.cityNames.taxlabel
applicable.

Object This node gives the


resultData.fltSchedul
names of all the
e.cityNames.taxlabel.
airports
airportNames
corresponding to the
search response.

■ 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": {

2. "O": { for one way

3. "ADT": { (Similar response for child:CHD and infant:INF)

4. "bf": "2250" Base Fare

5. "tf": "3356" Total Fare


6. “Fsc”: ”4100” Fuel Surcharges

7. “Af”: “25790” Airline fare

8. “Crmkp”: “0.0” Not applicable here

9. “OTRonly”: “1220” Some of other taxes

10. “OTR”: “1220.0” Some of other taxes excluding markup

11. “OC”: “0.0” Other charges

12. “totcrmkp”: “0.0” Not applicable here

13. "px": "ADT" Passenger Type Code

14. "qt": "1" Passenger Type Quantity

15. "YQ": "200" Tax YQ (Airline Fuel Surcharges)

16. "PSF": "149" Tax PSF (Passenger Service Fee)

17. "UDF": "562" Tax UDF (User Development Fee)

18. "GST": "145" Tax GST (Govt. Service Tax)

19. "SBC": "0" Tax SBC (Swachh Bharat Cess)

20. "TF": "50" Tax TF ( CUTE Fee)

21. "WC": "0" Tax WC (Arrival User Development Fee)

22. "DF": "0" Tax DF (Development Fee)

23. “ppamt”: Partial payment amount(in case of INT flights) if

applicable else NA

24. “ppba”: Partial amount balance(in case of INT flights) if

applicable else NA

25. “ppdd”: Partial payment due date if 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

28. “icb”: Not applicable here

29. “mua”: markups if any

30. “dpmua”: Not applicable here

31. “icbdb”: Not applicable here

32. “dpFlag”: Not applicable here

33. “wholesalerfee”: Booking fee

34. “wsfigst”: Igst on booking fee

35. “wsfcgst”: Cgst on booking fee

36. “wsfsgst”: Sgst on booking fee

37. “wsfutgst”: Utgst on booking fee

38. “wholesalerfeewithGst”: total booking fee inclusive of gst

39. “totalcrdis”: Not applicable here

40. “spl”: 1 for special fare else 0

41. “occt”: checks if operating airline is same as marketing

airline.If not gives operating airlines description or some

message stating "This airline is operated by..." if operating

airline description is not present

42. “vac”: Validating carrier( in case of INT flights)

43. “at”: Arrival airport terminal

44. “tv”: Transit details( in case of INT flights)


g. Sample response of round trip: Refer to Sample Responses Document(sample
response(round trip)).

■ Search response json description(round trip):

1. "eagerFetch": "true": If true both fare detail and flight schedule


will be present. If false then only the flight schedule will be
present.
2. "scid": " " : Search Id (Unique to every search)
3. Two keys of this type are present in case of round trip:
4. "DELBOM20160719": Unique key which
includes origin+destination +date of onward trip
5. “BOMDEL20160719” : Unique key which
includes origin+destination +date of return trip
■ Fare details:"fareDetails": Generally fare details has one node:”O” but
another node “R” also exists in this round trip case which indicates
special return trip discount and allows the user to make special round trip
saving if opted for round trip in search and only if airline(6EAPI) is same
for both sides (DEL-BOM) and (BOM-DEL)then we can pick R node for
fares even if there is only R for (DEL-BOM) and not for (BOM-DEL) then
it is on you whether to pick OO, OR, RR, RO but this can be done only if
the supplier is LCC and in case of GDS it is must that for both sides R
should be taken(DEL-BOM) and (BOM-DEL).
■ .
1. "DELBOMSG157SG20160719": {

2. "O": {

3. "ADT": { Adult

4. "bf": "2250" Base Fare

5. "tf": "3356" Total Fare

6. "px": "ADT" Passenger Type Code

7. "qt": "1" Passenger Type Quantity

8. "YQ": "200" Tax YQ

9. "PSF": "149" Passenger service fee

10. "UDF": "562" User development fee

11. "GST": "145" Tax GST


12. "SBC": "0" Tax SBC

13. "TF": "50" Tax TF

14. "WC": "0" Tax WC

Rest of the response nodes are the same as one way search.

2. Pricing: To fetch real time prices of selected flights.

a. Sample request url:

■ 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
------------------------------------------

Response of fare details from which tf is calculated

"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"
}
}
}
}
},

g. Sample Pricing response Json: Refer to Sample


Responses.pdf Document(sample response(Pricing)).
h. Pricing Json Response Description:
Name of the node Type Description

shouldRetry boolean false if pricing done


successfully else true to
retry

showcaptcha boolean true if dummy response else


false(Mostly false in our
case)

data.fltSchedule Object Flight schedule is given


now for the specific flight
on which the user clicks
book now. The
components of this node
have already been
explained in detail in the
search response json
description.

data.FS[].TourCode String This is the tour code that a


customer will get from the
airline end if he is a
frequent flyer.

data.cityNames Object This node gives the


names of all the cities
corresponding to the flight
user has selected.

data.airportNames Object This node gives the


names of all the airports
corresponding to the flight
user has selected.

data.airlineNames Object Contains the name of


the airline which is
operating the flight user
has selected.

data.mealOptions[ ].typ Object Type of meal

data.mealOptions[ ].amt Integer The price of meal (In


case of free meal - no
price)
data.mealOptions[ ].curr String The currency accepted
:“INR”

data.seats Object Seat options available to


opt by the user

data.seats.O Object Seat options for onward


journey

data.seats.R Object Seat options for return


journey

data.baggage Object Baggage options available


to opt by the user.

data.baggage.O Object Baggage options for


onward journey

data.baggage.baggageOpti List of objects This node contains


ons[ ] different types of baggage
options available to the
user.

data.baggage.baggageOpti String Specifies the type of


ons[ ].typ baggage

data.baggage.baggageOpti Integer Specifies the quantity of


ons[ ].desc baggage allowed.
Example:10/15kg

data.baggage.baggageOpti Integer The price to be paid for the


ons[ ].amt given baggage option
chosen.

data.baggage.baggageOpti String Currency accepted


ons[].curr

data.baggage.Convenience Object Convenience fee for


Fee every payment type
applicable.
data.baggage.Convenience Integer Payment type:credit card
Fee.cc

data.baggage.Convenience Integer Payment type:debit card


Fee.dc

data.passengerList[ ] List of objects Contains the list of


specifications of
passenger , first name
, middle name ,class ,
addons etc

isSr boolean A boolean flag to indicate


case of special return

pe boolean A boolean flag to indicate


price error if any.

peMsg Pricing error message

pc boolean A boolean flag to indicate


price change if any.

diff Integer The difference of price in


case of price change.

superPnr String super pnr

pricingId String Pricing id


isError boolean In case of an error pricing
response.

oldPrice Integer Old price in case of price


change.

isUpsell Not applicable here

ps Not applicable here

changeFlightUrl string Url to modify your search

isPartial Not applicable here

splitPnr boolean true if dummy response else


false(Mostly false in our
case)

oft boolean true if overlapping flight time


else false

hffRepriceError boolean true if error in HFF repricing


else false (in case of INT
flight )

paxnv string As of now Not applicable


here but in future may turn
pax name validation On so u
might get some json object

showdob date Date of birth box if true else


no need

userAgent string browser information

flightEndPoint string Endpoint which payments


will be hitting using to show
payment UI

ebs_sessionId String Encrypted pricingId

ebs_accountId Not applicable here

addons String Additional things such as


insurance

msg String Message to show after


session timeout
pricingurl String Url for pricing after session
timeout(if user opts to go
with same flight)

searchUrl String url to redirect to SRP page


after session timeout(if user
opts to go to search screen)

pricingServiceUrl String pricing url to hit service


directly

3. Booking/Confirmation(SaveReviewDetails): This api is used to save the passenger


details and other information about passenger preferences(meal,baggage,seats) in a
single json format.
a. Request Url:
http://203.189.91.50/flightsapi/air-pay-book-service/b2bdom/booking/pool/trigg
er
b. Request Headers:
■ apikey: {AGENT_API_KEY}
c. Request Type : Post

d. Sample form data:

■ pricingId: “2811-6e-90tyh56-2341-00-678”

■ superPnr : “4736271”

■ reviewJson : Refer to Sample Responses.pdf Document(ReviewJson).

e. Request Content Type: x-www-form-urlencoded

1. Review Json Description:

Name of the Node Type Description


globalParams Object Contains all
important parameters
required to save the
review details.
globalParams.pricingI String Pricing Id of the user
d
globalParams.searchI String Search id of the user
d
globalParams.superP String Super pnr of the
nr user
globalParams.channe String This node specifies
l the channel: “b2b”
needs to be given as
a value of this node.
globalParams.produc String This node specifies
t the product :“flight”
needs to be passed
as a value of this
node.
globalParam.ftype String “O” in case of one
way and “R” in
case of round trip

globalParam.org String Specifies the origin


of the type
:”DEL”,as specified
in search response
json.
globalParam.dest String Specifies the
destination , of the
type :”BOM”,as
specified in search
response json.

globalParam.isPartial boolean “false” to ask ?

globalParam.childTen String This node expects the


ant tenant value (given
from our end)
specified in the
search request ,
Ex.abcdom

globalParam.addOnP Object This node specifies


arams the add on
parameters like seat,
meal, baggage
,insurance
information .

globalParam.addOnP String The type of add


arams.addonType on taken by user

globalParam.addOn Label of the add on


P
arams.addonType.ad
donLabel
addonId Id of the add on

2. Mandatory Parameters:
Name of node Type Description

userParams Object This node contains all


the information about
the user
(name,mobile,email id
etc)

userParams.addition Object Details of additional


alContact contact

userParams.emailId String Email id of the user

userParams.mobileN String Mobile Number of the


o user

userParams.UserId String User id

userParams.title String Title of the user


(Mr./Mrs./Ms)

userParams.firstNam String First Name of the user


e

userParams.lastNam String Last name of the user


e

userParams. String ISD code of the


mobile number of the
mobileNoISD user.

3. Traveller Params:

travellerParams Object This node specifies


the information about
the travellers.

travellerParams.paxI String Passenger id of the


D user

travellerParams. String Traveller id

travellerDetails.id

travellerParams. String Title of the traveller


(Mr ,Mrs ,Ms.)
travellerDetails.title
The first letter of the
title being capital and
the rest of them
small.

travellerParams. String First name of the


traveller
travellerDetails.firstN
ame

travellerParams. String Middle name of the


traveller
travellerDetails.middl
eName

travellerParams. String Last name of the


traveller
travellerDetails.lastN
ame

travellerParams. String Class of the traveller (


economy/business
travellerDetails.paxCl etc)
ass

travellerParams. String Adult,child or infant in


the format of :
travellerDetails.paxCl “ADT”,”CHD”,”INF”
ass.

passengerClass

travellerParams. String Date of birth of the


traveler
travellerDetails.paxCl
ass.

dateOfBirth

travellerParams. Object Contains all the


passport details of
travellerDetails.passp the user
ort{}

discountParams Object This node contains


information about the
discount the user has
applied

discountParams.disc String The type of discount


ountType which is applied :
“ArmedForces” etc
discountParams.label String The label of the
discount for example
:”Armed Forces

Discount (-)”

discountParams.amo Integer The amount of


unt discount applied.

■ Total Break up: The total break up node contains the break up for all
add ons like meals + baggage + seats + insurance+markup and others.

totalBreakup Object This node contains all


nodes with fare break
ups

totalBreakup.meals Object This node contains all


information about
meals, its amount and
label (meal charges)

totalBreakup.baggage Object This node contains all


information about
baggage, its amount
and label(baggage
charges)

totalBreakup.seats Object This node contains all


information about seats,
its amount and label
(seats charges)

totalBreakup.other Object This node contains all


information about
others, its amount and
label.

totalBreakup.insurance Object This node contains all


information about
insurance(travel), its
amount and
label(insurance
charges).

totalBreakup.markUp Object This node contains all


information about
markup and its amount.
totalBreakup.discount Object This node contains all
information about
discount type,amount
and its label.

■ Sample Responses:

1. SAVE_REVIEW_FAILED:

a. occurs mainly when the pricing is unsuccessful for eg


shouldRetry is coming as true instead of false.

b. When a booking request is incorrect.

2. REQUEST_VALIDATION_FAILED: When superPnr, pricingid


or reviewJson has been passed in the wrong way or when the
request is unable to find the logged in profile info.

3. PAYMENT_DEDUCTION_FAILED: When sufficient amount is


not there in the logged in user’s wallet.

4. VALIDATE_PAYMENT_FAILED: When payment is done for the


mentioned pnr once and the user is hitting the same request
second time or when the pricing request is not hit correctly.

■ Sample Confirmation response json: If you receive booking status


success that means your booking is confirmed. In case of GDS booking,
you’ll get ticket no in mybookings itinerary API response that ensures that
your ticket is issued at airline end. You need to capture that ticket no at
your end. For round trip and multipax you’ll get separate ticket no for
each pax and each sector. Refer to Sample Responses.pdf
Document(Sample Confirmation Response).

Name of the node Type Description

Json.eagerFetch String Always true in this case

resultData List of objects Json Array of Flight


Data

resultData.isFlights Integer No. of Flights Found (if


0 ,no flights were found
for the given search).

resultData.isError Integer No. of Errors Found


in Search Response
resultData.isWarning Integer No. Of warnings found
in search response

resultData.fltSchedule Object This node contains the


flight schedules for the
corresponding search
done.

resultData.fltSchedule.s String Search Id (Unique


cid to every search)

resultData.fltSchedule.fli List of objects Unique key which


ghtArray[] includes
origin+destination
+date, two keys like
this are present in case
of round trip.

■ Sample response Json description: (Describing only the additional nodes


that are not discussed earlier)

Name of the node Type Description

data.fltSchedule.OD[].FS[ Object Flight schedule contains


].gdspnr the gds pnr of the
booking made for the
user.

data.fltSchedule.OD[].FS[ Object Flight Id for the flight


].fid booked.

data.ssrStatus Object This node gives details


of meals,baggage, seats
and other addons taken
by the user.

data.fareDetails Object This node contains all


the fare details
description.

data.supplierList Object List of supplier for the


booked flight
example:”SGNAV”

bookingStatus String This node is an


enum for booking
status
which can be :
(“success”,”failed”,
”partialConfirmed”)

bookingDate String Date of booking

paymentStatus boolean “1” indicates payment


successfully charged,
“0” :payment pending “2”
:partial payment
charged

sc Object This node contains


important information

sc.payProp Object This node contains all


payment related
properties like payment
id , ttid, payment type ,
mode, tenant id for the
booking.

sc.charges Object This node contains all


information related to
payment like: total fare,
balance amount, ecash
etc

sc.charges.tfp Integer The total fare price of


the flight booked

sc.charges.balAmount Integer The balance amount left


t in case of partial
payment case.

sc.charges.convfee Integer The convenience


fee charged

sc.charges.ecash Integer The ecash of the user


after the booking was
made.
sc.charges.amtpaid Integer This node contains the
total amount paid by the
use

passengerList Object This node contains all


the passenger related
information: name , date
of birth,class, addons
taken (meals,seats) etc

ewalletinfo Object This node contains all


information related to e-
wallet

isRschd boolean A flag that indicates it is


a rescheduling case or
not.

isSTU boolean A flag that indicates if


student fare is
applicable

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

ac string It is airline code

an string Airline name

fbc string FareBasis code

c string Airline cancellation fee

cp string Cancellation policy

chp string Change policy


depending on time

ri string Re-issuance

ft string Always NF i.e normal


fare

rt string Refund type(refundable


or non-refundable)

yof integer Yatra offline fee

yf integer Yatra online fee

camt integer Airline cancellation


amount

cm Not required

o origin

fsv string Flight Id

d String destination

u string Url of airlines

CNFBD string Cancellation charges


before departure

CNFAD string Cancellation charges


after departure

CHFAD string Change after departure

CHFNS string Change No Show(if


traveller doesn’t take the
flight or if he changes
the flight)

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 3 - If everything seems good on QA servers. Then we will give access of


Pre-Prod servers and again you have to verify Entire Search, Pricing. And Booking
Flow will be verified by the yatra team at the time of certification. And later you have to
share your UI credentials with us for certification purposes..

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.

You might also like