Skip to main content
Developer Documentation

Tripgic API Documentation

One REST API for flights, hotels, activities, tour packages, trains, transfers, eSIMs and visas — 73 endpoints across 8 product families, all returning a single normalized JSON envelope.

Introduction

The Tripgic API is a REST API that accepts and returns JSON. All inventory — across eight product families — is reached from a single base URL and returns the same normalized response envelope, so you integrate one pattern and reuse it everywhere.

Base URL

YOUR_BASE_URL

Issued together with your API credentials during onboarding. It is not published here.

Flight API · 15Hotel API · 11Activity API · 7Tour Package API · 9Train API · 8Transfer API · 6eSIM API · 11Visa API · 6

Authentication

Every request is authenticated over HTTPS. The authentication method and your credentials are issued to you during onboarding and are not published on this page. Access can also be restricted to your IP addresses, and credentials can be rotated — see Security.

Credentials issued at onboarding IP whitelisting HTTPS only

Request & response model

  • Every endpoint is a POST with a JSON body — including search operations.
  • Responses share one envelope: status, data, message and (on some endpoints) value. A failed call returns status: failed with a reason instead — see Status & errors.
  • A search returns a tracking_id in data; you pass it to the validate and booking steps that follow.
  • Common request fields include partner_id and language; prices carry an explicit currency.

Booking lifecycle

Across products the flow is consistent: search for inventory, validate the selection, attach traveller details, create the booking, then issue and (if needed) cancel. Flights add branded-fare and ancillary steps (baggage, seats, meals).

Search Validate Update travellers Create booking / order Issue ticket / voucher Booking details / Cancel

Endpoint reference

All 73 endpoints, grouped by product. Each path is appended to your base URL and called with POST — for example https://YOUR_BASE_URL/flight/search.

Flight API 15 endpoints
POST/flight/searchSearch flights OneWay
POST/flight/branded-fareGet branded fare options for a flight
POST/flight/validateValidate selected itinerary and pricing
POST/flight/validation-get-statusGet validation status for a booking
POST/flight/update-travellersUpdate passenger details in a booking
POST/flight/create-bookingCreate a flight booking
POST/flight/get-baggage-optionGet available baggage options
POST/flight/update-baggageAdd or update baggage selections
POST/flight/get-seat-planGet seat map and seat options
POST/flight/update-seatUpdate seat selections
POST/flight/get-meal-optionGet available meal options
POST/flight/update-mealsUpdate selected meals
POST/flight/Booking detailsBooking details
POST/flight/issue-ticketIssue tickets for a validated booking
POST/flight/cancel-bookingCancel a flight booking
Hotel API 11 endpoints
POST/hotel/auto-suggetionGet auto-suggestions for hotel search locations
POST/hotel/searchhotel search by location and occupancies
POST/hotel/roomsSingle Hotel availability for a specific hotel and room.
POST/hotel/get-hotel-detailsSingle hotel Details Content.
POST/hotel/validateGet Price and Policy validation validation details.
POST/hotel/validation-price-get-detailGet Get-Price validation details
POST/hotel/update-travellersUpdate travellers for a booking.
POST/hotel/createCreate booking.
POST/hotel/booking-detailsGet details of a specific booking.
POST/hotel/issue-voucherissue-voucher for booking.
POST/hotel/cancel-bookingCancel hotel booking.
Activity API 7 endpoints
POST/activity/searchSearch for sightseeing and activities
POST/activity/search-singleSearch for a single specific activity details
POST/activity/validation-get-detailsGet validated activity details
POST/activity/update-travelerUpdate traveler information for an activity booking
POST/activity/create-bookingCreate a final activity booking
POST/activity/cancel-bookingCancel an existing activity booking
POST/activity/booking-detailsGet booking details
Tour Package API 9 endpoints
POST/service-tour/city-suggestionGet city suggestions for tours
POST/service-tour/searchSearch for available tours
POST/service-tour/detailsGet tour details
POST/service-tour/validateValidate tour selection and options
POST/service-tour/validation-detailsGet tour validation details
POST/service-tour/update-travellerUpdate traveller information for tour
POST/service-tour/orderConfirm tour booking and place order
POST/service-tour/order-detailsGet tour order details
POST/service-tour/issue-orderIssue a tour order
Train API 8 endpoints
POST/train/searchSearch for available train journeys
POST/train/single-trainGet details for a specific train
POST/train/validateValidate train selection and fare
POST/train/validation-detailsGet validation details for a specific tracking ID
POST/train/update-travellerUpdate traveller information
POST/train/create-bookingCreate a train booking
POST/train/cancel-bookingCancel a train booking
POST/train/booking-detailsGet booking details
Transfer API 6 endpoints
POST/Transfer/Transfer SearchSearch for transfers.
POST/Transfer/Single Transfer SearchSearch for Single transfers.
POST/Transfer/Update Traveler InfoUpdate traveler information for existing transfers.
POST/Transfer/Create BookingSearch for Create Booking.
POST/Transfer/Cancel BookingCancel Booking
POST/Transfer/Booking detailsBooking details
eSIM API 11 endpoints
POST/esim/searchSearch eSIM plans
POST/esim/single-esim-packageGet single eSIM package
POST/esim/update-customerUpdate customer information
POST/esim/create-bookingCreate eSIM booking
POST/esim/data-usageGet data usage
POST/esim/booking-detailsGet booking details
POST/esim/installation-instructionsGet installation instructions
POST/esim/compatible-devicesGet compatible devices
POST/esim/topup-packagesGet top-up packages
POST/esim/topup-bookingCreate top-up booking
POST/esim/topup-historyGet top-up history
Visa API 6 endpoints
POST/visa/searchSearch for available visa packages
POST/visa/detailsGet specific visa details by SEO code
POST/visa/validate-detailsValidate visa selection before booking
POST/visa/get-validate-detailsGet validated visa details using tracking ID
POST/visa/create-orderCreate a new visa application order
POST/visa/booking-detailsGet booking details

