Open API's
Third-Party Integration Guide & API Reference
This document describes the public flight APIs exposed by our platform. These endpoints are designed for external partners to search, price, book, and fetch bookings across supported providers.
/api/v1/public/flight-search/api/v1/public/flight-pricing/api/v1/public/flight-book/api/v1/public/flight-orderBase URL
- Production:
https://<your-domain> - Staging:
https://openapi-staging.jasdevelopers.com/
Authentication
All public API requests require the following headers:
Content-Type: application/json
Accept: application/json
x-api-key: <YOUR_API_KEY>
x-client-secret: <YOUR_CLIENT_SECRET>
1) Search — Flight Search
Purpose
Search for flights across providers. Returns offers with segment data and optional bundle/fare options.
Request Body
{
"legs": [
{
"departureCode": "KHI",
"arrivalCode": "JED",
"outboundDate": "2026-04-28"
},
{
"departureCode": "JED",
"arrivalCode": "KHI",
"outboundDate": "2026-05-02"
}
],
"adultsCount": 2,
"childrenCount": 1,
"infantsCount": 1,
"cabin": "economy",
"currencyCode": "PKR",
"locale": "en",
"provider": "ONEAPI"
}
Request Fields
legs: Array of flight legs (1 for one-way, 2 for return).cabin:economy | business | first | premiumeconomy.provider: Optional filter (e.g.,AIRSIAL,ONEAPI).
2) Pricing — Flight Pricing
Purpose
Prices a selected offer and returns normalized segments with fare options (bundles).
{
"provider": "ONEAPI",
"offerId": "<offerId_from_search>",
"segmentIds": ["<segmentId_1>", "<segmentId_2>"]
}
Notes
fareOptionsis a normalized array across providers.- For some providers,
fareOptionscan be empty (no bundles available).
3) Booking — Flight Book
Purpose
Books the selected priced itinerary and chosen fare options.
{
"provider": "ONEAPI",
"offerId": "<offerId>",
"segmentIds": ["<segmentId_1>", "<segmentId_2>"],
"selectedFareOptions": {
"outbound": "17451",
"return": "296"
},
"passengers": [
{
"firstName": "Ali",
"lastName": "Khan",
"title": "MR",
"passCountry": "PK",
"passNumber": "35202-1234567-1",
"birthDate": "1988-03-10",
"gender": "M",
"ageCategory": "ADT"
}
],
"booker_phone": "923001234567",
"booker_email": "test@jasmytrip.com",
"coins_used": 1200
}
Required Fields (Booking)
segmentsorsegmentIds(from pricing/search).passengerswithfirstName,lastName,passCountry,passNumber,birthDate,gender,ageCategory.booker_phoneandbooker_email.
Booking Response (Public-Safe DTO)
{
"status": true,
"data": {
"orderId": 1620,
"pnr": "63VOPR",
"tripType": "Oneway",
"orderStatus": "Pending",
"paymentStatus": "Pending",
"currency": "PKR",
"totalPrice": "419769",
"lastTicketingDate": "2026-04-29",
"createdAt": "2026-04-17T10:30:00.000000Z",
"segments": [
{
"from": "KHI",
"to": "SHJ",
"departure": "2026-04-28T01:50:00",
"arrival": "2026-04-28T03:10:00",
"airline": "G9",
"flightNumber": "G9549",
"serviceClass": "Economy",
"bookingClass": "V"
}
],
"passengers": [
{
"firstName": "Ali",
"lastName": "Khan",
"ageCategory": "ADT",
"gender": "M",
"birthdate": "1988-03-10",
"eTicket": null
}
]
},
"request_id": "d2f2b0f0-8b68-4c48-b6da-8d8f8b9f72ab"
}
Provider-Specific Booking Fields
- Amadeus: each passenger must include
title(e.g.,MR,MRS,MSTR). - FlyJinnah: send
selectedFareOptionsto choose bundles (mapped internally). - Airsial: domestic flights require CNIC in
passNumberfor adults. - OneAPI: send
selectedFareOptionsto choose bundles (mapped internally).
Notes
phone,deliveryInformation,insurance, andtransferare managed internally.coins_usedis optional. If omitted, it defaults to0.- Client tracking is recorded automatically via API credentials and
x-request-id.
4) Order — Flight Order
Purpose
Fetch an existing booking from DB using order ID or PNR, and return a public-safe DTO.
Request (by orderId)
{
"orderId": 1620
}
Response
Response shape is the same as the booking public-safe DTO shown above.
Access scope: only orders created by the same authenticated API client are returned.
Common Errors
401 Unauthorized: Invalid API credentials.410 Fare Expired: Cached offer expired; redo the search.422 Validation: Missing required fields (passengers, segments, or order lookup params).404 Not Found: Order not found (or not owned by requesting API client).
Integration Tips
- Always perform Search → Pricing → Booking in strict sequence.
- Use
fareOptionsfrom the Pricing response to setselectedFareOptionsin booking. - Cache
offerIdfor a short time only as provider availability changes rapidly. - Use
/api/v1/public/flight-orderto fetch booking details later viaorderIdorpnr.
© 2026 JMT Integration Team. For support, contact our developers.