NAV
Shell HTTP JavaScript Ruby Python PHP Java Go

FlightRatesAPI v2.1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

The FlightRatesAPI is the premier real-time fare intelligence API for the air travel industry. Every day, our API is trusted by airlines worldwide to provide billions of rows of up-to-date and highly accurate competitive pricing data in real-time. With its flexibility and scalability, the FlightRatesAPI is the go- to solution for accessing comprehensive fare information for any airline. It covers essential details such as Origin & Destination, Fare Booking Code, Schedules, Taxes, Fare Rules, and Point of Sale. Users can customize delivery intervals to precisely meet their specific requirements.

The FlightRatesAPI endpoints may broadly be categorized into the following modules:

.

Images

Web: Aggregate Intelligence Inc.

Authentication

Every request sent to the FlightRatesAPI must be authenticated with an access token (JWT). You can obtain an access token when you log-in using the credentials provided to you. An access token is valid ONLY for 24 hours from the time it is generated.

The obtained Access Token must be passed during all subsequent requests made to the API as standard Bearer tokens in the request header.

Usage Workflow

Images

User

User Login

Code samples

# You can also use wget
curl -X POST /login \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json'

POST /login HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "handle": "myuser",
  "password": "supersecret"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json'
};

fetch('/login',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json'
}

result = RestClient.post '/login',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