Example: flight search

A real request and an abbreviated response, taken from the Flight API spec.

Request — POST https://YOUR_BASE_URL/flight/search

{ "journey_type": "OneWay", "segment": [ { "departure_airport_type": "AIRPORT", "departure_airport": "DAC", "arrival_airport_type": "AIRPORT", "arrival_airport": "DXB", "departure_date": "2026-03-30" } ], "travelers_adult": 1, "travelers_child": 0, "travelers_infants": 0, "preferred_carrier": [ "" ], "non_stop_flight": "any", "baggage_option": "any", "booking_class": "Economy", "supplier_uid": "all", "partner_id": "1", "language": "en" }

Response (abbreviated)

{ "status": "success", "data": { "tracking_id": "1117415826952619349CQJ", "flights": null }, "message": "Flights found successfully.", "value": { "status": "success", "timestamp": "1771393615", "search_complete": "2026-02-18 11:46:55", "tracking_id": "11177139351426194ETLIZ", "ftm_partner_id": "1", "partner_id": "1", "partner_name": "Demo Solution" } }

Prices returned on the validation and booking endpoints are final: each fare is the supplier net fare plus Tripgic's fixed per-transaction markup — a flat amount between USD 2 and USD 10 by product and plan tier — so the returned amount can be shown to your customers as-is. See the markup policy →

The same request in PHP, Node.js and Python

Each sample sends the search above, stops on a failed response and prints the tracking_id you pass to /flight/validate. Add the base URL and the authentication details issued to you.

