B2B Api
B2B 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
Query Parameters
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.
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
Query Parameters
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: [email protected]' \
--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
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" :"[email protected]","mobile":"9818278417","mobileISD":91,"interactionId":""},
"emailId":"
[email protected]","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}]}}}}}