r = requests.post('/login', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/login', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/login");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/login", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /login

User Login

The POST /login endpoint is used to authenticate and log in a user. It allows users to provide their credentials and obtain an access token, which can be used to authorize subsequent requests to protected resources within the system.

Body parameter

{
  "handle": "myuser",
  "password": "supersecret"
}

Parameters

Name In Type Required Description
body body userReq true none

Example responses

200 Response

{
  "error": false,
  "token": "AXSGpLVjnef7w5XgfWdoBwbfs",
  "handle": "myuser"
}

Responses

Status Meaning Description Schema
200 OK Success userResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

References

Get Airlines

Code samples

# You can also use wget
curl -X GET /references/airlines \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /references/airlines HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/references/airlines',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/references/airlines',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/references/airlines', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/references/airlines', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/references/airlines");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/references/airlines", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /references/airlines

The list of all the Airlines as available.

The GET /references/airlines endpoint is used to retrieve a complete list of airlines available in our system. It provides information about each airline, including its unique identifier, source name, display name, airline code, active status, and metadata related to creation and update.

The GET request to retrieve the airline data does not require any parameters. Simply make a GET request to the endpoint mentioned above.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "airlines": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "sourceName": "AirIndia",
      "displayName": "AirInd",
      "code": 11,
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Responses

Status Meaning Description Schema
200 OK Success airlinesResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get Airports

Code samples

# You can also use wget
curl -X GET /references/airports \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /references/airports HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/references/airports',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/references/airports',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/references/airports', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/references/airports', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/references/airports");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/references/airports", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /references/airports

The list of all the Airports

This API method allows you to retrieve a complete list of data details about all airports available in our database. It provides information on the name of the airport, city and country the airport is at.

The GET request to retrieve the airports data does not require any parameters. Simply make a GET request to the endpoint mentioned above.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "airports": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "airportName": "Netaji Subhas Chandra Bose International Airport",
      "city": "Kolkata",
      "airportCode": "CCU",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Responses

Status Meaning Description Schema
200 OK Success airportsResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get Cabin Classes

Code samples

# You can also use wget
curl -X GET /references/cabinclasses \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /references/cabinclasses HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/references/cabinclasses',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/references/cabinclasses',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/references/cabinclasses', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/references/cabinclasses', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/references/cabinclasses");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/references/cabinclasses", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /references/cabinclasses

List of all the Cabin Classes.

Cabin class is a dedicated product section of an aircraft that consists of price classes (sets of similar prices) or booking classes.

The API endpoint provides a list of all available in our database cabin classes. Users can access this endpoint to identify and retrieve the complete list of cabin classes offered and their codes.

The GET request to retrieve the cabin classes data does not require any parameters. Simply make a GET request to the endpoint mentioned above.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "cabinclasses": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "code": 3,
      "name": "First Class",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Responses

Status Meaning Description Schema
200 OK Success cabinclassResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get POSes

Code samples

# You can also use wget
curl -X GET /references/poses \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /references/poses HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/references/poses',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/references/poses',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/references/poses', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/references/poses', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/references/poses");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/references/poses", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /references/poses

List of POS(s)

POS (Point of sale) is a region or a country from which the fares are to be extracted from. For example an airline based out of Europe may be interested in European POS to see the same prices as their European customers.

The GET /references/poses API endpoint provides a complete list of points of sale (POS) available in our system. Users can access this endpoint to obtain the complete list of country, city and code of all POS available in our system.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "posses": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "posCode": 10,
      "code": "POS/10",
      "region": "Eastern",
      "countryCode": "IN",
      "countryName": "India",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Responses

Status Meaning Description Schema
200 OK Success posResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get Currencies

Code samples

# You can also use wget
curl -X GET /references/currencies \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /references/currencies HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/references/currencies',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/references/currencies',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/references/currencies', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/references/currencies', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/references/currencies");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/references/currencies", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /references/currencies

List of the Currencies

Currency refers to the currency the fare is to be extracted from. The API endpoint provides a list of all available in our database currencies. Users can access this endpoint to identify and retrieve the complete list of currencies and their codes offered in our database.

The GET request to retrieve the cabin classes data does not require any parameters. Simply make a GET request to the endpoint mentioned above.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "currencies": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "iso": "BOB",
      "symbol": "Bs",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Responses

Status Meaning Description Schema
200 OK Success currencyResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get Timezones

Code samples

# You can also use wget
curl -X GET /references/timezones \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /references/timezones HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/references/timezones',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/references/timezones',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/references/timezones', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/references/timezones', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/references/timezones");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/references/timezones", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /references/timezones

List of Timezones

Timezone refers to the local time of departure or arrival. The API endpoint provides a list of all available in our database time zones and countries. Users can access this endpoint to identify and retrieve the complete list of timezones offered in our database.

The GET request to retrieve the cabin classes data does not require any parameters. Simply make a GET request to the endpoint mentioned above.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "timezones": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "timezone": "Lands Between/Limgrave",
      "countryCode": "LMGV",
      "countryName": "Limgrave",
      "gmtOffSet": "99:98",
      "abbr": "LMGVST",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Responses

Status Meaning Description Schema
200 OK Success timezonesResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get Price Classes

Code samples

# You can also use wget
curl -X GET /references/priceclasses \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /references/priceclasses HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/references/priceclasses',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/references/priceclasses',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/references/priceclasses', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/references/priceclasses', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/references/priceclasses");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/references/priceclasses", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /references/priceclasses

List of all the Price Classes

Priceclass is a range of prices available on some sources within the same cabin. For example an airline may have three different prices in economy:- Restricted, Semiflexible and Flexible. These are what we define as price classes.

The API endpoint provides a list of all available in our database price classes associated to sources and sources categorized to channels. Users can access this endpoint to identify and retrieve the complete list of price classes and its sources offered in our database. The GET request to retrieve the cabin classes data does not require any parameters. Simply make a GET request to the endpoint mentioned above.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "priceClasses": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "channel": "OTA",
      "source": "Expedia",
      "_airline": "61515cf678e57a702174290f",
      "priceClass": "Economy-Main Cabin",
      "sourceCode": 5,
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "640aca5b56f99935b4c9deb2"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Responses

Status Meaning Description Schema
200 OK Success priceclassResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Entity Informations

Search Sources

Code samples

# You can also use wget
curl -X POST /entity/sources/search \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST /entity/sources/search HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "searchTerm": "Airline",
  "channel": "Direct"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/entity/sources/search',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post '/entity/sources/search',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('/entity/sources/search', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/entity/sources/search', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/entity/sources/search");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/entity/sources/search", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /entity/sources/search

Entity Informations

Our database uses various sources to extract the price from. Each source has a name (like Expedia). Also each source is categorized by its specific character of channel:- OTA, META, BRAND.COM

The API method allows you to retrieve data details about sources and available airlines from the database based on specific criteria. By providing a search term and channel (category of sources) in the request, you can filter the results to meet your requirements:- an airline and at which sources it is available.

The response to this request will include information such as the airline name, code, country, and sources with codes this airline is available at.

Body parameter

{
  "searchTerm": "Airline",
  "channel": "Direct"
}

Parameters

Name In Type Required Description
body body entityReq true none

Example responses

200 Response

{
  "error": false,
  "searchTerm": "Airline",
  "channel": "Direct",
  "matchingSources": [
    {
      "_id": "61515e4fb77f75890e8acbaa",
      "source": "ASKY Airlines",
      "code": 4444,
      "channel": "Direct",
      "vertical": "flightrates",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540",
      "id": "640aca5b56f99935b4c9deb2"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success entityResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Flightrates Informations

Get Flightrates

Code samples

# You can also use wget
curl -X GET /flightrates/{shopId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /flightrates/{shopId} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/flightrates/{shopId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/flightrates/{shopId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/flightrates/{shopId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/flightrates/{shopId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/flightrates/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/flightrates/{shopId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /flightrates/{shopId}

List of all the Flightrates available

Flight rates are prices that the airlines distribute to various sources in various price classes in various cabins for specific routes on specific days.

The API method GET /flightrates/{shopId} allows users to retrieve a list of all flight rates associated with a specific shop. To obtain the flight rates, send a GET request to the specified endpoint, replacing {shopId} in the URL with the actual ID of the shop.

Parameters

Name In Type Required Description
shopId path string(string) true Id of the Flight Shop
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "flightrates": [
    {
      "travellers": {
        "adults": 1,
        "infants": 0,
        "children": 1
      },
      "_id": "63a59bf4533a40315c201e77",
      "outbound": {
        "price": 171,
        "baseFare": 0,
        "feesAndOthers": 0,
        "description": "",
        "numOfStops": 2,
        "metaProviderName": "",
        "layover": "13:58",
        "flightStatusCode": 22,
        "departureDate": "2022-08-17T00:00:00.000Z",
        "departureTime": "17:55",
        "arrivalDate": "2022-08-18T00:00:00.000Z",
        "arrivalTime": "14:36",
        "totalDuration": "19:41",
        "flightTime": "05:43",
        "actualPrice": 0,
        "actualBaseFare": 0,
        "actualFeeAndOthers": 0,
        "_priceClass": {
          "_id": "64379fbbe61b76b1a70c41c4",
          "channel": "OTA",
          "source": "Expedia",
          "id": "64379fbbe61b76b1a70c41c4"
        },
        "priceClassName": "Standard",
        "bookingClass": "Z",
        "legs": [
          {
            "_id": "64802d78164ff91223679439",
            "origin": "CUN",
            "destination": "MCO",
            "description": "",
            "distance": 0,
            "fbc": "",
            "seatCount": 1,
            "departureDate": "2022-08-17T00:00:00.000Z",
            "departureTime": "17:55",
            "arrivalDate": "2022-08-17T00:00:00.000Z",
            "arrivalTime": "21:02",
            "airlineShortCode": "NK",
            "flightNumber": "NK-544",
            "flightTime": "02:07",
            "waitTime": "10:53",
            "operatedBy": "",
            "_airline": {
              "_id": "601bb896f764ad17a4b71e66",
              "displayName": "Air Arabia",
              "id": "601bb896f764ad17a4b71e66"
            },
            "airlineName": "Air Arabia",
            "airlineCode": 1
          }
        ],
        "baggageDetails": "",
        "promoCode": "",
        "discounts": "",
        "taxStatus": 22,
        "_id": "64802d78164ff9122367943c",
        "allFlightNumbers": [
          "NK-544, NK-195,NK-145"
        ],
        "allStopOverAirports": [
          "CUN, FLL, SDQ, MCQ"
        ],
        "allAirlineCodes": [
          "1, 1, 1"
        ],
        "id": "64802d78164ff9122367943c"
      },
      "flyFrom": "CUN",
      "flyTo": "SDQ",
      "isRoundTrip": false,
      "departDate": "2022-08-17T00:00:00.000Z",
      "returnDate": "2022-08-18T00:00:00.000Z",
      "channelName": "Spirit",
      "channelType": "brand",
      "airlineCode": 35,
      "totalPrice": 244,
      "isRatePerPerson": false,
      "previousPrice": null,
      "isMultipleAirline": false,
      "collectedAt": "2022-07-16T18:52:57.214Z",
      "statusCode": 200,
      "batchInsertionId": "6448ce36bc44695e8914a8c2",
      "_user": {
        "name": {
          "first": "Rishi",
          "last": "Mishra",
          "full": "Rishi Mishra"
        },
        "_id": "643ce6fe6206ebd1cbf88fb8"
      },
      "userName": "admin@aggregateintelligence.com",
      "flightTripHash": "",
      "_flightShop": {
        "_id": "63fdd677a631b4a452c34b24",
        "shopName": "Achintya flightshop",
        "id": "63fdd677a631b4a452c34b24"
      },
      "flightShopName": "Test Jetblue_copaair",
      "_source": {
        "_id": "5f8999c220506157701f23aa",
        "source": "Biman Bangladesh Airlines",
        "channel": "OTA",
        "id": "5f8999c220506157701f23aa"
      },
      "sourceName": "Biman Bangladesh Airlines",
      "sourceId": 1,
      "_pos": {
        "_id": "62a2e3ca581567e3cd67cddc",
        "posCode": 175,
        "code": "POS/175",
        "id": "62a2e3ca581567e3cd67cddc"
      },
      "posName": "My Code",
      "_cabinClass": {
        "_id": "6013a6abf553c71d4dfbe92b",
        "name": "Economy",
        "id": "6013a6abf553c71d4dfbe92b"
      },
      "_currency": "5fa104806304832acf9c67e9",
      "currencyName": "AED",
      "updatedAt": "2022-12-28T05:48:30.669Z",
      "_flyFrom": {
        "_id": "5ec38d7afee3472b729b77a6",
        "airportName": "Campbell River Airport",
        "id": "5ec38d7afee3472b729b77a6"
      },
      "_flyTo": {
        "_id": "5ec38d7afee3472b729b778c",
        "airportName": "Nadzab Airport",
        "id": "5ec38d7afee3472b729b778c"
      },
      "rowHash": "YyX",
      "id": "63a59bf4533a40315c201e5f"
    }
  ],
  "totalData": 1,
  "totalPages": 1,
  "page": 1,
  "size": 10
}

Responses

Status Meaning Description Schema
200 OK Success flightratesResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Hooks

Get Hooks

Code samples

# You can also use wget
curl -X GET /hooks \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /hooks HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/hooks',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/hooks',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/hooks', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/hooks', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/hooks");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/hooks", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /hooks

List of all Hooks

Hooks or Webhooks are user-defined HTTP callbacks or endpoints that allow applications to send real-time notifications or data to a specified URL when a particular event or trigger occurs. This API provides a list and details of all user hooks. Users can access this endpoint to obtain details about each hook, including the hook username, userid, authtype and other relevant information.

Upon a successful request, the system will respond with a JSON object containing all information of all hooks.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "hooks": [
    {
      "_id": "63ff246fb2482db1c660e310",
      "_user": "63fda531bde67155fc46fb41",
      "userName": "rishi",
      "endPoint": "/api/v1/latest",
      "authType": "Personal",
      "userId": "RM123",
      "pwdTxt": "uuxx",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
      "hookType": "dbs",
      "isActiveStatus": true,
      "_shop": "63fdc414cccc3592d31b3ac8",
      "vertical": "flightrates",
      "isCustomerCreated": true,
      "createdAt": "2023-03-01T10:09:51.960Z",
      "updatedAt": "2023-03-01T10:28:26.580",
      "id": "63ff246fb2482db1c660e310",
      "_createdBy": "63ff246fb2482db1c660e310",
      "_updatedBy": null
    }
  ],
  "totalData": 1,
  "totalPages": 1,
  "page": 1,
  "size": 1
}

Responses

Status Meaning Description Schema
200 OK Success hooksFindResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get Hook

Code samples

# You can also use wget
curl -X GET /hook/{hooksId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /hook/{hooksId} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/hook/{hooksId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/hook/{hooksId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/hook/{hooksId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/hook/{hooksId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/hook/{hooksId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/hook/{hooksId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /hook/{hooksId}

Get a single Hook

This API provides details of a specific user hook. By providing the hook ID in the request, users can obtain details about the hook, including the hook username, userid, authtype and other relevant information.

Parameters

Name In Type Required Description
hooksId path string(string) true none

Example responses

200 Response

{
  "error": false,
  "hook": {
    "_id": "63ff246fb2482db1c660e310",
    "_user": "63fda531bde67155fc46fb41",
    "userName": "achintya",
    "endPoint": "/api/v1/my-hook",
    "authType": "jwt",
    "userId": "63fda531bde67155fc46fb4",
    "pwdTxt": "demo1",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
    "hookType": "dbs",
    "isActiveStatus": true,
    "_shop": "63fdc414cccc3592d31b3ac8",
    "vertical": "flightrates",
    "isCustomerCreated": true,
    "createdAt": "2023-03-01T10:09:51.960Z",
    "updatedAt": "2023-03-01T10:28:26.580",
    "id": "63ff246fb2482db1c660e310",
    "_createdBy": "63ff246fb2482db1c660e310",
    "_updatedBy": null
  }
}

Responses

Status Meaning Description Schema
200 OK Success hooksGetResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Delete Hook

Code samples

# You can also use wget
curl -X DELETE /hook/{hooksId} \
  -H 'Authorization: Bearer {access-token}'

DELETE /hook/{hooksId} HTTP/1.1


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('/hook/{hooksId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete '/hook/{hooksId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('/hook/{hooksId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','/hook/{hooksId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/hook/{hooksId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/hook/{hooksId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /hook/{hooksId}

Delete a single Hook

By using this endpoint the user can delete a single hook.

Parameters

Name In Type Required Description
hooksId path string(string) true none

Responses

Status Meaning Description Schema
200 OK Ok, data deleted None
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Create Hook

Code samples

# You can also use wget
curl -X POST /hook \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST /hook HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "endPoint": "/api/v1/my-hook",
  "authType": "jwt",
  "userId": "63fda531bde67155fc46fb4",
  "pwdTxt": "uuxx",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
  "hookType": "dbs",
  "isActiveStatus": true,
  "_shop": "63fdc414cccc3592d31b3ac8"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/hook',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post '/hook',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('/hook', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/hook', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/hook");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/hook", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /hook

Create a new Hook

Hooks or Webhooks are user-defined HTTP callbacks or endpoints that allow applications to send real-time notifications or data to a specified URL when a particular event or trigger occurs. By making a POST request to this endpoint, users can provide the necessary parameters and details in the request body to define a new hook. This includes information such as the endpoint, authtype, userId and any other relevant parameters or configurations.

Body parameter

{
  "endPoint": "/api/v1/my-hook",
  "authType": "jwt",
  "userId": "63fda531bde67155fc46fb4",
  "pwdTxt": "uuxx",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
  "hookType": "dbs",
  "isActiveStatus": true,
  "_shop": "63fdc414cccc3592d31b3ac8"
}

Parameters

Name In Type Required Description
body body hooksPostReq true none

Example responses

200 Response

{
  "error": false,
  "hook": {
    "_user": "63fda531bde67155fc46fb41",
    "userName": "achintya",
    "endPoint": "/api/v1/my-hook",
    "authType": "jwt",
    "userId": "63fda531bde67155fc46fb4",
    "pwdTxt": "demo1",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
    "hookType": "dbs",
    "isActiveStatus": true,
    "_shop": "63fdc414cccc3592d31b3ac8",
    "vertical": "flightrates",
    "isCustomerCreated": true,
    "createdAt": "2023-03-01T10:09:51.960Z",
    "updatedAt": "2023-03-01T10:28:26.580",
    "id": "63ff246fb2482db1c660e310",
    "_createdBy": "63ff246fb2482db1c660e310",
    "_updatedBy": null
  }
}

Responses

Status Meaning Description Schema
200 OK Success hooksPostResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Shops

Get Shops

Code samples

# You can also use wget
curl -X GET /shops \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /shops HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/shops',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/shops',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/shops', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/shops', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/shops");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/shops", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /shops

List of all the Shops

A shop is a set of specific parameters that form a request to extract fares. A shop will have details like route, airline, source, horizon of days to extract, frequency of extractions etc. Once set up, the shop gets a unique ID.

The API endpoint provides a list of all available on your account shops and their details. Users can access this endpoint to identify and retrieve the complete list of their shops. The GET request to retrieve the shops does not require any parameters. Simply make a GET request to the endpoint mentioned above.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "shops": [
    {
      "_OD": [
        {
          "_flyFrom": "62b943e4dd59913b61a6b15b",
          "_flyTo": "62b943e4dd59913b61a6b15c"
        }
      ],
      "_sources": [
        "6239aec26c3c588d8f64ecfc"
      ],
      "_alternateSources": [
        "61515e50b77f75890e8acbaf"
      ],
      "_cabinClasses": [
        "6013a6abf553c71d4dfbe92d"
      ],
      "isRoundTrip": true,
      "horizons": [
        "1"
      ],
      "pax": {
        "adults": 1,
        "infants": 0,
        "children": 0
      },
      "noOfStops": 1,
      "los": 1,
      "duration": {
        "hour": 30,
        "minute": 33
      },
      "fareType": "regular",
      "startDate": "2022-11-07",
      "_pos": "62a2e3ca581567e3cd67ce1a",
      "_currency": "5fa104806304832acf9c67f5",
      "shopName": "Rishi Mishra Shop",
      "OD": [
        "AABAAA"
      ],
      "_user": "6411b27b79d2c995fc689c4b",
      "userName": "Rishi",
      "vertical": "flightrates",
      "posName": "POS/123",
      "isCustomerCreated": true,
      "deliveryMode": [
        "db"
      ],
      "isActiveStatus": true,
      "_createdBy": "63fda531bde67155fc46fb41",
      "_updatedBy": "",
      "_id": "640ace815353bdb6454references",
      "createdAt": "2023-03-10T06:30:25.288Z",
      "updatedAt": "2023-03-10T06:30:25.288Z",
      "id": "640ace815353bdb6454e191b"
    }
  ],
  "totalData": 3,
  "totalPages": 2,
  "page": 1,
  "size": 2
}

Responses

Status Meaning Description Schema
200 OK Success shopsFindResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get Shop

Code samples

# You can also use wget
curl -X GET /shop/{shopId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /shop/{shopId} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/shop/{shopId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/shop/{shopId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/shop/{shopId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/shop/{shopId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/shop/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/shop/{shopId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /shop/{shopId}

Get a single Shop

The API endpoint provides a list of details of specific shops on your account. Users can access this endpoint to identify and retrieve the complete details of the shop. To obtain the shop details, send a GET request to the specified endpoint, replacing {shopId} in the URL with the actual ID of the shop.

Parameters

Name In Type Required Description
shopId path string(string) true The ID of the Shop

Example responses

200 Response

{
  "error": false,
  "shop": {
    "_OD": [
      {
        "_flyFrom": "62b943e4dd59913b61a6b15b",
        "_flyTo": "62b943e4dd59913b61a6b15c"
      }
    ],
    "_sources": [
      "6239aec26c3c588d8f64ecfc"
    ],
    "_alternateSources": [
      "61515e50b77f75890e8acbaf"
    ],
    "_cabinClasses": [
      "6013a6abf553c71d4dfbe92d"
    ],
    "isRoundTrip": true,
    "los": 1,
    "pax": {
      "adults": 1,
      "infants": 0,
      "children": 0
    },
    "duration": {
      "hour": 30,
      "minute": 20
    },
    "fareType": "regular",
    "startDate": "2022-11-07",
    "_pos": "62a2e3ca581567e3cd67ce1a",
    "_currency": "5fa104806304832acf9c67f5",
    "shopName": "Rishi Mishra Shop",
    "OD": [
      "AABAAA"
    ],
    "_user": "6411b27b79d2c995fc689c4b",
    "userName": "Rishi",
    "vertical": "flightrates",
    "posName": "POS/123",
    "deliveryMode": [
      "db"
    ],
    "isActiveStatus": true,
    "_createdBy": "63fda531bde67155fc46fb41",
    "_updatedBy": "",
    "_id": "640ace815353bdb6454e191b",
    "isCustomerCreated": true,
    "createdAt": "2023-03-10T06:30:25.288Z",
    "updatedAt": "2023-03-10T06:30:25.288Z",
    "id": "640ace815353bdb6454e191b"
  }
}

Responses

Status Meaning Description Schema
200 OK Success shopsGetResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Update Shop

Code samples

# You can also use wget
curl -X PUT /shop/{shopId} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

PUT /shop/{shopId} HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "shopName": "Myshop Rishi",
  "isActiveStatus": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/shop/{shopId}',
{
  method: 'PUT',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.put '/shop/{shopId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.put('/shop/{shopId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('PUT','/shop/{shopId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/shop/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("PUT");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("PUT", "/shop/{shopId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

PUT /shop/{shopId}

Update the existing Shop

This API method is useful when users need to make changes or updates to an existing shop. By providing a shop ID in the request, you can edit the results to meet your requirements.

Body parameter

{
  "shopName": "Myshop Rishi",
  "isActiveStatus": true
}

Parameters

Name In Type Required Description
shopId path string(string) true none
body body shopPutReq true none

Example responses

200 Response

{
  "error": false,
  "shop": {
    "_OD": [
      {
        "_flyFrom": "62b943e4dd59913b61a6b15b",
        "_flyTo": "62b943e4dd59913b61a6b15c"
      }
    ],
    "_sources": [
      "6239aec26c3c588d8f64ecfc"
    ],
    "_alternateSources": [
      "61515e50b77f75890e8acbaf"
    ],
    "_cabinClasses": [
      "6013a6abf553c71d4dfbe92d"
    ],
    "isRoundTrip": true,
    "los": 1,
    "pax": {
      "adults": 1,
      "infants": 0,
      "children": 0
    },
    "duration": {
      "hour": 32,
      "minute": 40
    },
    "fareType": "regular",
    "startDate": "2022-11-07",
    "_pos": "62a2e3ca581567e3cd67ce1a",
    "_currency": "5fa104806304832acf9c67f5",
    "shopName": "Rishi Mishra Shop",
    "OD": [
      "AABAAA"
    ],
    "_user": "6411b27b79d2c995fc689c4b",
    "userName": "Rishi",
    "vertical": "flightrates",
    "posName": "POS/123",
    "deliveryMode": [
      "db"
    ],
    "isActiveStatus": true,
    "_createdBy": "63fda531bde67155fc46fb41",
    "_updatedBy": "",
    "_id": "640ace815353bdb6454e191b",
    "isCustomerCreated": true,
    "createdAt": "2023-03-10T06:30:25.288Z",
    "updatedAt": "2023-03-10T06:30:25.288Z",
    "id": "640ace815353bdb6454e191b"
  }
}

Responses

Status Meaning Description Schema
200 OK Success shopPutResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Delete Shop

Code samples

# You can also use wget
curl -X DELETE /shop/{shopId} \
  -H 'Authorization: Bearer {access-token}'

DELETE /shop/{shopId} HTTP/1.1


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('/shop/{shopId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete '/shop/{shopId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('/shop/{shopId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','/shop/{shopId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/shop/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/shop/{shopId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /shop/{shopId}

Delete the existing Shop

This endpoint allows users to delete a specific flight shop. By providing the shop ID in the request, users can permanently remove the shop and all associated details.

Parameters

Name In Type Required Description
shopId path string(string) true The ID of the Shop

Responses

Status Meaning Description Schema
200 OK Ok, data deleted None
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Status Shop

Code samples

# You can also use wget
curl -X GET /shop/status/{shopId} \
  -H 'Authorization: Bearer {access-token}'

GET /shop/status/{shopId} HTTP/1.1


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('/shop/status/{shopId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/shop/status/{shopId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/shop/status/{shopId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/shop/status/{shopId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/shop/status/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/shop/status/{shopId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /shop/status/{shopId}

Get the status of a single Shop

A status of a rateshop is a coded information if the shop is active, or not active in the system. Active shop means the extractions are performed. By providing the shop ID in the request, this API endpoint allows users to retrieve the status of a specific flight shop.

Parameters

Name In Type Required Description
shopId path string(string) true Shop Id

Responses

Status Meaning Description Schema
501 Not Implemented Under construction 🚧 !! None

Create Shop

Code samples

# You can also use wget
curl -X POST /shop \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST /shop HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "_OD": [
    {
      "_flyFrom": "62b943e4dd59913b61a6b15b",
      "_flyTo": "62b943e4dd59913b61a6b15c"
    }
  ],
  "_sources": [
    "6239aec26c3c588d8f64ecfc"
  ],
  "_alternateSources": [
    "61515e50b77f75890e8acbaf"
  ],
  "_cabinClasses": [
    "6013a6abf553c71d4dfbe92d"
  ],
  "isRoundTrip": false,
  "los": 1,
  "horizons": [
    "2022-03-02"
  ],
  "pax": {
    "adults": 1,
    "infants": 0,
    "children": 0
  },
  "noOfStops": 1,
  "duration": {
    "hour": 40,
    "minute": 30
  },
  "fareType": "regular",
  "startDate": "2022-11-07",
  "_pos": "62a2e3ca581567e3cd67ce1a",
  "_currency": "5fa104806304832acf9c67f5",
  "shopName": "Rishi Mishra Shop",
  "deliveryMode": [
    "db"
  ],
  "isActiveStatus": true
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/shop',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post '/shop',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('/shop', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/shop', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/shop");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/shop", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /shop

Create a new Shop

A shop is a set of specific parameters that form a request to extract fares. A shop will have parameters like route, airline, source, horizon of days to extract, frequency of extractions etc. Once set up, the shop gets a unique ID.

This API method serves the purpose of adding a new flight shop to the user's system. It offers a convenient way to specify the required parameters. Upon a successful request, the system will create the new shop and provide a confirmation response with shops unique ID

Body parameter

{
  "_OD": [
    {
      "_flyFrom": "62b943e4dd59913b61a6b15b",
      "_flyTo": "62b943e4dd59913b61a6b15c"
    }
  ],
  "_sources": [
    "6239aec26c3c588d8f64ecfc"
  ],
  "_alternateSources": [
    "61515e50b77f75890e8acbaf"
  ],
  "_cabinClasses": [
    "6013a6abf553c71d4dfbe92d"
  ],
  "isRoundTrip": false,
  "los": 1,
  "horizons": [
    "2022-03-02"
  ],
  "pax": {
    "adults": 1,
    "infants": 0,
    "children": 0
  },
  "noOfStops": 1,
  "duration": {
    "hour": 40,
    "minute": 30
  },
  "fareType": "regular",
  "startDate": "2022-11-07",
  "_pos": "62a2e3ca581567e3cd67ce1a",
  "_currency": "5fa104806304832acf9c67f5",
  "shopName": "Rishi Mishra Shop",
  "deliveryMode": [
    "db"
  ],
  "isActiveStatus": true
}

Parameters

Name In Type Required Description
body body shopsPostReq true none

Example responses

200 Response

{
  "error": false,
  "shop": {
    "_OD": [
      {
        "_flyFrom": "62b943e4dd59913b61a6b15b",
        "_flyTo": "62b943e4dd59913b61a6b15c"
      }
    ],
    "_sources": [
      "6239aec26c3c588d8f64ecfc"
    ],
    "_alternateSources": [
      "61515e50b77f75890e8acbaf"
    ],
    "_cabinClasses": [
      "6013a6abf553c71d4dfbe92d"
    ],
    "isRoundTrip": true,
    "horizons": [
      2
    ],
    "pax": {
      "adults": 1,
      "children": 0,
      "infants": 0
    },
    "duration": {
      "hour": 30,
      "minute": 35
    },
    "fareType": "regular",
    "noOfStops": 1,
    "startDate": "2022-11-07",
    "_pos": "62a2e3ca581567e3cd67ce1a",
    "_currency": "5fa104806304832acf9c67f5",
    "shopName": "Rishi Mishra Shop",
    "OD": [
      "AABAAA"
    ],
    "_user": "6411b27b79d2c995fc689c4b",
    "userName": "Rishi",
    "vertical": "flightrates",
    "posName": "POS/123",
    "los": 1,
    "deliveryMode": [
      "db"
    ],
    "isActiveStatus": true,
    "_createdBy": "63fda531bde67155fc46fb41",
    "_updatedBy": "",
    "_id": "640ace815353bdb6454e191b",
    "isCustomerCreated": true,
    "createdAt": "2023-03-10T06:30:25.288Z",
    "updatedAt": "2023-03-10T06:30:25.288Z",
    "id": "640ace815353bdb6454e191b"
  }
}

Responses

Status Meaning Description Schema
200 OK Success shopsPostResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Schedules

Get Schedules

Code samples

# You can also use wget
curl -X GET /schedules \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /schedules HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/schedules',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/schedules',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/schedules', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/schedules', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/schedules");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/schedules", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /schedules

List of all Schedules

A schedule is a method to program in time the extractions of shops. For example a shop can be scheduled to extract at 8am every day, or another shop can be extracted on Tuesdays only. This API provides a list and details of all user schedules. Users can access this endpoint to obtain details about each schedule, including the schedule name, year, month, and other relevant information.

Upon a successful request, the system will respond with a JSON object containing all information of all schedules.

Parameters

Name In Type Required Description
page query integer false The page number to retrieve.
size query integer false The number of items to be displayed per page.

Example responses

200 Response

{
  "error": false,
  "schedules": [
    {
      "_id": "63ff1e0bb2482db1c660e306",
      "scheduleName": "Achintya flightrates",
      "_shop": "63fdd677a631b4a452c34b24",
      "_timezone": "63fdd677a631b4a452c34b22",
      "timezoneName": "asia/kol",
      "dayOfMonth": "*",
      "month": "*",
      "dayOfWeek": "*",
      "hour": "*",
      "minute": "*",
      "crontabExpression": "* * * * *",
      "crontabHuman": "Every minute, every hour, every day",
      "isActiveStatus": "true,",
      "startDate": "2022-10-24",
      "endDate": "2023-10-24",
      "_user": "63fda531bde67155fc46fb41",
      "userName": "achintya",
      "vertical": "flightrates",
      "isCustomerCreated": "true,",
      "createdAt": "2023-03-01T09:42:35.372Z",
      "updatedAt": "2023-03-03T06:22:55.108Z",
      "id": "63ff1e0bb2482db1c660e306",
      "_createdBy": "63ff246fb2482db1c660e310",
      "_updatedBy": null
    }
  ],
  "totalData": 1,
  "totalPages": 1,
  "page": 1,
  "size": 10
}

Responses

Status Meaning Description Schema
200 OK Success schedulesFindResp
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Get Schedule

Code samples

# You can also use wget
curl -X GET /schedule/{scheduleId} \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

GET /schedule/{scheduleId} HTTP/1.1

Accept: application/json


const headers = {
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/schedule/{scheduleId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/schedule/{scheduleId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/schedule/{scheduleId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/schedule/{scheduleId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/schedule/{scheduleId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/schedule/{scheduleId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /schedule/{scheduleId}

Get a single Schedule

This API provides details of a specific user schedule. By providing the schedule ID in the request, users can obtain details about the schedule, including the schedule name, year, month, and other relevant information.

Parameters

Name In Type Required Description
scheduleId path string(string) true Schedule Id

Example responses

200 Response

{
  "error": false,
  "schedule": {
    "_id": "63ff1e0bb2482db1c660e306",
    "scheduleName": "Achintya flightrates",
    "_shop": "63fdd677a631b4a452c34b24",
    "_timezone": "63fdd677a631b4a452c34b22",
    "timezoneName": "asia/kol",
    "dayOfMonth": "*",
    "month": "*",
    "dayOfWeek": "*",
    "hour": "*",
    "minute": "*",
    "crontabExpression": "* * * * *",
    "crontabHuman": "Every minute, every hour, every day",
    "isActiveStatus": "true,",
    "startDate": "2022-10-24",
    "endDate": "2023-10-24",
    "_user": "63fda531bde67155fc46fb41",
    "userName": "achintya",
    "vertical": "flightrates",
    "isCustomerCreated": "true,",
    "createdAt": "2023-03-01T09:42:35.372Z",
    "updatedAt": "2023-03-03T06:22:55.108Z",
    "id": "63ff1e0bb2482db1c660e306",
    "_createdBy": "63ff246fb2482db1c660e310",
    "_updatedBy": null
  }
}

Responses

Status Meaning Description Schema
200 OK Success schedulesGetResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Delete Schedule

Code samples

# You can also use wget
curl -X DELETE /schedule/{scheduleId} \
  -H 'Authorization: Bearer {access-token}'

DELETE /schedule/{scheduleId} HTTP/1.1


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('/schedule/{scheduleId}',
{
  method: 'DELETE',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.delete '/schedule/{scheduleId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.delete('/schedule/{scheduleId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('DELETE','/schedule/{scheduleId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/schedule/{scheduleId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("DELETE");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("DELETE", "/schedule/{scheduleId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

DELETE /schedule/{scheduleId}

Get a single Schedule

By using this endpoint the user can delete a single schedule.

Parameters

Name In Type Required Description
scheduleId path string(string) true Schedule Id

Responses

Status Meaning Description Schema
200 OK Ok, data deleted None
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Trigger Schedule

Code samples

# You can also use wget
curl -X GET /schedule/now/{shopId} \
  -H 'Authorization: Bearer {access-token}'

GET /schedule/now/{shopId} HTTP/1.1


const headers = {
  'Authorization':'Bearer {access-token}'
};

fetch('/schedule/now/{shopId}',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.get '/schedule/now/{shopId}',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Authorization': 'Bearer {access-token}'
}

r = requests.get('/schedule/now/{shopId}', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('GET','/schedule/now/{shopId}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/schedule/now/{shopId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "/schedule/now/{shopId}", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

GET /schedule/now/{shopId}

Trigger realtime Schedule

Real time is a method to extract fare information from sources straight after posting the method. This API endpoint enables users to trigger a real-time schedule for a specific shop by providing the shop ID in request.

Parameters

Name In Type Required Description
shopId path string(string) true Shop Id

Responses

Status Meaning Description Schema
501 Not Implemented Under construction 🚧 !! None

Create Schedule

Code samples

# You can also use wget
curl -X POST /schedule \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer {access-token}'

POST /schedule HTTP/1.1

Content-Type: application/json
Accept: application/json

const inputBody = '{
  "scheduleName": "Achintya flightrates",
  "_shops": [
    "63fdd677a631b4a452c34b24"
  ],
  "_timezone": "63fdd677a631b4a452c34b22",
  "dayOfMonth": "*",
  "month": "*",
  "dayOfWeek": "*",
  "hour": "*",
  "minute": "*",
  "isActiveStatus": "true,",
  "startDate": "2022-10-24",
  "endDate": "2023-10-24"
}';
const headers = {
  'Content-Type':'application/json',
  'Accept':'application/json',
  'Authorization':'Bearer {access-token}'
};

fetch('/schedule',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

require 'rest-client'
require 'json'

headers = {
  'Content-Type' => 'application/json',
  'Accept' => 'application/json',
  'Authorization' => 'Bearer {access-token}'
}

result = RestClient.post '/schedule',
  params: {
  }, headers: headers

p JSON.parse(result)

import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'Authorization': 'Bearer {access-token}'
}

r = requests.post('/schedule', headers = headers)

print(r.json())

<?php

require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/json',
    'Accept' => 'application/json',
    'Authorization' => 'Bearer {access-token}',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/schedule', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

URL obj = new URL("/schedule");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
    new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
    response.append(inputLine);
}
in.close();
System.out.println(response.toString());

package main

import (
       "bytes"
       "net/http"
)

func main() {

    headers := map[string][]string{
        "Content-Type": []string{"application/json"},
        "Accept": []string{"application/json"},
        "Authorization": []string{"Bearer {access-token}"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("POST", "/schedule", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

POST /schedule

Create new Schedule

A schedule is a method to program in time the extractions of shops. For example a shop can be scheduled to extract at 8am every day, or another shop can be extracted on Tuesdays only. By making a POST request to this endpoint, users can provide the necessary parameters and details in the request body to define a new schedule. This includes information such as the schedule name, date, time, and any other relevant parameters or configurations.

Body parameter

{
  "scheduleName": "Achintya flightrates",
  "_shops": [
    "63fdd677a631b4a452c34b24"
  ],
  "_timezone": "63fdd677a631b4a452c34b22",
  "dayOfMonth": "*",
  "month": "*",
  "dayOfWeek": "*",
  "hour": "*",
  "minute": "*",
  "isActiveStatus": "true,",
  "startDate": "2022-10-24",
  "endDate": "2023-10-24"
}

Parameters

Name In Type Required Description
body body schedulePostReq true none

Example responses

200 Response

{
  "error": false,
  "schedule": {
    "scheduleName": "Achintya flightrates",
    "_shop": "63fdd677a631b4a452c34b24",
    "_timezone": "63fdd677a631b4a452c34b22",
    "dayOfMonth": "*",
    "month": "*",
    "dayOfWeek": "*",
    "hour": "*",
    "minute": "*",
    "crontabExpression": "* * * * *",
    "crontabHuman": "Every minute, every hour, every day",
    "timezoneName": "Africa/Addis_Ababa",
    "isActiveStatus": "true,",
    "startDate": "2022-10-24",
    "endDate": "2023-10-24",
    "_user": "63fda531bde67155fc46fb41",
    "userName": "achintya",
    "vertical": "flightrates",
    "isCustomerCreated": "true,",
    "createdAt": "2023-03-01T09:42:35.372Z",
    "updatedAt": "2023-03-03T06:22:55.108Z",
    "id": "63ff1e0bb2482db1c660e306",
    "_createdBy": "63ff246fb2482db1c660e310",
    "_updatedBy": null
  }
}

Responses

Status Meaning Description Schema
200 OK Success schedulePostResp
400 Bad Request Request data failed validation(s) None
401 Unauthorized Authentication Failed! None
500 Internal Server Error Internal Server Error None

Schemas

userReq

{
  "handle": "myuser",
  "password": "supersecret"
}

Properties

Name Type Required Restrictions Description
handle string true none Request an user by.
password string true none Secret

userResp

{
  "error": false,
  "token": "AXSGpLVjnef7w5XgfWdoBwbfs",
  "handle": "myuser"
}

Properties

Name Type Required Restrictions Description
error boolean false none none
token string false none Represents an access token.
handle string false none Represents a handle.

Enumerated Values

Property Value
error false

airlinesResp

{
  "error": false,
  "airlines": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "sourceName": "AirIndia",
      "displayName": "AirInd",
      "code": 11,
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Properties

Name Type Required Restrictions Description
error boolean false none none
airlines [object] false none List of all the Airlines.
» _id string false none The airline's distinctive identifier.
» sourceName string false none The source name of the airline intended for travel.
» displayName string false none The display name of the airline selected for travel.
» code number false none The code of the airline selected for travel.
» isActiveStatus boolean false none The active status of the airline chosen for travel.
» _createdBy string false none The id of the user, who created the airline to be selected for travel.
» _updatedBy string false none The user who last updated the details of the airline for travel.
» createdAt string false none The date and time, when the airline details was created.
» updatedAt string false none The date and time, when the details of the airline was last updated.
» id string false none The airline's distinctive and unique identifier.
totalData number false none Total data of the airlines selected for travel.
totalPages number false none Total number of pages.
page number false none The current page number to retrieve.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false

airportsResp

{
  "error": false,
  "airports": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "airportName": "Netaji Subhas Chandra Bose International Airport",
      "city": "Kolkata",
      "airportCode": "CCU",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Properties

Name Type Required Restrictions Description
error boolean false none none
airports [object] false none The list of all the airports
» _id string false none The airport's distinctive identifier.
» airportName string false none The name of the airport.
» city string false none The city where the airport is located.
» airportCode string false none The code representing the country, where the airport is located.
» isActiveStatus boolean false none The active status of the airport.
» _createdBy string false none The ID of the user, who created the airport entry.
» _updatedBy string false none The ID of the user, who last updated the airport entry.
» createdAt string false none The date and time, when the airport entry was created.
» updatedAt string false none The date and time when the airport entry was last updated.
» id string false none The unique identifier of the airport.
totalData number false none The total number of the data entries available in the response.
totalPages number false none The total number of pages available in the response.
page number false none The current page number of the response.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false

cabinclassResp

{
  "error": false,
  "cabinclasses": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "code": 3,
      "name": "First Class",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Properties

Name Type Required Restrictions Description
error boolean false none none
cabinclasses [object] false none List of the cabinclasses
» _id string false none The cabin class's distinctive identifier.
» code number false none The code of the cabin class.
» name number false none The name of the cabin class.
» isActiveStatus boolean false none The active status of the cabin class.
» _createdBy string false none The ID of the user, who created the cabin class entry.
» _updatedBy string false none The ID of the user, who last updated the cabin class entry.
» createdAt string false none The date and time, when the cabin class entry was created.
» updatedAt string false none The date and time, when the cabin class entry was last updated.
» id string false none The unique identifier of the cabin class.
totalData number false none The total number of the data entries available in the response.
totalPages number false none The total number of pages available in the response.
page number false none The current page number of the response.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false

posResp

{
  "error": false,
  "posses": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "posCode": 10,
      "code": "POS/10",
      "region": "Eastern",
      "countryCode": "IN",
      "countryName": "India",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Properties

Name Type Required Restrictions Description
error boolean false none none
posses [object] false none List of POS(s)
» _id string false none The unique identifier of the point of sale.
» posCode number false none The code representing the point of sale.
» code string false none A code for the point of sale.
» region string false none The region associated with the point of sale.
» countryCode string false none The code representing the country associated with the point of sale.
» countryName string false none The name of the country associated with the point of sale.
» isActiveStatus boolean false none The active status of the POS.
» _createdBy string false none The ID of the user who created the POS entry.
» _updatedBy string false none The ID of the user, who last updated the POS entry.
» createdAt string false none The date and time, when the POS entry was created.
» updatedAt string false none The date and time, when the POS entry was last updated.
» id string false none The unique identifier of the point of sale.
totalData number false none The total number of data entries available in the response.
totalPages number false none The total number of pages available in the response.
page number false none The current page number of the response.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false

currencyResp

{
  "error": false,
  "currencies": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "iso": "BOB",
      "symbol": "Bs",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Properties

Name Type Required Restrictions Description
error boolean false none none
currencies [object] false none List of currencies.
» _id string false none This is a unique identifier for the currency.
» iso string false none This field represents the ISO code of the currency.
» symbol string false none This field represents the symbol used to represent the currency.
» isActiveStatus boolean false none This field that indicates, whether the currency is currently active.
» _createdBy string false none This field contains the unique identifier of the user, who created the currency object.
» _updatedBy string false none This field contains the unique identifier of the user, who last updated the currency object.
» createdAt string false none This field contains the date and time, when the currency object was created.
» updatedAt string false none This field contains the date and time, when the currency object was last updated.
» id string false none The unique identifier of the currency.
totalData number false none The total number of data entries available in the response.
totalPages number false none The total number of pages available in the response.
page number false none The current page number to retrieve.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false

timezonesResp

{
  "error": false,
  "timezones": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "timezone": "Lands Between/Limgrave",
      "countryCode": "LMGV",
      "countryName": "Limgrave",
      "gmtOffSet": "99:98",
      "abbr": "LMGVST",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "63ff432ce2276fc08e64f794"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Properties

Name Type Required Restrictions Description
error boolean false none none
timezones [object] false none List of timezones
» _id string false none A unique identifier for the timezone.
» timezone string false none The name of the timezone.
» countryCode string false none The country code for the timezone.
» countryName string false none The country name for the timezone.
» gmtOffSet string false none The GMT offset for the timezone.
» abbr string false none The abbreviation for the timezone.
» isActiveStatus boolean false none The active status of the timezone.
» _createdBy string false none The user, who created the timezone.
» _updatedBy string false none The user, who last updated the timezone.
» createdAt string false none The date and time the timezone was created.
» updatedAt string false none The date and time the airline was last updated.
» id string false none A unique identifier for the timezone.
totalData number false none Total data of the timezones.
totalPages number false none The total number of pages available in the response.
page number false none The current page number to retrieve.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false

priceclassResp

{
  "error": false,
  "priceClasses": [
    {
      "_id": "63ff432ce2276fc08e64f794",
      "channel": "OTA",
      "source": "Expedia",
      "_airline": "61515cf678e57a702174290f",
      "priceClass": "Economy-Main Cabin",
      "sourceCode": 5,
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540Z",
      "id": "640aca5b56f99935b4c9deb2"
    }
  ],
  "totalData": 10282,
  "totalPages": 10282,
  "page": 1,
  "size": 1
}

Properties

Name Type Required Restrictions Description
error boolean false none none
priceClasses [object] false none List of price of classes
» _id string false none The priceclass's distinctive identifier.
» channel string false none The channel name of the priceclass.
» source string false none The source name of the priceclass.
» _airline number false none A unique identifier for the airline.
» priceClass number false none The name of the price class.
» sourceCode number false none Sourcecode of the priceclass.
» isActiveStatus boolean false none The active status of the priceclass.
» _createdBy string false none The user, who created the priceclass.
» _updatedBy string false none The user, who last updated the priceclass.
» createdAt string false none The date and time, when the priceclass was created.
» updatedAt string false none The date and time, when the priceclass was last updated.
» id string false none The unique identifier of the priceclass.
totalData number false none The total data of the priceclass.
totalPages number false none The total number of pages available in the response.
page number false none The current page number to retrieve.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false
channel OTA
channel Direct
channel Meta

entityReq

{
  "searchTerm": "Airline",
  "channel": "Direct"
}

Properties

Name Type Required Restrictions Description
searchTerm string true none Search entity information.
channel string false none Search by channel mode.

Enumerated Values

Property Value
channel OTA
channel Direct
channel Meta

entityResp

{
  "error": false,
  "searchTerm": "Airline",
  "channel": "Direct",
  "matchingSources": [
    {
      "_id": "61515e4fb77f75890e8acbaa",
      "source": "ASKY Airlines",
      "code": 4444,
      "channel": "Direct",
      "vertical": "flightrates",
      "isActiveStatus": true,
      "_createdBy": "63e5dc53e2a9529922d61349",
      "_updatedBy": "63e5dc53e2a9529922d61349",
      "createdAt": "2023-03-01T12:21:00.540Z",
      "updatedAt": "2023-03-01T12:21:00.540",
      "id": "640aca5b56f99935b4c9deb2"
    }
  ]
}

Properties

Name Type Required Restrictions Description
error boolean false none none
searchTerm string false none The Search type of airlines.
channel string false none channel type
matchingSources [object] false none Matching details of the searched term.
» _id string false none Unique identifier of matching source.
» source string false none Matching source.
» code string false none Matching code.
» channel string false none Matcing channel from input.
» vertical string false none It represents a specific vertical or category.
» isActiveStatus boolean false none The active status of the entity.
» _createdBy string false none The name of the person, who created the entity.
» _updatedBy string false none The date and time, when the entity was updated.
» createdAt string false none The date and time, when the entity was created.
» updatedAt string false none The date and time, when the entity was updated.
» id string false none The unique identifier of the entity.

Enumerated Values

Property Value
error false
channel OTA
channel Direct
channel Meta

flightratesResp

{
  "error": false,
  "flightrates": [
    {
      "travellers": {
        "adults": 1,
        "infants": 0,
        "children": 1
      },
      "_id": "63a59bf4533a40315c201e77",
      "outbound": {
        "price": 171,
        "baseFare": 0,
        "feesAndOthers": 0,
        "description": "",
        "numOfStops": 2,
        "metaProviderName": "",
        "layover": "13:58",
        "flightStatusCode": 22,
        "departureDate": "2022-08-17T00:00:00.000Z",
        "departureTime": "17:55",
        "arrivalDate": "2022-08-18T00:00:00.000Z",
        "arrivalTime": "14:36",
        "totalDuration": "19:41",
        "flightTime": "05:43",
        "actualPrice": 0,
        "actualBaseFare": 0,
        "actualFeeAndOthers": 0,
        "_priceClass": {
          "_id": "64379fbbe61b76b1a70c41c4",
          "channel": "OTA",
          "source": "Expedia",
          "id": "64379fbbe61b76b1a70c41c4"
        },
        "priceClassName": "Standard",
        "bookingClass": "Z",
        "legs": [
          {
            "_id": "64802d78164ff91223679439",
            "origin": "CUN",
            "destination": "MCO",
            "description": "",
            "distance": 0,
            "fbc": "",
            "seatCount": 1,
            "departureDate": "2022-08-17T00:00:00.000Z",
            "departureTime": "17:55",
            "arrivalDate": "2022-08-17T00:00:00.000Z",
            "arrivalTime": "21:02",
            "airlineShortCode": "NK",
            "flightNumber": "NK-544",
            "flightTime": "02:07",
            "waitTime": "10:53",
            "operatedBy": "",
            "_airline": {
              "_id": "601bb896f764ad17a4b71e66",
              "displayName": "Air Arabia",
              "id": "601bb896f764ad17a4b71e66"
            },
            "airlineName": "Air Arabia",
            "airlineCode": 1
          }
        ],
        "baggageDetails": "",
        "promoCode": "",
        "discounts": "",
        "taxStatus": 22,
        "_id": "64802d78164ff9122367943c",
        "allFlightNumbers": [
          "NK-544, NK-195,NK-145"
        ],
        "allStopOverAirports": [
          "CUN, FLL, SDQ, MCQ"
        ],
        "allAirlineCodes": [
          "1, 1, 1"
        ],
        "id": "64802d78164ff9122367943c"
      },
      "flyFrom": "CUN",
      "flyTo": "SDQ",
      "isRoundTrip": false,
      "departDate": "2022-08-17T00:00:00.000Z",
      "returnDate": "2022-08-18T00:00:00.000Z",
      "channelName": "Spirit",
      "channelType": "brand",
      "airlineCode": 35,
      "totalPrice": 244,
      "isRatePerPerson": false,
      "previousPrice": null,
      "isMultipleAirline": false,
      "collectedAt": "2022-07-16T18:52:57.214Z",
      "statusCode": 200,
      "batchInsertionId": "6448ce36bc44695e8914a8c2",
      "_user": {
        "name": {
          "first": "Rishi",
          "last": "Mishra",
          "full": "Rishi Mishra"
        },
        "_id": "643ce6fe6206ebd1cbf88fb8"
      },
      "userName": "admin@aggregateintelligence.com",
      "flightTripHash": "",
      "_flightShop": {
        "_id": "63fdd677a631b4a452c34b24",
        "shopName": "Achintya flightshop",
        "id": "63fdd677a631b4a452c34b24"
      },
      "flightShopName": "Test Jetblue_copaair",
      "_source": {
        "_id": "5f8999c220506157701f23aa",
        "source": "Biman Bangladesh Airlines",
        "channel": "OTA",
        "id": "5f8999c220506157701f23aa"
      },
      "sourceName": "Biman Bangladesh Airlines",
      "sourceId": 1,
      "_pos": {
        "_id": "62a2e3ca581567e3cd67cddc",
        "posCode": 175,
        "code": "POS/175",
        "id": "62a2e3ca581567e3cd67cddc"
      },
      "posName": "My Code",
      "_cabinClass": {
        "_id": "6013a6abf553c71d4dfbe92b",
        "name": "Economy",
        "id": "6013a6abf553c71d4dfbe92b"
      },
      "_currency": "5fa104806304832acf9c67e9",
      "currencyName": "AED",
      "updatedAt": "2022-12-28T05:48:30.669Z",
      "_flyFrom": {
        "_id": "5ec38d7afee3472b729b77a6",
        "airportName": "Campbell River Airport",
        "id": "5ec38d7afee3472b729b77a6"
      },
      "_flyTo": {
        "_id": "5ec38d7afee3472b729b778c",
        "airportName": "Nadzab Airport",
        "id": "5ec38d7afee3472b729b778c"
      },
      "rowHash": "YyX",
      "id": "63a59bf4533a40315c201e5f"
    }
  ],
  "totalData": 1,
  "totalPages": 1,
  "page": 1,
  "size": 10
}

Properties

Name Type Required Restrictions Description
error boolean false none none
flightrates [object] false none All informations of flightrates.
» travellers object false none This represents the number of adults and infants travelling.
»» adults number false none The number of adults.
»» infants number false none The number of infants.
»» children number false none The number of children.
» _id string false none The ID of the flight.
» outbound object false none It represents the outbound portion of the trip, including the price, fees, number of stops, departure and arrival times, duration, with airline details.
»» price number false none The price of the flight.
»» baseFare number false none The base fare of the flight.
»» feesAndOthers number false none Any other fees and other charges associated with the flight.
»» description string false none A description of the flight.
»» numOfStops number false none The number of stops of the flight, during the travel to the destination.
»» metaProviderName string false none The name of the provider of the flight metadata.
»» layover string false none The amount of time for a layover on the flight.
»» flightStatusCode number false none The status code of the flight.
»» departureDate string false none The departure date of the flight.
»» departureTime string false none The departure time of the flight.
»» arrivalDate string false none The arrival date of the flight.
»» arrivalTime string false none The arrival time of the flight.
»» totalDuration string false none The total duration of the flight.
»» flightTime string false none The time of the flight.
»» actualPrice number false none The actual base fare / price for travel in the flight.
»» actualBaseFare number false none The actual base fare of the flight.
»» actualFeeAndOthers number false none The actual fees and the other charges associated with the flight.
»» _priceClass object false none Information about the price class.
»»» _id string false none The unique identifier of the priceclass.
»»» channel string false none It represents the type of distribution channel used for booking accommodations.
»»» source string false none It represents the specific source through which the booking was made.
»»» id string false none The unique identifier of the priceclass.
»» priceClassName string false none The name of the price class.
»» bookingClass string false none The name of the booking class.
»» legs [object] false none All Informations for the legs of the flight.
»»» _id string false none The unique identifier of the legs.
»»» origin string false none It represents the origin of a journey or trip.
»»» destination string false none It represents the destination of a journey or trip.
»»» description string false none It represents additional details about the journey or trip.
»»» distance number false none It represents the distance between the origin and the destination of the journey or trip.
»»» fbc string false none The Fare Basis Code of the leg.
»»» seatCount string false none The number of seats on the leg.
»»» departureDate string false none The departure date of the leg.
»»» departureTime string false none The departure time of the leg.
»»» arrivalDate string false none The arrival date of the leg.
»»» arrivalTime string false none The arrival time of the leg.
»»» airlineShortCode string false none The airline short code of the leg.
»»» flightNumber string false none The flight number of the leg.
»»» flightTime string false none The time of the flight.
»»» waitTime string false none The wait time of the leg.
»»» operatedBy string false none The operator of the leg.
»»» _airline object false none Information about the airline of the leg.
»»»» _id string false none The unique identifier of the airline.
»»»» displayName string false none none
»»»» id string false none The unique identifier of the airline.
»»» airlineName string false none The name of the airline of the leg.
»»» airlineCode string false none The code of the airline of the leg.
»» baggageDetails string false none Details about the baggage on the flight.
»» promoCode string false none The promo code of the flight.
»» discounts string false none The discounts associated with the flight travel.
»» taxStatus number false none The tax status of the flight.
»» _id string false none none
»» allFlightNumbers [string] false none All the flight numbers for the whole trip.
»» allStopOverAirports [string] false none All the stopover airports for the whole trip.
»» allAirlineCodes [string] false none All the airline codes for the whole trip.
»» id string false none Id
» flyFrom string false none The airport code for the departure location.
» flyTo string false none The airport code for the arrival location.
» isRoundTrip boolean false none Whether the flight is a round trip or not.
» departDate string false none The departure date of the flight.
» returnDate string false none The return date of the flight.
» channelName string false none The name of the channel.
» channelType string false none The type of the channel.
» airlineCode number false none The Airline code.
» totalPrice number false none The total price of the flight.
» isRatePerPerson boolean false none Indicates whether the price given is per person or for the entire booking.
» previousPrice string false none Represents the previous price of the booking.
» isMultipleAirline boolean false none Indicates whether the booking involves multiple airlines.
» collectedAt string false none Time at which the data related to this booking was collected.
» statusCode number false none Status code
» batchInsertionId string false none Represents the unique identifier for the batch of bookings to which this booking belongs.
» _user object false none The User who made this booking.
»» name object false none The Name of the user.
»»» first string false none The first name of the user.
»»» last string false none The last name of the user.
»»» full string false none The full name of the user.
»» _id string false none The unique identifier for the user.
» userName string false none The username associated with the flight shop account.
» flightTripHash string false none The unique identifier for the flight trip.
» _flightShop object false none The details related to the flight shop.
»» _id string false none The unique identifier for the flight shop account.
»» shopName string false none The name of the flight shop.
»» id string false none The unique identifier for the flight booking.
» flightShopName string false none The name of the flight shop where this flight data is sourced from.
» _source object false none The source of the flight data and the channel it was sourced from.
»» _id string false none The unique identifier of the source.
»» source string false none Source name.
»» channel string false none Channel name.
»» id string false none The unique identifier of the source.
» sourceName string false none The name of the source from where the flight data was fetched.
» sourceId number false none The identifier for the source of the flight data.
» _pos object false none The point of sale information for the flight data.
»» _id string false none The unique identifier of the POS.
»» posCode number false none The POS code
»» code string false none The Code
»» id string false none The unique identifier of the POS.
» posName string false none It is a redundant field of _POS.
» _cabinClass object false none The cabin class information for the flight data.
»» _id string false none The unique identifier of the cabin class.
»» name string false none Name
»» id string false none The unique identifier of the cabin class.
» _currency string false none The identifier for the currency used for the flight data.
» currencyName string false none The name of the currency used for the flight data.
» updatedAt string false none The time when the flight data was last updated.
» _flyFrom object false none The departure airport information for the flight data.
»» _id string false none The unique identifier of the fly from.
»» airportName string false none The airport name
»» id string false none The unique identifier of the fly from.
» _flyTo object false none The arrival airport information for the flight data.
»» _id string false none The unique identifier of the fly to.
»» airportName string false none Airport Name
»» id string false none The unique identifier of the fly to.
» rowHash string false none A hash value is generated for the row of data to ensure the data integrity.
» id string false none Id
totalData number false none The total data of the flightrates.
totalPages number false none The total number of pages available in the response.
page number false none The current page number to retrieve.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false
channel OTA
channel Direct
channel Meta

hooksFindResp

{
  "error": false,
  "hooks": [
    {
      "_id": "63ff246fb2482db1c660e310",
      "_user": "63fda531bde67155fc46fb41",
      "userName": "rishi",
      "endPoint": "/api/v1/latest",
      "authType": "Personal",
      "userId": "RM123",
      "pwdTxt": "uuxx",
      "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
      "hookType": "dbs",
      "isActiveStatus": true,
      "_shop": "63fdc414cccc3592d31b3ac8",
      "vertical": "flightrates",
      "isCustomerCreated": true,
      "createdAt": "2023-03-01T10:09:51.960Z",
      "updatedAt": "2023-03-01T10:28:26.580",
      "id": "63ff246fb2482db1c660e310",
      "_createdBy": "63ff246fb2482db1c660e310",
      "_updatedBy": null
    }
  ],
  "totalData": 1,
  "totalPages": 1,
  "page": 1,
  "size": 1
}

Properties

Name Type Required Restrictions Description
error boolean false none none
hooks [object] false none none
» _id string false none The unique identifier of the hook.
» _user string false none The ID of the user associated with the hook.
» userName string false none The name of the user associated with the hook.
» endPoint string false none The endpoint URL for the hook.
» authType string false none The type of authentication used for the hook.
» userId string false none The ID of the user associated with the hook.
» pwdTxt string false none The password for the hook.
» token string false none The authentication token for the hook.
» hookType string false none The type of hook
» isActiveStatus boolean false none The status of the hook (active or inactive).
» _shop string false none The ID of the shop associated with the hook.
» vertical string false none The vertical associated with the hook.
» isCustomerCreated boolean false none Whether the hook was created by a customer (e.g. "true").
» createdAt string false none The date and time when the hook was created.
» updatedAt string false none The date and time when the hook was last updated.
» id string false none The ID of the hook.
» _createdBy string false none The id of the user.
» _updatedBy string false none The id of the user.
totalData number false none The total data
totalPages number false none The total number of pages available in the response.
page number false none The current page number to retrieve.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false

hooksGetResp

{
  "error": false,
  "hook": {
    "_id": "63ff246fb2482db1c660e310",
    "_user": "63fda531bde67155fc46fb41",
    "userName": "achintya",
    "endPoint": "/api/v1/my-hook",
    "authType": "jwt",
    "userId": "63fda531bde67155fc46fb4",
    "pwdTxt": "demo1",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
    "hookType": "dbs",
    "isActiveStatus": true,
    "_shop": "63fdc414cccc3592d31b3ac8",
    "vertical": "flightrates",
    "isCustomerCreated": true,
    "createdAt": "2023-03-01T10:09:51.960Z",
    "updatedAt": "2023-03-01T10:28:26.580",
    "id": "63ff246fb2482db1c660e310",
    "_createdBy": "63ff246fb2482db1c660e310",
    "_updatedBy": null
  }
}

The Details of the hooks.

Properties

Name Type Required Restrictions Description
error boolean false none none
hook object false none none
» _id string false none A unique identifier for the hook response.
» _user string false none The user who created the hook.
» userName string false none The username of the user who created the hook.
» endPoint string false none The API endpoint for the hook.
» authType string false none The type of authentication used for the hook.
» userId string false none The user ID associated with the hook.
» pwdTxt string false none The password text for the hook.
» token string false none The token generated for the hook.
» hookType string false none The type of hook.
» isActiveStatus boolean false none Indicates whether the hook is currently active or not.
» _shop string false none The ID of the shop associated with the hook.
» vertical string false none The vertical that the hook is associated with.
» isCustomerCreated boolean false none It Indicates whether the customer associated with the hook has been created or not.
» createdAt string false none The time for when the hook was created.
» updatedAt string false none The time for when the hook was last updated.
» id string false none The ID of the hook response.
» _createdBy string false none The id of the user.
» _updatedBy string false none The id of the user.

Enumerated Values

Property Value
error false

hooksPostReq

{
  "endPoint": "/api/v1/my-hook",
  "authType": "jwt",
  "userId": "63fda531bde67155fc46fb4",
  "pwdTxt": "uuxx",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
  "hookType": "dbs",
  "isActiveStatus": true,
  "_shop": "63fdc414cccc3592d31b3ac8"
}

Create hook

Properties

Name Type Required Restrictions Description
endPoint string true none The endpoint of the hook.
authType string false none The type of authentication used for the hook.
userId string false none The ID of the user associated with the hook.
pwdTxt string false none The password text associated with the hook.
token string false none The authentication token associated with the hook.
hookType string true none The type of hook.
isActiveStatus boolean true none Indicating whether the hook is active or not.
_shop string true none The ID of the shop associated with the hook.

hooksPostResp

{
  "error": false,
  "hook": {
    "_user": "63fda531bde67155fc46fb41",
    "userName": "achintya",
    "endPoint": "/api/v1/my-hook",
    "authType": "jwt",
    "userId": "63fda531bde67155fc46fb4",
    "pwdTxt": "demo1",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6I",
    "hookType": "dbs",
    "isActiveStatus": true,
    "_shop": "63fdc414cccc3592d31b3ac8",
    "vertical": "flightrates",
    "isCustomerCreated": true,
    "createdAt": "2023-03-01T10:09:51.960Z",
    "updatedAt": "2023-03-01T10:28:26.580",
    "id": "63ff246fb2482db1c660e310",
    "_createdBy": "63ff246fb2482db1c660e310",
    "_updatedBy": null
  }
}

Information of the hooks

Properties

Name Type Required Restrictions Description
error boolean false none none
hook object false none none
» _user string false none The id of the user, who created the hook.
» userName string false none The username of the user, who created the hook.
» endPoint string false none Representing the endpoint of the hook.
» authType string false none Represents the authentication type used for the hook.
» userId string false none ID associated with the hook.
» pwdTxt string false none The password used for authentication with the hook.
» token string false none The token used for the authentication with the hook.
» hookType string false none The type of hooks.
» isActiveStatus boolean false none The status of the hook.
» _shop string false none ID of the shop associated with the hook.
» vertical string false none The vertical for which the hook is created.
» isCustomerCreated boolean false none It Representins whether the customer has been created for the hook.
» createdAt string false none The date and time the hook was created.
» updatedAt string false none The date and time the hook was last updated.
» id string false none The id of the hook.
» _createdBy string false none The id of the user.
» _updatedBy string false none The id of the user.

Enumerated Values

Property Value
error false

schedulesFindResp

{
  "error": false,
  "schedules": [
    {
      "_id": "63ff1e0bb2482db1c660e306",
      "scheduleName": "Achintya flightrates",
      "_shop": "63fdd677a631b4a452c34b24",
      "_timezone": "63fdd677a631b4a452c34b22",
      "timezoneName": "asia/kol",
      "dayOfMonth": "*",
      "month": "*",
      "dayOfWeek": "*",
      "hour": "*",
      "minute": "*",
      "crontabExpression": "* * * * *",
      "crontabHuman": "Every minute, every hour, every day",
      "isActiveStatus": "true,",
      "startDate": "2022-10-24",
      "endDate": "2023-10-24",
      "_user": "63fda531bde67155fc46fb41",
      "userName": "achintya",
      "vertical": "flightrates",
      "isCustomerCreated": "true,",
      "createdAt": "2023-03-01T09:42:35.372Z",
      "updatedAt": "2023-03-03T06:22:55.108Z",
      "id": "63ff1e0bb2482db1c660e306",
      "_createdBy": "63ff246fb2482db1c660e310",
      "_updatedBy": null
    }
  ],
  "totalData": 1,
  "totalPages": 1,
  "page": 1,
  "size": 10
}

Properties

Name Type Required Restrictions Description
error boolean false none none
schedules [object] false none none
» _id string false none A unique identifier for the schedule.
» scheduleName string false none The name of the schedule.
» _shop string false none A reference to the shop that the schedule belongs to.
» _timezone string false none A reference to the timezone that the schedule uses.
» timezoneName string false none The name of the timezone.
» dayOfMonth string false none Specifies the day(s) of the month for the schedule.
» month string false none Specifies the month(s) for the schedule.
» dayOfWeek number false none Specifies the day(s) of the week for the schedule.
» hour string false none Specifies the hour(s) for the schedule.
» minute string false none Specifies the minute(s) for the schedule.
» crontabExpression string false none Cron tab expression for scheduling.
» crontabHuman string false none Readable description of the cron tab expression.
» isActiveStatus string false none Indicates whether the schedule is active or not.
» startDate string false none The start date of the schedule.
» endDate string false none The end date of the schedule.
» _user string false none A reference to the user, who created the schedule.
» userName string false none The name of the user, who created the schedule.
» vertical string false none The vertical to which the schedule belongs to.
» isCustomerCreated boolean false none Indicates whether the schedule was created by a customer or not.
» createdAt string false none The date and time, when the schedule was created.
» updatedAt string false none The date and time, when the schedule was last updated.
» id string false none A unique identifier for the schedule.
» _createdBy string false none The id of the user.
» _updatedBy string false none The id of the user.
totalData number false none The total data.
totalPages number false none The total number of pages available in the response.
page number false none The current page number to retrieve.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false

schedulesGetResp

{
  "error": false,
  "schedule": {
    "_id": "63ff1e0bb2482db1c660e306",
    "scheduleName": "Achintya flightrates",
    "_shop": "63fdd677a631b4a452c34b24",
    "_timezone": "63fdd677a631b4a452c34b22",
    "timezoneName": "asia/kol",
    "dayOfMonth": "*",
    "month": "*",
    "dayOfWeek": "*",
    "hour": "*",
    "minute": "*",
    "crontabExpression": "* * * * *",
    "crontabHuman": "Every minute, every hour, every day",
    "isActiveStatus": "true,",
    "startDate": "2022-10-24",
    "endDate": "2023-10-24",
    "_user": "63fda531bde67155fc46fb41",
    "userName": "achintya",
    "vertical": "flightrates",
    "isCustomerCreated": "true,",
    "createdAt": "2023-03-01T09:42:35.372Z",
    "updatedAt": "2023-03-03T06:22:55.108Z",
    "id": "63ff1e0bb2482db1c660e306",
    "_createdBy": "63ff246fb2482db1c660e310",
    "_updatedBy": null
  }
}

Properties

Name Type Required Restrictions Description
error boolean false none none
schedule object false none none
» _id string false none A unique identifier for the schedule.
» scheduleName string false none The name of the schedule.
» _shop string false none It represents the shop identifier to which this schedule belongs to.
» _timezone string false none It represents the timezone identifier for the schedule.
» timezoneName string false none It represents the timezone name for the schedule.
» dayOfMonth string false none Day of month expression.
» month string false none It represents the month for which the schedule is applicable.
» dayOfWeek number false none It represents the day of week for which the schedule is applicable.
» hour string false none It represents the hour for which the schedule is applicable.
» minute string false none It represents the minute for which the schedule is applicable.
» crontabExpression string false none Cron tab expression for scheduling.
» crontabHuman string false none Readable description of the cron tab expression.
» isActiveStatus string false none It represents the status of the schedule.
» startDate string false none It represents the start date of the schedule.
» endDate string false none It represents the end date of the schedule.
» _user string false none The user identifier, who created the schedule.
» userName string false none The user name, who created the schedule.
» vertical string false none It represents the vertical for which the schedule is applicable.
» isCustomerCreated boolean false none It represents whether the schedule was created by a customer.
» createdAt string false none The date and time when the schedule was created.
» updatedAt string false none The date and time when the schedule was last updated.
» id string false none A unique identifier for the schedule.
» _createdBy string false none The id of the user.
» _updatedBy string false none The id of the user.

Enumerated Values

Property Value
error false

schedulePostReq

{
  "scheduleName": "Achintya flightrates",
  "_shops": [
    "63fdd677a631b4a452c34b24"
  ],
  "_timezone": "63fdd677a631b4a452c34b22",
  "dayOfMonth": "*",
  "month": "*",
  "dayOfWeek": "*",
  "hour": "*",
  "minute": "*",
  "isActiveStatus": "true,",
  "startDate": "2022-10-24",
  "endDate": "2023-10-24"
}

The Informations regarding schedule creation.

Properties

Name Type Required Restrictions Description
scheduleName string true none A name given to the schedule resource.
_shops [string] true none A list of unique identifiers for the shops associated with the schedule.
_timezone string true none The unique identifier for the timezone associated with the schedule.
dayOfMonth string true none The day of month expression.
month string true none The month for which the schedule is applicable.
dayOfWeek string true none The day of the week for which the schedule is applicable.
hour string true none The hour of the day for which the schedule is applicable.
minute string true none The minute of the hour for which the schedule is applicable.
isActiveStatus string true none The status of the schedule, whether it is currently active or not.
startDate string true none The date on which the schedule becomes applicable.
endDate string true none The date on which the schedule expires.

schedulePostResp

{
  "error": false,
  "schedule": {
    "scheduleName": "Achintya flightrates",
    "_shop": "63fdd677a631b4a452c34b24",
    "_timezone": "63fdd677a631b4a452c34b22",
    "dayOfMonth": "*",
    "month": "*",
    "dayOfWeek": "*",
    "hour": "*",
    "minute": "*",
    "crontabExpression": "* * * * *",
    "crontabHuman": "Every minute, every hour, every day",
    "timezoneName": "Africa/Addis_Ababa",
    "isActiveStatus": "true,",
    "startDate": "2022-10-24",
    "endDate": "2023-10-24",
    "_user": "63fda531bde67155fc46fb41",
    "userName": "achintya",
    "vertical": "flightrates",
    "isCustomerCreated": "true,",
    "createdAt": "2023-03-01T09:42:35.372Z",
    "updatedAt": "2023-03-03T06:22:55.108Z",
    "id": "63ff1e0bb2482db1c660e306",
    "_createdBy": "63ff246fb2482db1c660e310",
    "_updatedBy": null
  }
}

Schedule information

Properties

Name Type Required Restrictions Description
error boolean false none none
schedule object false none none
» scheduleName string false none The name of the schedule to be created.
» _shop string false none The unique identifier of the shop that the schedule belongs to.
» _timezone string false none The unique identifier of the timezone that the schedule belongs to.
» dayOfMonth string false none The day of month expression.
» month string false none The month for which the schedule is applicable.
» dayOfWeek string false none The day of the week for which the schedule is applicable.
» hour string false none The hour of the day for which the schedule is applicable.
» minute string false none The minute of the hour for which the schedule is applicable.
» crontabExpression string false none Cron tab expression for scheduling.
» crontabHuman string false none Readable description of the cron tab expression.
» timezoneName string false none Timezone name redandant fields.
» isActiveStatus string false none It indicates whether the schedule is active or not.
» startDate string false none The start date of the schedule.
» endDate string false none The end date of the schedule.
» _user string false none The unique identifier of the user who created the schedule.
» userName string false none The name of the user who created the schedule.
» vertical string false none The vertical category of the schedule.
» isCustomerCreated boolean false none It indicates whether the schedule is created by a customer or not.
» createdAt string false none The creation date and time of the schedule.
» updatedAt string false none The last updated date and time of the schedule.
» id string false none The unique identifier of the schedule.
» _createdBy string false none The id of the user.
» _updatedBy string false none The id of the user.

Enumerated Values

Property Value
error false

shopsPostReq

{
  "_OD": [
    {
      "_flyFrom": "62b943e4dd59913b61a6b15b",
      "_flyTo": "62b943e4dd59913b61a6b15c"
    }
  ],
  "_sources": [
    "6239aec26c3c588d8f64ecfc"
  ],
  "_alternateSources": [
    "61515e50b77f75890e8acbaf"
  ],
  "_cabinClasses": [
    "6013a6abf553c71d4dfbe92d"
  ],
  "isRoundTrip": false,
  "los": 1,
  "horizons": [
    "2022-03-02"
  ],
  "pax": {
    "adults": 1,
    "infants": 0,
    "children": 0
  },
  "noOfStops": 1,
  "duration": {
    "hour": 40,
    "minute": 30
  },
  "fareType": "regular",
  "startDate": "2022-11-07",
  "_pos": "62a2e3ca581567e3cd67ce1a",
  "_currency": "5fa104806304832acf9c67f5",
  "shopName": "Rishi Mishra Shop",
  "deliveryMode": [
    "db"
  ],
  "isActiveStatus": true
}

Shops informations.

Properties

Name Type Required Restrictions Description
_OD [object] true none All Informations about the origin and destination of the whole trip.
» _flyFrom string true none The ID of the origin location of the trip.
» _flyTo string true none The ID of the destination location of the trip.
_sources [string] true none The IDs of the sources used for the search.
_alternateSources [string] true none The IDs of the alternate sources used for the search.
_cabinClasses [string] true none The IDs of the cabin classes used for the search.
isRoundTrip boolean true none The value indicating whether the trip is round-trip or not.
los number true none This represents the length of stay in the destination location.
horizons [string] true none This represents the dates of the search.
pax object true none Information about the passengers.
» adults number false none This represents the number of the adult passengers.
» infants number false none This represents the number of the infant passengers.
» children number false none This represents the number of child passengers.
noOfStops string true none This represents the number of stops in the trip.
duration object true none The duration of the trip.
» hour number false none The total duration in hours.
» minute number false none The duration in minute.
fareType string true none This represents the type of fare used for the search.
startDate string true none This represents the start date of the search.
_pos string true none The ID of the point of sale.
_currency string true none The ID of the currency used for the search.
shopName string true none The name of the shop.
deliveryMode [string] true none It represents the list of delivery mode(s) used for the search.
isActiveStatus boolean true none It indicates the search is active or not.

Enumerated Values

Property Value
fareType Regular
fareType Defence
fareType Doctors
fareType Senior Citizen
fareType Students

shopsPostResp

{
  "error": false,
  "shop": {
    "_OD": [
      {
        "_flyFrom": "62b943e4dd59913b61a6b15b",
        "_flyTo": "62b943e4dd59913b61a6b15c"
      }
    ],
    "_sources": [
      "6239aec26c3c588d8f64ecfc"
    ],
    "_alternateSources": [
      "61515e50b77f75890e8acbaf"
    ],
    "_cabinClasses": [
      "6013a6abf553c71d4dfbe92d"
    ],
    "isRoundTrip": true,
    "horizons": [
      2
    ],
    "pax": {
      "adults": 1,
      "children": 0,
      "infants": 0
    },
    "duration": {
      "hour": 30,
      "minute": 35
    },
    "fareType": "regular",
    "noOfStops": 1,
    "startDate": "2022-11-07",
    "_pos": "62a2e3ca581567e3cd67ce1a",
    "_currency": "5fa104806304832acf9c67f5",
    "shopName": "Rishi Mishra Shop",
    "OD": [
      "AABAAA"
    ],
    "_user": "6411b27b79d2c995fc689c4b",
    "userName": "Rishi",
    "vertical": "flightrates",
    "posName": "POS/123",
    "los": 1,
    "deliveryMode": [
      "db"
    ],
    "isActiveStatus": true,
    "_createdBy": "63fda531bde67155fc46fb41",
    "_updatedBy": "",
    "_id": "640ace815353bdb6454e191b",
    "isCustomerCreated": true,
    "createdAt": "2023-03-10T06:30:25.288Z",
    "updatedAt": "2023-03-10T06:30:25.288Z",
    "id": "640ace815353bdb6454e191b"
  }
}

Shop informations.

Properties

Name Type Required Restrictions Description
error boolean false none none
shop object false none none
» _OD [object] false none It represents the list of origin-destination pairs for the shop's flights.
»» _flyFrom string false none The departure airport.
»» _flyTo string false none Thr arrival airport.
» _sources [string] false none This represents the list of sources of the shop's flights.
» _alternateSources [string] false none This represents the list of alternate sources of the shop's flights.
» _cabinClasses [string] false none It represents the list of cabin classes of the shop's flights.
» isRoundTrip boolean false none This indicates whether the shop's flights are for a round-trip.
» horizons [string] false none It represents the horizons of the shop's flights.
» pax object false none The number of adults, children, and infants for the shop's flights.
»» adults number false none The informations of the adult passengers.
»» children number false none The information of the children passengers.
»» infants number false none The information of the Infant passengers.
» duration object false none The duration of the shop's flights in hours and minutes.
»» hour number false none Time in hours.
»» minute number false none Time in minutes.
» fareType string false none It represents the type of fare for the shop's flights.
» noOfStops string false none The number of stops for the shop's flights.
» startDate string false none The start date of the shop's flights.
» _pos string false none The point of sale of the shop.
» _currency string false none The currency of the shop.
» shopName string false none The name of the shop.
» OD [string] false none A list of Combination of flyfrom and flyto airport code.
» _user string false none The customer ID associated with the shop.
» userName string false none The username redunant fields
» vertical string false none The vertical type/category of product as mentioned
» posName string false none Pos name is point of sale code
» los number false none It represents the length of stay for the shop.
» deliveryMode [string] false none It represents the list of delivery mode for the shop.
» isActiveStatus boolean false none It represents the active status of the shop.
» _createdBy string false none The user id of the creator of the shop.
» _updatedBy string false none The user id of the last updater of the shop.
» _id string false none The id of the shop.
» isCustomerCreated boolean false none It indicates whether the shop was created by a customer.
» createdAt string false none The date and time of the shop's creation.
» updatedAt string false none The date and time of the shop's last update.
» id string false none The id of the shop.

Enumerated Values

Property Value
error false
fareType Regular
fareType Defence
fareType Doctors
fareType Senior Citizen
fareType Students

shopsFindResp

{
  "error": false,
  "shops": [
    {
      "_OD": [
        {
          "_flyFrom": "62b943e4dd59913b61a6b15b",
          "_flyTo": "62b943e4dd59913b61a6b15c"
        }
      ],
      "_sources": [
        "6239aec26c3c588d8f64ecfc"
      ],
      "_alternateSources": [
        "61515e50b77f75890e8acbaf"
      ],
      "_cabinClasses": [
        "6013a6abf553c71d4dfbe92d"
      ],
      "isRoundTrip": true,
      "horizons": [
        "1"
      ],
      "pax": {
        "adults": 1,
        "infants": 0,
        "children": 0
      },
      "noOfStops": 1,
      "los": 1,
      "duration": {
        "hour": 30,
        "minute": 33
      },
      "fareType": "regular",
      "startDate": "2022-11-07",
      "_pos": "62a2e3ca581567e3cd67ce1a",
      "_currency": "5fa104806304832acf9c67f5",
      "shopName": "Rishi Mishra Shop",
      "OD": [
        "AABAAA"
      ],
      "_user": "6411b27b79d2c995fc689c4b",
      "userName": "Rishi",
      "vertical": "flightrates",
      "posName": "POS/123",
      "isCustomerCreated": true,
      "deliveryMode": [
        "db"
      ],
      "isActiveStatus": true,
      "_createdBy": "63fda531bde67155fc46fb41",
      "_updatedBy": "",
      "_id": "640ace815353bdb6454references",
      "createdAt": "2023-03-10T06:30:25.288Z",
      "updatedAt": "2023-03-10T06:30:25.288Z",
      "id": "640ace815353bdb6454e191b"
    }
  ],
  "totalData": 3,
  "totalPages": 2,
  "page": 1,
  "size": 2
}

Information of hooks

Properties

Name Type Required Restrictions Description
error boolean false none none
shops [object] false none none
» _OD [object] false none A list of Informations about the origin and destination of a flight.
»» _flyFrom string false none Departure airport.
»» _flyTo string false none Arrival airport.
» _sources [string] false none It represents the list of sources of the flight information.
» _alternateSources [string] false none It represents the list of alternate sources of the flight information.
» _cabinClasses [string] false none It represents the list of cabin classes available for the flight.
» isRoundTrip boolean false none Whether the flight is a round-trip or not.
» horizons [string] false none It represents the list of horizons of the flight.
» pax object false none The number of adults, infants, and children travelling in the trip.
»» adults number false none The number of adults travelling.
»» infants number false none The number of infants travelling.
»» children number false none The number of children travelling.
» noOfStops string false none The number of stops for the flight.
» los number false none It represents the length of stay.
» duration object false none The duration of the flight.
»» hour number false none The duration in hours.
»» minute number false none The duration in minutes.
» fareType string false none The type of fare.
» startDate string false none The start date of the flight.
» _pos string false none The point of sale.
» _currency string false none The currency used for the transaction.
» shopName string false none The name of the shop.
» OD [string] false none A list of Combination of flyfrom and flyto airport code.
» _user string false none The customer Id.
» userName string false none Username redunant fields
» vertical string false none The vertical type/category of product as mentioned
» posName string false none Pos name is point of sale code
» isCustomerCreated boolean false none Customer created or not boolean value
» deliveryMode [string] false none It represents a list of the delivery mode.
» isActiveStatus boolean false none This indicates whether the status is active or not.
» _createdBy string false none It represents the user who created the entry.
» _updatedBy string false none It represents the user who last updated the entry.
» _id string false none The unique ID of the entry.
» createdAt string false none It represents the date and time the entry was created.
» updatedAt string false none It represents the date and time the entry was last updated.
» id string false none The ID of the entry.
totalData number false none The total data of shops.
totalPages number false none The total number of pages available in the response.
page number false none The current page number to retrieve.
size number false none The number of items to be displayed per page.

Enumerated Values

Property Value
error false
fareType Regular"
fareType Defence
fareType Doctors
fareType Senior Citizen
fareType Students

shopsGetResp

{
  "error": false,
  "shop": {
    "_OD": [
      {
        "_flyFrom": "62b943e4dd59913b61a6b15b",
        "_flyTo": "62b943e4dd59913b61a6b15c"
      }
    ],
    "_sources": [
      "6239aec26c3c588d8f64ecfc"
    ],
    "_alternateSources": [
      "61515e50b77f75890e8acbaf"
    ],
    "_cabinClasses": [
      "6013a6abf553c71d4dfbe92d"
    ],
    "isRoundTrip": true,
    "los": 1,
    "pax": {
      "adults": 1,
      "infants": 0,
      "children": 0
    },
    "duration": {
      "hour": 30,
      "minute": 20
    },
    "fareType": "regular",
    "startDate": "2022-11-07",
    "_pos": "62a2e3ca581567e3cd67ce1a",
    "_currency": "5fa104806304832acf9c67f5",
    "shopName": "Rishi Mishra Shop",
    "OD": [
      "AABAAA"
    ],
    "_user": "6411b27b79d2c995fc689c4b",
    "userName": "Rishi",
    "vertical": "flightrates",
    "posName": "POS/123",
    "deliveryMode": [
      "db"
    ],
    "isActiveStatus": true,
    "_createdBy": "63fda531bde67155fc46fb41",
    "_updatedBy": "",
    "_id": "640ace815353bdb6454e191b",
    "isCustomerCreated": true,
    "createdAt": "2023-03-10T06:30:25.288Z",
    "updatedAt": "2023-03-10T06:30:25.288Z",
    "id": "640ace815353bdb6454e191b"
  }
}

Shops informations.

Properties

Name Type Required Restrictions Description
error boolean false none none
shop object false none none
» _OD [object] false none It represents the list of origin and destination airports for the flight.
»» _flyFrom string false none It represents the origin airport code.
»» _flyTo string false none It represents the destination airport code.
» _sources [string] false none It represents a list of sources that are used to search for the flights.
» _alternateSources [string] false none It represents a list of alternate sources that are used to search for the flights.
» _cabinClasses [string] false none It represents a list of available cabin classes for the flight.
» isRoundTrip boolean false none It indicates whether the flight is round-trip or not.
» los number false none It represents the length of stay.
» pax object false none It represents the number of passengers for the flight.
»» adults number false none The number of adult passengers.
»» infants number false none The number of infant passengers.
»» children number false none The number of children passengers.
» duration object false none It represents the duration of the flight.
»» hour string false none The number of hours of the flight.
»» minute string false none The number of minutes of the flight.
» fareType string false none It represents the type of fare for the flight.
» startDate string false none The start date of the flight.
» _pos string false none The point of sale.
» _currency string false none The currency used for the flight travel.
» shopName string false none The name of the shop.
» OD [string] false none Combination of flyfrom and flyto airport code
» _user string false none The customer Id.
» userName string false none Username redunant fields
» vertical string false none Vertical type/Category of the product mentioned
» posName string false none Pos name is the point of sale code
» deliveryMode [string] false none A list of delivery mode for the shop.
» isActiveStatus boolean false none It indicates whether the shop is active or not.
» _createdBy string false none The ID of the user who created the shop.
» _updatedBy string false none The ID of the user who last updated the shop.
» _id string false none The ID of the shop.
» isCustomerCreated boolean false none It represents whether the shop was created by a customer or not.
» createdAt string false none The date and time the shop was created.
» updatedAt string false none The date and time the shop was last updated.
» id string false none The ID of the shop.

Enumerated Values

Property Value
error false
fareType Regular
fareType Defence
fareType Doctors
fareType Senior Citizen
fareType Students

shopPutReq

{
  "shopName": "Myshop Rishi",
  "isActiveStatus": true
}

Shops information

Properties

Name Type Required Restrictions Description
shopName string false none It represents the name of the shop being updated.
isActiveStatus boolean false none It indicates whether the shop is active or not.

shopPutResp

{
  "error": false,
  "shop": {
    "_OD": [
      {
        "_flyFrom": "62b943e4dd59913b61a6b15b",
        "_flyTo": "62b943e4dd59913b61a6b15c"
      }
    ],
    "_sources": [
      "6239aec26c3c588d8f64ecfc"
    ],
    "_alternateSources": [
      "61515e50b77f75890e8acbaf"
    ],
    "_cabinClasses": [
      "6013a6abf553c71d4dfbe92d"
    ],
    "isRoundTrip": true,
    "los": 1,
    "pax": {
      "adults": 1,
      "infants": 0,
      "children": 0
    },
    "duration": {
      "hour": 32,
      "minute": 40
    },
    "fareType": "regular",
    "startDate": "2022-11-07",
    "_pos": "62a2e3ca581567e3cd67ce1a",
    "_currency": "5fa104806304832acf9c67f5",
    "shopName": "Rishi Mishra Shop",
    "OD": [
      "AABAAA"
    ],
    "_user": "6411b27b79d2c995fc689c4b",
    "userName": "Rishi",
    "vertical": "flightrates",
    "posName": "POS/123",
    "deliveryMode": [
      "db"
    ],
    "isActiveStatus": true,
    "_createdBy": "63fda531bde67155fc46fb41",
    "_updatedBy": "",
    "_id": "640ace815353bdb6454e191b",
    "isCustomerCreated": true,
    "createdAt": "2023-03-10T06:30:25.288Z",
    "updatedAt": "2023-03-10T06:30:25.288Z",
    "id": "640ace815353bdb6454e191b"
  }
}

Shop informations.

Properties

Name Type Required Restrictions Description
error boolean false none none
shop object false none none
» _OD [object] false none It represents a list of the Origin-Destination pairs for the shop.
»» _flyFrom string false none Airport origin.
»» _flyTo string false none Airport destination.
» _sources [string] false none It represents a list of the sources for the shop.
» _alternateSources [string] false none It represents a list of the alternate sources for the shop.
» _cabinClasses [string] false none It represents a list of the cabin classes for the shop.
» isRoundTrip boolean false none It indicates whether the shop is for a round-trip or one-way flights.
» los number false none It represents the length of stay for the shop.
» pax object false none It represents the number of passengers for the shop.
»» adults number false none The Number of adults.
»» infants number false none The Number of infants.
»» children number false none The Number of children.
» duration object false none It represents the duration of the shop.
»» hour number false none The number of hours.
»» minute number false none The number of minutes.
» fareType string false none It represents the type of fare for the shop.
» startDate string false none It represents the start date for the shop.
» _pos string false none It represents the point of sale for the shop.
» _currency string false none It represents the currency for the shop.
» shopName string false none It represents the name of the shop being updated.
» OD [string] false none This lists a combination of flyfrom and flyto airport codes.
» _user string false none The customer Id.
» userName string false none Username redunant fields
» vertical string false none Vertical type / category of product mentioned
» posName string false none Pos name is point of sale code
» deliveryMode [string] false none It represents the list of delivery modes for the shop.
» isActiveStatus boolean false none It indicates whether the shop is active or not.
» _createdBy string false none The ID of the user who created the shop.
» _updatedBy string false none The ID of the user who last updated the shop.
» _id string false none The ID of the shop.
» isCustomerCreated boolean false none It represents whether the shop was created by a customer or not.
» createdAt string false none The date and time the shop was created.
» updatedAt string false none The date and time the shop was last updated.
» id string false none The ID of the shop.

Enumerated Values

Property Value
error false
fareType Regular
fareType Defence
fareType Doctors
fareType Senior Citizen
fareType Students