Jasmytrip.com

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.

POST /api/v1/public/flight-search
POST /api/v1/public/flight-pricing
POST /api/v1/public/flight-book
POST /api/v1/public/flight-order

Base URL

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>

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


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


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)

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

Notes


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

Integration Tips


© 2026 JMT Integration Team. For support, contact our developers.