PHP (cURL)
<?php $payload = [ 'journey_type' => 'OneWay', 'segment' => [[ 'departure_airport_type' => 'AIRPORT', 'departure_airport' => 'DAC', 'arrival_airport_type' => 'AIRPORT', 'arrival_airport' => 'DXB', 'departure_date' => '2026-03-30', ]], 'travelers_adult' => 1, 'travelers_child' => 0, 'travelers_infants' => 0, 'non_stop_flight' => 'any', 'baggage_option' => 'any', 'booking_class' => 'Economy', 'partner_id' => '1', 'language' => 'en', ]; $ch = curl_init('https://YOUR_BASE_URL/flight/search'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 120, CURLOPT_HTTPHEADER => [ 'Content-Type: application/json', // plus the authentication headers issued with your credentials ], CURLOPT_POSTFIELDS => json_encode($payload), ]); $body = curl_exec($ch); if ($body === false) { throw new RuntimeException('Transport error: ' . curl_error($ch)); } curl_close($ch); $res = json_decode($body, true); if (($res['status'] ?? '') !== 'success') { // Business failures arrive as HTTP 200 with status "failed" and a reason. throw new RuntimeException('Search failed: ' . ($res['reason'] ?? 'unknown')); } echo $res['data']['tracking_id'], PHP_EOL; // pass this to /flight/validate
Node.js 18+
// Node.js 18+ (built-in fetch) const payload = { journey_type: 'OneWay', segment: [{ departure_airport_type: 'AIRPORT', departure_airport: 'DAC', arrival_airport_type: 'AIRPORT', arrival_airport: 'DXB', departure_date: '2026-03-30', }], travelers_adult: 1, travelers_child: 0, travelers_infants: 0, non_stop_flight: 'any', baggage_option: 'any', booking_class: 'Economy', partner_id: '1', language: 'en', }; const response = await fetch('https://YOUR_BASE_URL/flight/search', { method: 'POST', headers: { 'Content-Type': 'application/json', // plus the authentication headers issued with your credentials }, body: JSON.stringify(payload), }); const res = await response.json(); if (res.status !== 'success') { // Business failures arrive as HTTP 200 with status "failed" and a reason. throw new Error(`Search failed: ${res.reason ?? 'unknown'}`); } console.log(res.data.tracking_id); // pass this to /flight/validate
Python (requests)
import requests payload = { "journey_type": "OneWay", "segment": [{ "departure_airport_type": "AIRPORT", "departure_airport": "DAC", "arrival_airport_type": "AIRPORT", "arrival_airport": "DXB", "departure_date": "2026-03-30", }], "travelers_adult": 1, "travelers_child": 0, "travelers_infants": 0, "non_stop_flight": "any", "baggage_option": "any", "booking_class": "Economy", "partner_id": "1", "language": "en", } response = requests.post( "https://YOUR_BASE_URL/flight/search", headers={}, # the authentication headers issued with your credentials json=payload, timeout=120, ) res = response.json() if res.get("status") != "success": # Business failures arrive as HTTP 200 with status "failed" and a reason. raise RuntimeError(f"Search failed: {res.get('reason', 'unknown')}") print(res["data"]["tracking_id"]) # pass this to /flight/validate

Status & errors

A call can return HTTP 200 and still have failed. Check the status field on every response. success means the call worked: read data and message. failed means it did not: the response carries a reason instead.

{ "status": "failed", "reason": "You need to provide future or current departure_date" }

Branch on status, not on the wording of reason: the text is written for people and can be shown or logged as it is. Standard HTTP status codes apply at the transport layer (e.g. 401 for missing or invalid credentials). When contacting support, include the relevant tracking_id.

Common failure reasons from the API specification
SituationExample reasonWhat to do
Not authorisedYou do not have authorization to book through. Please reach out to the Support team for assistance.The product or action is not enabled on your account. Contact support.
Missing parameterMissing Required ParametersA required field is absent from the request body. Compare it with the endpoint reference.
Date in the pastYou need to provide future or current departure_dateSend today or a later date.
Traveller count mismatchThe passenger quantity provided is not valid.Traveller details must match the passenger count you searched and validated.
No resultsThere are currently no flights available.Not a fault. Show an empty state or widen the search.
Validation expiredThe validation session has expired.Validate again and use the new tracking_id. Do not reuse an old one.
Price or rate changedThe selected rate is no longer available. Please search again.Search again and re-validate before booking.
Insufficient balanceInsufficient balance in your account to complete this booking.Top up the account, then retry the booking or issuance.
Booking not foundNo active booking found for the provided tracking ID!Check the tracking_id belongs to this account and environment.
Not cancellableThis activity is non-refundable and cannot be cancelled.Surface the fare or rate rule to the traveller; the booking stands.
Ancillary unavailableThere is currently no option for baggage.Hide that add-on for this itinerary. Seats and meals behave the same way.

Rate limits

Throughput is provisioned to your expected volume and the look-to-book (L2B) ratio set out in your agreement. If you need higher limits, raise it with your integration contact.

Support

Email support@tripgic.com for technical questions — include your account name and any tracking_id for a faster response. New to the terminology? The glossary defines the travel-API terms used here.

Ready to integrate?

Book a kick-off call to get your API credentials and start building against live inventory.