Search API
This module helps to search flights based on the origin, destination, date of travel, preferred
class etc. 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)
Endpoint
For Domestic Flight Search:
https://securerfs.yatra.com/flightsapi/air-service/b2bdomapi/search
For International Fight Search: https://securerfs.yatra.com/flightsapi/air-service/b2bint/search
Request Method
GET
Response Code
200
Headers
Key Description Data Type Values
emailId User’s Email Id Text User mail id
b2bproduct@yatra.com
password User’s Password Text Users password
b2brfs@123
apiKey User’s API Key Text Users api key
631c3e5e-22e4-410a-8438-d50327f41a08
Query Parameters
Key Description Data Values Mandatory
Type
type O = One Way Trip, R Text eg: O, R No
= Return Trip (only
accept mention 2
values)
viewName Normal Text normal No
flexi FareType Text 0 No
noOfSegments Number of Integer eg: 1,2 ... n No
segments based on
trip type(oneway,
roundtrip,
multicity) check
below note.
origin origincitycode Text eg: DEL Yes
originCountry origin Text eg: IN No
country(based on
universal country
code)
destination destination city Text eg: BLR Yes
code.
destinationCountry destination Text eg: IN Yes
country (based on
universal country
code)
flight_depart_date Flight departure Date Format - Yes
date (DD/MM/YYYY)
flight_return_date Flight Date Format - No
arrival/return date (DD/MM/YYYY)
flight_depart_date first departure Date Format - No
_0 date (in case of (DD/MM/YYYY)
multicity search)
ADT No of adults Integer eg: 1,2 Yes
CHD No of child Integer eg: 1,2 Yes
INF No of infants Integer eg: 1 Yes
class Type of class(only Text eg: Economy, Yes
accept mention 4 Business, First,
values) Special
hb Hand baggage Integer eg: 0 No
source fresco-home No
booking-type official No
Note:
For noOfSegments argument it is working with all integer(I tried till 1000 randomly) and giving
same response for all request except the ssci is change everytime.
Sample requests for Search
For Domestic flights:
curl --location 'https://securerfs.yatra.com/flightsapi/air-service/b2bdomapi/search?
type=O&viewName=normal&flexi=0&noOfSegments=1&origin=DEL&originCountry=IN&
destination=GOI&destinationCountry=IN&flight_depart_date=10%2F02%2F2024&ADT=
1&CHD=0&INF=0&class=Economy&hb=0&source=fresco-home&booking-type=official' \
--header 'emailId: b2bproduct@yatra.com' \
--header 'password: b2brfs@123' \
--header 'apiKey: 631c3e5e-22e4-410a-8438-d50327f41a08' \
--header 'Content-Type;'
For International Flights:
curl --location 'https://securerfs.yatra.com/flightsapi/air-service/b2bint/search?
type=O&viewName=normal&flexi=0&noOfSegments=1&origin=DEL&originCountry=IN&
destination=DXB&destinationCountry=AE&flight_depart_date=10%2F12%2F2024&ADT=
1&CHD=0&INF=0&class=Economy&hb=0&source=fresco-home&booking-type=official' \
--header 'emailId: b2bproduct@yatra.com' \
--header 'password: b2brfs@123' \
--header 'apiKey: 631c3e5e-22e4-410a-8438-d50327f41a08' \
--header 'Content-Type;'
Note:
When you copy the above CURL, just change date to DD/MM/YYYY format, otherwise it gives
invalid date error.
API Result:
PriceAPI
Price API gets the result of selected flights and requests additional information about flight
details.
Endpoints
https://secureqa.yatra.com/flightsapi/air-service/b2bdomapi/price
Request Method
GET
Response Code
200
Headers
Key Description Data Type Values
emailId User’s Email Id Text User mail id
b2bproduct@yatra.com
password User’s Password Text Users password
b2brfs@123
apiKey User’s API Key Text Users api key
631c3e5e-22e4-410a-8438-d50327f41a08
Query Parameters
Key Description Data Values Mandatory
Type
searchId Unique search Text and abedf6ad-41e3-
identifier which is int 4a4d-8b70-33
used in search API 2cedfac3cc
msid Master searchid Text and abedf6ad-41e3-
(same as searchid) int 4a4d-8b70-33
2cedfac3cc
searchId Unique search Text and abedf6ad-41e3-
identifier which is int 4a4d-8b70-33
used in search API 2cedfac3cc
mode Mode. Usually it's Text Instant,
instant background
sc Suppliercode Text and GALDOM, 6EAPI
int
flightIdCSV Id of flight. It’s a Text BLRDELAI5032023
combination of 0816P702 9154
origin code,
destination code,
flight code, flight
number, departure
date and supplier
codes
flightPrice Flight price Int/float 7850.55
bpc Bypass cache boolean true
isSR Is special return boolean False
Sample Request for Price
For Domestic:
curl --location 'https://secureqa.yatra.com/flightsapi/air-service/b2bdomapi/price?
searchId=3793040c-18cf-41bd-9066-eea8807d6829&msid=3793040c-18cf-41bd-9066-
eea8807d6829&mode=Instant&sc=GALDOM&flightIdCSV=DELAMDAI48120231231AMD
BOMAI63220231231BOMGOIAI68320231231P2800992&flightPrice=16003&bpc=true&i
sSR=false' \
--header 'emailId: b2bproduct@yatra.com' \
--header 'password: b2brfs@123' \
--header 'apiKey: 631c3e5e-22e4-410a-8438-d50327f41a08'
For International:
curl --location 'https://secureqa.yatra.com/flightsapi/air-service/b2bint/price?
searchId=86213366-633a4fae-b512-2f5676322050&msid=86213366-633a-4fae-b512-
2f5676322050&mode=Instant&sc=SGAPI&flightIdCSV=DELDXBSG1120231231SGCPN_N
016&flightPrice=20521&bpc=true&isSR=false' \
--header 'emailId: b2bproduct@yatra.com' \
--header 'password: b2brfs@123' \
--header 'apiKey: 631c3e5e-22e4-410a-8438-d50327f41a08'
Review/Booking API
It saves the traveler details including ssr which are entered after successful pricing. When the
trigger API is called, internally it hits payment API and if payment is successful, then it returns a
successful booking.
Endpoints
https://securerfs.yatra.com/flightsapi/air-pay-book-service/b2bdomapi/booking/pool/trigger
Request Method
POST
Response Code
200
Headers
Key Description Data Type Values
emailId User’s Email Id Text User mail id
b2bproduct@yatra.com
password User’s Password Text Users password
b2brfs@123
apiKey User’s API Key Text Users api key
631c3e5e-22e4-410a-8438-d50327f41a08
Body
pricingId : we get the pricing id when the pricing api is called.
superPnr : It is generated at the time of pricing
reviewJSON : We need to edit the values of some nodes in review json
{"globalParams":{"pricingId":"2176bb0b-d1d3-4c0f-9f6f-84b2302ac229","searchId":"3793040c
18cf-41bd-9066-
eea8807d6829","superPnr":"2212230008591","channel":"b2b","product":"fligh
t","url":"https://secure.yatra.com/checkout-ui/b2bdomapi/price?searchId=3793040c-18cf-
41bd 9066-eea8807d6829&msid=3793040c-18cf-41bd-9066-
eea8807d6829&mode=Instant&bpc=tr
ue&flightIdCSV=DELAMDAI48120231231AMDBOMAI63220231231BOMGOIAI68320231231
P2800992&flightPrice=&sc=GALDOM&ref=2212230008591&sst=true&pid=2176bb0b-d1d3-4
c0f-9f6f-84b2302ac229&isHff=false&isSR=false&variation=0&newUi=false","ftype":"O","org":"
DEL","dest":"GOI","changeFlightUrl":"https://flight.yatra.com/air-search-ui/b2bdomapi/
trigger?t
ype=O&viewName=normal&flexi=0&noOfSegments=1&origin=DEL&originCountry=IN&destin
ation=GOI&destinationCountry=IN&flight_depart_date=31/12/2023&ADT=1&CHD=0&INF=0&
class=Economy&unique=1703186039902&newUi=false","isPartial":false,"ebs_accountId":"10
26","ebs_sessionId":"9f3e2eeafa0bddf19436777de5db2e","rurl":"https://secure.yatra.com/che
ckout-ui/b2bdom/confirmation","moProfileType":"CASH","childTenant":"b2bdomapi","variatio
n" :1},"addOnParams":[],"hotelCrossSellParams":{"isHotelCrosssellBooking":false,"hotelBooking
RequestJSON":""},"productParams":
{"tripType":"O","amountDisp":"16003","displayMarkup":"0" },"promoParams":
{"status":false,"promoCode":"","isReadonly":false,"amount":0,"ecashAmount
":0,"promoType":"","msg":"","authCode":"","category":"","seat":false,"meal":false,"disableYlp"
:f alse,"disableDiscountDisplay":false,"dpsTestNo":0},"userParams":{"additionalContact":
{"email" :"b2bproduct@yatra.com","mobile":"9818278417","mobileISD":91,"interactionId":""},
"emailId":"
b2bproduct@yatra.com","mobileNo":"9818278417","userId":"363411","title":"","firstName":"
Ra shid","lastName":"khan","mobileNoISD":"91"},"travellerParams":[{"travellerDetails":
{"id":"","title
":"Mr","firstName":"TESTS","middleName":"","lastName":"TEST","paxClass":"Adult","passeng
erClass":"ADT","dateOfBirth":"","passport":
{"nationality":"","number":"","issuingCountryCode":"
","issuingCountryName":"","expiryDate":""},"frequentFlyer":{}},"paxID":1,"ssrDetails":{"ssrMeal
Details":[],"ssrBaggageDetails":[],"ssrSeatDetails":
[[{"rph":"1","uid":"1","seatValue":"11B","price
":150,"isdata":true,"pax":"0","trip":"O","arrloc":"GOI","deploc":"DEL"}]],"ssrOtherDetails":
[]}}],"g stDetails":{},"discountParams":{},"totalBreakup":{"meals":
{"amount":0,"label":"Meals"},"baggag e":{"amount":0,"label":"Baggage"},"seats":
{"amount":150,"label":"Seats"},"others":{"amount":0, "label":"OthersCharges"},"insurance":
{"amount":0,"label":"TravelInsurance"},"save.child":{"am
ount":0,"label":"TAKEOFFContribution"},"CLIMES":{"amount":0,"label":"CarbonEmission"},"SD
FC":{"amount":0,"label":"SameDayCancellationProtection"},"DFC":{"amount":0,"label":"Cancell
ationProtection"},"BBG":{"amount":0,"label":"BestbuyAssurance"},"beingHuman":
{"amount":0," label":"BeingHumanContribution"},"matrix":
{"amount":0,"label":"MATRIXCallingCard"},"SBICall ingCard":
{"amount":0,"label":"SBICallingCard"},"markup":{"amount":0,"label":"Markup"}},"adva
ncedPricing":{},"upSellParams":[],"gaResponse":{"data":[{"id":"1807230051626","name":"DOM
Flights","category":"DOMFlights/Economy/Afternoon/1/DEL-
GOI","brand":"Airindia","variant":"
OneWay","price":"9577"}],"action":"event","actionData":"checkout","actionObj":
{"step":1,"optio n":"PayNow:CreditCard-Quickbook"},"event":"Flights-Payment-DOM|
CurrentSelection|PayNo w"},"uiParams":{"gaTrackingData":
{"event":"checkout","tripType":"OneWay","lob":"Flight","eco mmerce":{"checkout":
{"actionField":{"step":2,"option":"PaymentDetail"},"products":[{"name":"D EL|
GOI","id":"DELAMDAI48120231231AMDBOMAI63220231231BOMGOIAI68320231231","p
rice":16003,"brand":"Airindia","category":"domestic","variant":"0Stop","quantity":1}]}}}}}