B2B Flight Search, Booking & Ticketing — UAT: https://apiuat.offshorefares.com/v2
Authorization: Bearer <token>X-Session: <sessionId>Content-Type: application/jsonAuthenticate an affiliate account and retrieve a secure JWT session token. Returns a signed bearer token valid for 1 hour (3600s).
| Field | Type | Description | |
|---|---|---|---|
| String | Yes | Affiliate email registered on OffshoreFares | |
| api_key | String | Yes | Unique B2B API developer key issued to the partner |
| company_name | String | Yes | Officially registered company name under the affiliate |
curl -X POST {{API_URL}}/v2/auth/token \
-H "Content-Type: application/json" \
-d '{
"email": "affiliate@travelpartner.com",
"api_key": "offshore_pk_live_89c72e18fa4b",
"company_name": "Global Travel Solutions Ltd"
}'
| Field | Type | Description |
|---|---|---|
| token | String | Signed JWT bearer credential |
| tokenType | String | Always "Bearer" |
| expiresIn | Integer | Token validity in seconds (3600) |
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"tokenType": "Bearer",
"expiresIn": 3600
}
Search available flights with pricing and itineraries. The response includes a sessionId that must be sent as the X-Session header on all subsequent calls. Sessions expire after 15 minutes of inactivity.
| Field | Type | Description | |
|---|---|---|---|
| depCity | String | Yes | Origin airport IATA code (e.g. "BOM") |
| arrCity | String | Yes | Destination airport IATA code (e.g. "DXB") |
| fromDate | String | Yes | Departure date — YYYYMMDD |
| retDate | String | No | Return date YYYYMMDD (round-trip only) |
| adultNumber | Integer | Yes | Adult count (age ≥12), 1–9 |
| childNumber | Integer | Yes | Child count (age 2–11), 0–9 |
| infantNumber | Integer | Yes | Infant-on-lap count (age <2), 0–9 |
| cabinClass | String | Yes | "E" Economy, "P" Premium Economy, "J" Business, "F" First |
| stops | String | No | "" All, "0" Non-Stop, "1" 1-Stop, "2" 2+ Stops |
| exclAirlines | Array | No | IATA codes to exclude (e.g. ["AI","BA"]) |
| inclAirlines | Array | No | IATA codes to restrict search to (e.g. ["YT"]) |
| refundable | Boolean | No | Filter by refundable fare only |
curl -X POST {{API_URL}}/v2/flights/search \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"depCity": "BOM",
"arrCity": "DXB",
"fromDate": "20261114",
"retDate": null,
"adultNumber": 1,
"childNumber": 0,
"infantNumber": 0,
"cabinClass": "E",
"stops": "0",
"exclAirlines": [],
"inclAirlines": ["YT"],
"refundable": true
}'
| Field | Type | Description |
|---|---|---|
| status | String | "SUCCESS" or "ERROR" |
| statusCode | Integer | HTTP status (e.g. 200) |
| msg | String | Human-readable processing message |
| sessionId | String | Unique session identifier — use as X-Session header moving forward |
| itineraries | Array | List of matching flight itinerary options |
| Field | Type | Description |
|---|---|---|
| itineraryId | String | Unique identifier for this itinerary (e.g. "ITI_0ec3d1df3be...") |
| productType | String | Inventory tier — "PUB" (public GDS) or "OFF" (offshore special) |
| fareType | String | Booking tier (e.g. "SAVER", "FLEX") |
| isRefundable | Boolean | Whether the itinerary allows cancellation refunds |
| journeys | Object | Contains onwardJourney and optional returnJourney |
| pricingBreakdown | Object | Monetary summary: base, tax, fees, markup, discounts, totals |
| fareRules | Object | Refund and change penalty policies in local currency |
{
"segmentId": Integer,
"flightDurationMinutes": Integer,
"carrier": {
"marketing": String,
"operating": String,
"validating": String,
"aircraftCode": String,
"flightNumber": String,
"operatingFlightNumber": String
},
"departure": {
"airport": String,
"terminal": String,
"dateTime": String // ISO 8601
},
"arrival": {
"airport": String,
"terminal": String,
"dateTime": String // ISO 8601
},
"bookingDetails": {
"cabinClass": String,
"rbd": String,
"fareBasis": String,
"seatsRemaining": Integer
},
"baggage": [{
"passengerType": String, // "ADT", "CHD", "INF"
"checkedPiece": Integer,
"checkedWeightKG": String,
"carryOnPiece": Integer,
"carryOnWeightKG": Integer
}],
"otherFareRules": Array
}
{
"currency": String, // e.g. "NPR"
"baseFareTotal": Number,
"taxTotal": Number,
"feeTotal": Number,
"otherTotal": Number,
"markupTotal": Number,
"discountTotal": Number,
"gstTotal": Number,
"grandTotal": Number,
"passengerFares": PassengerFare[]
}
{
"passengerType": String, // "ADT", "CHD", "INF"
"count": Integer,
"baseFarePerPassenger": Number,
"taxPerPassenger": Number,
"feePerPassenger": Number,
"otherPerPassenger": Number,
"markupPerPassenger": Number,
"gstPerPassenger": Number,
"discountPerPassenger": Number,
"totalPerPassenger": Number
}
{
"refund": {
"allowed": Boolean,
"fee": Number,
"currency": String,
"policyNotes": String
},
"change": {
"allowed": Boolean,
"fee": Number,
"currency": String,
"policyNotes": String
}
}
{
"status": "SUCCESS",
"statusCode": 200,
"msg": "success",
"sessionId": "ST_dc5ef320bf1442f0",
"itineraries": [{
"itineraryId": "ITI_0ec3d1df3be34316b0_PUB_01",
"productType": "PUB",
"fareType": "SAVER",
"isRefundable": true,
"journeys": {
"onwardJourney": {
"totalDurationMinutes": 25,
"stopsCount": 0,
"segments": [{
"segmentId": 1,
"carrier": {
"marketing": "YETI", "operating": "YT", "validating": "YT",
"aircraftCode": "", "flightNumber": "671", "operatingFlightNumber": "671"
},
"departure": { "airport": "BOM", "terminal": null, "dateTime": "2026-11-14T07:20:00" },
"arrival": { "airport": "DXB", "terminal": null, "dateTime": "2026-11-14T07:45:00" },
"flightDurationMinutes": 25,
"bookingDetails": { "cabinClass": "E", "rbd": "Y", "fareBasis": "YOWNEPAL", "seatsRemaining": 9 },
"baggage": [{ "passengerType": "ADT", "checkedPiece": 1, "checkedWeightKG": "15", "carryOnPiece": 1, "carryOnWeightKG": 7 }],
"otherFareRules": []
}],
"layovers": []
},
"returnJourney": null
},
"pricingBreakdown": {
"currency": "NPR", "baseFareTotal": 14200, "taxTotal": 0,
"feeTotal": 0, "otherTotal": 0, "markupTotal": 0,
"discountTotal": 0, "gstTotal": 0, "grandTotal": 14200,
"passengerFares": [{
"passengerType": "ADT", "count": 1, "baseFarePerPassenger": 14200,
"taxPerPassenger": 0, "feePerPassenger": 0, "otherPerPassenger": 0,
"markupPerPassenger": 0, "gstPerPassenger": 0,
"discountPerPassenger": 0, "totalPerPassenger": 14200
}]
},
"fareRules": {
"refund": { "allowed": true, "fee": 0, "currency": "NPR", "policyNotes": "Refundable up to 2 hours before departure" },
"change": { "allowed": true, "fee": 1500, "currency": "NPR", "policyNotes": "Date change charges apply plus fare difference" }
}
}]
}
Re-price a selected itinerary before booking. Executes a real-time validation to guarantee availability and lock the currency-specific tariff layout. Revalidation calls also reset the 15-minute session idle timer.
| Field | Type | Description | |
|---|---|---|---|
| itineraryId | String | Yes | The itinerary ID from search results (e.g. "ITI_0ec3d1df3be...") |
curl -X POST {{API_URL}}/v2/flights/revalidate_fares \
-H "Authorization: Bearer <token>" \
-H "X-Session: <sessionId>" \
-H "Content-Type: application/json" \
-d '{
"itineraryId": "ITI_0ec3d1df3be34316b0_PUB_01"
}'
| Field | Type | Description |
|---|---|---|
| status | String | "SUCCESS" or "ERROR" |
| statusCode | Integer | Mapped process status (e.g. 200) |
| msg | String | Transaction outcome detail |
| sessionId | String | Persistent/refreshed session identifier |
| fareDetails | Object | Locked structural matrices: pricingBreakdown + fareRules |
{
"status": "SUCCESS",
"statusCode": 200,
"msg": "Fare validated",
"sessionId": "ST_dc5ef320bf1442f0",
"fareDetails": {
"pricingBreakdown": {
"currency": "NPR", "baseFareTotal": 14200, "taxTotal": 400,
"feeTotal": 200, "otherTotal": 0, "markupTotal": 0,
"discountTotal": 0, "gstTotal": 0, "grandTotal": 14200,
"passengerFares": [{
"passengerType": "ADT", "count": 1, "baseFarePerPassenger": 14200,
"taxPerPassenger": 400, "feePerPassenger": 200, "otherPerPassenger": 0,
"markupPerPassenger": 0, "gstPerPassenger": 0,
"discountPerPassenger": 0, "totalPerPassenger": 14200
}]
},
"fareRules": {
"refund": { "allowed": true, "fee": 0, "currency": "NPR", "policyNotes": "Refundable" },
"change": { "allowed": true, "fee": 1500, "currency": "NPR", "policyNotes": "Date change applies" }
}
}
}
Compile traveler identities, contact details, documentation, and payment authorization to create a confirmed booking reference locator (PNR).
| Field | Type | Description | |
|---|---|---|---|
| itineraryId | String | Yes | Target itinerary reference code from search/revalidate |
| bookingAction | String | Yes | Workflow dispatch: "Book" or "Issued" |
| contactDetails | Object | Yes | Booking contact information (see below) |
| passengers | Array | Yes | List of passenger documents matching GDS constraints |
| paymentMode | String | Yes | "CREDIT_CARD", "DEBIT_CARD", "BANK_TRANSFER", or "WALLET" |
| paymentDetails | Object | Yes | Payment confirmation metadata (see below) |
{
"email": String,
"mobile": String,
"name": String
}
{
"passengerType": String, // "ADT", "CHD", "INF"
"firstName": String, // match passport exactly
"middleName": String,
"lastName": String, // match passport exactly
"gender": String, // "M" or "F"
"birthday": String, // YYYYMMDD
"nationality": String, // ISO 2-letter country code
"docType": String, // "P" = passport
"docNumber": String, // passport number
"frequentFlyer": String, // FF number or ""
"issueCountry": String, // ISO 2-letter
"docExpiredAt": String // YYYYMMDD
}
{
"transactionId": String,
"amount": Number,
"currency": String,
"paymentDate": String, // YYYYMMDD
"paymentStatus": String, // "SUCCESS"
"paymentGateway": String, // e.g. "ESEWA"
"paymentReference":String
}
curl -X POST {{API_URL}}/v2/flights/create_pnr \
-H "Authorization: Bearer <token>" \
-H "X-Session: <sessionId>" \
-H "Content-Type: application/json" \
-d '{
"itineraryId": "ITI_0ec3d1df3be34316b0_PUB_01",
"bookingAction": "Book",
"contactDetails": {
"email": "jane@example.com",
"mobile": "+9779800000000",
"name": "Jane Smith"
},
"passengers": [{
"passengerType": "ADT",
"firstName": "JANE",
"middleName": null,
"lastName": "SMITH",
"gender": "F",
"birthday": "19940821",
"nationality": "NP",
"docType": "P",
"docNumber": "11234567A",
"frequentFlyer": "",
"issueCountry": "NP",
"docExpiredAt": "20340820"
}],
"paymentMode": "WALLET",
"paymentDetails": {
"transactionId": "TXN_7823412903",
"amount": 14200,
"currency": "NPR",
"paymentDate": "20260629",
"paymentStatus": "SUCCESS",
"paymentGateway": "ESEWA",
"paymentReference": "REF-992381-P"
}
}'
| Field | Type | Description |
|---|---|---|
| status | String | "SUCCESS" or "ERROR" |
| statusCode | Integer | Process API code (e.g. 200) |
| msg | String | Transaction description |
| sessionId | String | Locked session tracking hash |
| bookingInfo | Object | PNR details container |
| Field | Type | Description |
|---|---|---|
| bookingReference | String | GDS/System record locator PNR (e.g. "PNR123456") |
| bookingStatus | String | "CONFIRMED" or "HELD" |
| bookingDate | String | PNR generation timestamp (ISO format) |
| itineraryId | String | Identical reference key matching reserved itinerary |
| passengers | Array | Confirmation details with assigned transient passengerId |
{
"status": "SUCCESS",
"statusCode": 200,
"msg": "success",
"sessionId": "ST_dc5ef320bf1442f0",
"bookingInfo": {
"bookingReference": "PNR123456",
"bookingStatus": "CONFIRMED",
"bookingDate": "2026-11-14T06:20:00Z",
"itineraryId": "ITI_0ec3d1df3be34316b0_PUB_01",
"passengers": [{
"passengerType": "ADT",
"passengerId": "PAX_98124",
"firstName": "JANE",
"middleName": null,
"lastName": "SMITH",
"gender": "F",
"birthday": "19940821",
"nationality": "NP",
"docType": "P",
"docNumber": "11234567A",
"frequentFlyer": "",
"issueCountry": "NP",
"docExpiredAt": "20340820"
}]
}
}
Dispatch the finalized order payload utilizing the established PNR reservation. Commits the billing context to transition the record to "TICKETED" status, completing the booking journey.
| Field | Type | Description | |
|---|---|---|---|
| itineraryId | String | Yes | Target itinerary reference from search/revalidate |
| bookingReference | String | Yes | GDS/System PNR locator from create_pnr |
| paymentMode | String | Yes | Billing scheme: "WALLET", etc. |
| paymentDetails | Object | Yes | Gateway transaction metadata |
curl -X POST {{API_URL}}/v2/flights/order \
-H "Authorization: Bearer <token>" \
-H "X-Session: <sessionId>" \
-H "Content-Type: application/json" \
-d '{
"itineraryId": "ITI_0ec3d1df3be34316b0_PUB_01",
"bookingReference": "PNR123456",
"paymentMode": "WALLET",
"paymentDetails": {
"transactionId": "TXN_7823412903",
"amount": 14200,
"currency": "NPR",
"paymentDate": "20260629",
"paymentStatus": "SUCCESS",
"paymentGateway": "ESEWA",
"paymentReference": "REF-992381-P"
}
}'
| Field | Type | Description |
|---|---|---|
| status | String | "SUCCESS" or "ERROR" |
| statusCode | Integer | Response execution status (e.g. 200) |
| msg | String | Execution outcome description |
| sessionId | String | Active session tracking key |
| bookingDetails | Object | Master ticketing mapping |
| Field | Type | Description |
|---|---|---|
| bookingReference | String | Master GDS booking locator/PNR |
| bookingStatus | String | "CONFIRMED" |
| bookingDate | String | Confirmation timestamp (ISO format) |
| gdsPNR | String | GDS record reference |
| airlinePNR | String | Airline internal inventory PNR |
| ticketingStatus | String | "TICKETED" |
| itineraryId | String | Reference ID for selected itinerary |
| paymentDetails | Object | Settled payment values and transaction references |
| passengers | Array | Final passenger mapping with system-confirmed tickets |
{
"status": "SUCCESS",
"statusCode": 200,
"msg": "success",
"sessionId": "ST_dc5ef320bf1442f0",
"bookingDetails": {
"bookingReference": "PNR123456",
"bookingStatus": "CONFIRMED",
"bookingDate": "2026-11-14T06:20:00Z",
"gdsPNR": "PNR123456",
"airlinePNR": "YT123456",
"ticketingStatus": "TICKETED",
"itineraryId": "ITI_0ec3d1df3be34316b0_PUB_01",
"paymentDetails": {
"transactionId": "TXN_7823412903",
"amount": 14200,
"currency": "NPR",
"paymentDate": "20260629",
"paymentStatus": "SUCCESS",
"paymentGateway": "ESEWA",
"paymentReference": "REF-992381-P"
},
"passengers": [{
"passengerType": "ADT",
"passengerId": "PAX_98124",
"firstName": "JANE",
"middleName": null,
"lastName": "SMITH",
"gender": "F",
"birthday": "19940821",
"nationality": "NP",
"docType": "P",
"docNumber": "11234567A",
"frequentFlyer": "",
"issueCountry": "NP",
"docExpiredAt": "20340820"
}]
}
}
Check the status of an existing order or booking reservation. Useful for verifying ticketing state in asynchronous payment settlement scenarios.
| Field | Type | Description | |
|---|---|---|---|
| bookingReference | String | Yes | GDS or System PNR locator code (e.g. "PNR123456") |
curl -X POST {{API_URL}}/v2/flights/order_status \
-H "Authorization: Bearer <token>" \
-H "X-Session: <sessionId>" \
-H "Content-Type: application/json" \
-d '{
"bookingReference": "PNR123456"
}'
| Field | Type | Description |
|---|---|---|
| status | String | "SUCCESS" or "ERROR" |
| statusCode | Integer | Canonical REST status integer |
| msg | String | Status description context |
| sessionId | String | Unified sequence identifier |
| bookingDetails | Object | Master order ledger with pricingBreakdown |
{
"status": "SUCCESS",
"statusCode": 200,
"msg": "success",
"sessionId": "ST_dc5ef320bf1442f0",
"bookingDetails": {
"bookingReference": "PNR123456",
"bookingStatus": "CONFIRMED",
"bookingDate": "2026-11-14T06:20:00Z",
"gdsPNR": "PNR123456",
"airlinePNR": "YT123456",
"ticketingStatus": "TICKETED",
"itineraryId": "ITI_0ec3d1df3be34316b0_PUB_01",
"paymentDetails": {
"transactionId": "TXN_7823412903",
"amount": 14200,
"currency": "NPR",
"paymentDate": "20260629",
"paymentStatus": "SUCCESS",
"paymentGateway": "ESEWA",
"paymentReference": "REF-992381-P"
},
"passengers": [{
"passengerType": "ADT",
"passengerId": "PAX_98124",
"firstName": "JANE",
"middleName": null,
"lastName": "SMITH",
"gender": "F",
"birthday": "19940821",
"nationality": "NP",
"docType": "P",
"docNumber": "11234567A",
"frequentFlyer": "",
"issueCountry": "NP",
"docExpiredAt": "20340820"
}],
"fareDetails": {
"pricingBreakdown": {
"currency": "NPR", "baseFareTotal": 14200, "taxTotal": 0,
"feeTotal": 0, "otherTotal": 0, "markupTotal": 0,
"discountTotal": 0, "gstTotal": 0, "grandTotal": 14200,
"passengerFares": [{
"passengerType": "ADT", "count": 1, "baseFarePerPassenger": 5800,
"taxPerPassenger": 400, "feePerPassenger": 0,
"otherPerPassenger": 0, "markupPerPassenger": 0,
"gstPerPassenger": 0, "discountPerPassenger": 0,
"totalPerPassenger": 6200
}]
}
}
}
}
#!/bin/bash
API="{{API_URL}}"
# 1 — Authenticate
TOKEN=$(curl -s -X POST $API/v2/auth/token \
-H "Content-Type: application/json" \
-d '{"email":"affiliate@travelpartner.com","api_key":"offshore_pk_live_89c72e18fa4b","company_name":"Global Travel Solutions Ltd"}' \
| jq -r '.token')
# 2 — Search (sessionId comes back in response)
SRCH=$(curl -s -X POST $API/v2/flights/search \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"depCity":"BOM","arrCity":"DXB","fromDate":"20261114","adultNumber":1,"childNumber":0,"infantNumber":0,"cabinClass":"E","stops":"0","inclAirlines":["YT"]}')
SESS=$(echo "$SRCH" | jq -r '.sessionId')
ITIN=$(echo "$SRCH" | jq -r '.itineraries[0].itineraryId')
# 3 — Revalidate
curl -s -X POST $API/v2/flights/revalidate_fares \
-H "Authorization: Bearer $TOKEN" \
-H "X-Session: $SESS" \
-H "Content-Type: application/json" \
-d "{\"itineraryId\":\"$ITIN\"}" | jq .
# 4 — Create PNR
PNR_RESP=$(curl -s -X POST $API/v2/flights/create_pnr \
-H "Authorization: Bearer $TOKEN" \
-H "X-Session: $SESS" \
-H "Content-Type: application/json" \
-d '{
"itineraryId": "'$ITIN'",
"bookingAction": "Book",
"contactDetails": {"email":"jane@example.com","mobile":"+9779800000000","name":"Jane Smith"},
"passengers": [{"passengerType":"ADT","firstName":"JANE","middleName":null,"lastName":"SMITH","gender":"F","birthday":"19940821","nationality":"NP","docType":"P","docNumber":"11234567A","frequentFlyer":"","issueCountry":"NP","docExpiredAt":"20340820"}],
"paymentMode": "WALLET",
"paymentDetails": {"transactionId":"TXN_7823412903","amount":14200,"currency":"NPR","paymentDate":"20260629","paymentStatus":"SUCCESS","paymentGateway":"ESEWA","paymentReference":"REF-992381-P"}
}')
PNR=$(echo "$PNR_RESP" | jq -r '.bookingInfo.bookingReference')
echo "$PNR_RESP" | jq .
# 5 — Create Order (Ticketing)
curl -s -X POST $API/v2/flights/order \
-H "Authorization: Bearer $TOKEN" \
-H "X-Session: $SESS" \
-H "Content-Type: application/json" \
-d '{
"itineraryId": "'$ITIN'",
"bookingReference": "'$PNR'",
"paymentMode": "WALLET",
"paymentDetails": {"transactionId":"TXN_7823412903","amount":14200,"currency":"NPR","paymentDate":"20260629","paymentStatus":"SUCCESS","paymentGateway":"ESEWA","paymentReference":"REF-992381-P"}
}' | jq .
# 6 — Order Status
curl -s -X POST $API/v2/flights/order_status \
-H "Authorization: Bearer $TOKEN" \
-H "X-Session: $SESS" \
-H "Content-Type: application/json" \
-d "{\"bookingReference\":\"$PNR\"}" | jq .
| Code | Description |
|---|---|
| E | Economy Class |
| P | Premium Economy |
| J | Business Class |
| F | First Class |
| Code | Classification | Age Restriction |
|---|---|---|
| ADT | Adult Traveler | Age ≥ 12 at departure date |
| CHD | Child Traveler | Age 2–11 at departure date |
| INF | Infant on Lap | Under 2 years on return/arrival date |
YYYYMMDD format without separators (e.g. "20261114").