Search Flights
curl --request POST \
--url https://api.travomatrix.com/api/v1/flight/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"origin": "DEL",
"dest": "BOM",
"dod": "20270515",
"pax_adult": 1,
"mode": "b2b"
}
'import requests
url = "https://api.travomatrix.com/api/v1/flight/search"
payload = {
"origin": "DEL",
"dest": "BOM",
"dod": "20270515",
"pax_adult": 1,
"mode": "b2b"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({origin: 'DEL', dest: 'BOM', dod: '20270515', pax_adult: 1, mode: 'b2b'})
};
fetch('https://api.travomatrix.com/api/v1/flight/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.travomatrix.com/api/v1/flight/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'origin' => 'DEL',
'dest' => 'BOM',
'dod' => '20270515',
'pax_adult' => 1,
'mode' => 'b2b'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.travomatrix.com/api/v1/flight/search"
payload := strings.NewReader("{\n \"origin\": \"DEL\",\n \"dest\": \"BOM\",\n \"dod\": \"20270515\",\n \"pax_adult\": 1,\n \"mode\": \"b2b\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.travomatrix.com/api/v1/flight/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"DEL\",\n \"dest\": \"BOM\",\n \"dod\": \"20270515\",\n \"pax_adult\": 1,\n \"mode\": \"b2b\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.travomatrix.com/api/v1/flight/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"DEL\",\n \"dest\": \"BOM\",\n \"dod\": \"20270515\",\n \"pax_adult\": 1,\n \"mode\": \"b2b\"\n}"
response = http.request(request)
puts response.read_body{
"search_id": "<string>",
"results": [
{
"offer_id": "<string>",
"search_id": "<string>",
"signature": "<string>",
"airline": "<string>",
"segments": [
{
"carrier": "<string>",
"flight_no": "<string>",
"origin": "<string>",
"dest": "<string>",
"dep_time": "2023-11-07T05:31:56Z",
"arr_time": "2023-11-07T05:31:56Z",
"booking_class": "<string>",
"seats_available": 123
}
],
"best_price_paise": 123,
"currency": "<string>",
"pricing_breakdown": {
"base_fare": 123,
"taxes": 123,
"commission": 123,
"ota_markup": 123,
"agent_markup": 123,
"net_fare": 123,
"final_price": 123
},
"expires_at": "2023-11-07T05:31:56Z"
}
],
"cursor": "<string>"
}{
"trace_id": "req_abc123",
"error": {
"code": "BOOKING_FARE_EXPIRED",
"message": "The selected fare has expired.",
"retryable": true,
"errors": [
{
"field": "passengers[0].first_name",
"code": "REQUIRED",
"message": "First name is required."
}
],
"provider": {
"name": "AMADEUS",
"code": "32171",
"message": "Price has changed"
}
}
}{
"trace_id": "req_abc123",
"error": {
"code": "BOOKING_FARE_EXPIRED",
"message": "The selected fare has expired.",
"retryable": true,
"errors": [
{
"field": "passengers[0].first_name",
"code": "REQUIRED",
"message": "First name is required."
}
],
"provider": {
"name": "AMADEUS",
"code": "32171",
"message": "Price has changed"
}
}
}{
"trace_id": "req_abc123",
"error": {
"code": "BOOKING_FARE_EXPIRED",
"message": "The selected fare has expired.",
"retryable": true,
"errors": [
{
"field": "passengers[0].first_name",
"code": "REQUIRED",
"message": "First name is required."
}
],
"provider": {
"name": "AMADEUS",
"code": "32171",
"message": "Price has changed"
}
}
}{
"trace_id": "req_abc123",
"error": {
"code": "BOOKING_FARE_EXPIRED",
"message": "The selected fare has expired.",
"retryable": true,
"errors": [
{
"field": "passengers[0].first_name",
"code": "REQUIRED",
"message": "First name is required."
}
],
"provider": {
"name": "AMADEUS",
"code": "32171",
"message": "Price has changed"
}
}
}Rescheduling
Step 1: Initial Search
POST
/
flight
/
search
Search Flights
curl --request POST \
--url https://api.travomatrix.com/api/v1/flight/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"origin": "DEL",
"dest": "BOM",
"dod": "20270515",
"pax_adult": 1,
"mode": "b2b"
}
'import requests
url = "https://api.travomatrix.com/api/v1/flight/search"
payload = {
"origin": "DEL",
"dest": "BOM",
"dod": "20270515",
"pax_adult": 1,
"mode": "b2b"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({origin: 'DEL', dest: 'BOM', dod: '20270515', pax_adult: 1, mode: 'b2b'})
};
fetch('https://api.travomatrix.com/api/v1/flight/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.travomatrix.com/api/v1/flight/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'origin' => 'DEL',
'dest' => 'BOM',
'dod' => '20270515',
'pax_adult' => 1,
'mode' => 'b2b'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.travomatrix.com/api/v1/flight/search"
payload := strings.NewReader("{\n \"origin\": \"DEL\",\n \"dest\": \"BOM\",\n \"dod\": \"20270515\",\n \"pax_adult\": 1,\n \"mode\": \"b2b\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.travomatrix.com/api/v1/flight/search")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"origin\": \"DEL\",\n \"dest\": \"BOM\",\n \"dod\": \"20270515\",\n \"pax_adult\": 1,\n \"mode\": \"b2b\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.travomatrix.com/api/v1/flight/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"origin\": \"DEL\",\n \"dest\": \"BOM\",\n \"dod\": \"20270515\",\n \"pax_adult\": 1,\n \"mode\": \"b2b\"\n}"
response = http.request(request)
puts response.read_body{
"search_id": "<string>",
"results": [
{
"offer_id": "<string>",
"search_id": "<string>",
"signature": "<string>",
"airline": "<string>",
"segments": [
{
"carrier": "<string>",
"flight_no": "<string>",
"origin": "<string>",
"dest": "<string>",
"dep_time": "2023-11-07T05:31:56Z",
"arr_time": "2023-11-07T05:31:56Z",
"booking_class": "<string>",
"seats_available": 123
}
],
"best_price_paise": 123,
"currency": "<string>",
"pricing_breakdown": {
"base_fare": 123,
"taxes": 123,
"commission": 123,
"ota_markup": 123,
"agent_markup": 123,
"net_fare": 123,
"final_price": 123
},
"expires_at": "2023-11-07T05:31:56Z"
}
],
"cursor": "<string>"
}{
"trace_id": "req_abc123",
"error": {
"code": "BOOKING_FARE_EXPIRED",
"message": "The selected fare has expired.",
"retryable": true,
"errors": [
{
"field": "passengers[0].first_name",
"code": "REQUIRED",
"message": "First name is required."
}
],
"provider": {
"name": "AMADEUS",
"code": "32171",
"message": "Price has changed"
}
}
}{
"trace_id": "req_abc123",
"error": {
"code": "BOOKING_FARE_EXPIRED",
"message": "The selected fare has expired.",
"retryable": true,
"errors": [
{
"field": "passengers[0].first_name",
"code": "REQUIRED",
"message": "First name is required."
}
],
"provider": {
"name": "AMADEUS",
"code": "32171",
"message": "Price has changed"
}
}
}{
"trace_id": "req_abc123",
"error": {
"code": "BOOKING_FARE_EXPIRED",
"message": "The selected fare has expired.",
"retryable": true,
"errors": [
{
"field": "passengers[0].first_name",
"code": "REQUIRED",
"message": "First name is required."
}
],
"provider": {
"name": "AMADEUS",
"code": "32171",
"message": "Price has changed"
}
}
}{
"trace_id": "req_abc123",
"error": {
"code": "BOOKING_FARE_EXPIRED",
"message": "The selected fare has expired.",
"retryable": true,
"errors": [
{
"field": "passengers[0].first_name",
"code": "REQUIRED",
"message": "First name is required."
}
],
"provider": {
"name": "AMADEUS",
"code": "32171",
"message": "Price has changed"
}
}
}Search for your original flight.
Request Setup
string
default:"DEL"
3-letter IATA origin code.
string
default:"BOM"
3-letter IATA destination code.
string
default:"20270515"
Departure Date (YYYYMMDD).
integer
default:"1"
Number of adults.
Instructions
- Review the requirements and set up the request payload.
- Hit the Send button.
Requirement: Copy the
search_id and signature from the response. You will need them.Authorizations
Headers
Unique correlation ID for tracing.
Body
application/json
Pattern:
^[A-Z]{3}$Example:
"DEL"
Pattern:
^[A-Z]{3}$Example:
"DXB"
Departure date in YYYYMMDD format.
Pattern:
^\d{8}$Example:
"20270501"
Return date in YYYYMMDD format (optional for one-way).
Pattern:
^\d{8}$Example:
"20270505"
Required range:
1 <= x <= 9Required range:
0 <= x <= 9Required range:
0 <= x <= 9Available options:
ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST Pagination cursor obtained from the previous search response.
⌘I