Introduction
API for ETS CRM System
This documentation aims to provide all the information you need to work with our API.
Base URL
https://stage-ng.etm-system.ru
Authenticating requests
This API is authenticated by sending
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking Generate API token.
AvailabilityController
Check the availability of the offer
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://stage-ng.etm-system.ru/api/air/offers/accusantium/availability',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request GET \
--get "https://stage-ng.etm-system.ru/api/air/offers/accusantium/availability" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://stage-ng.etm-system.ru/api/air/offers/accusantium/availability"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/air/offers/accusantium/availability'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200, Success):
code=200 {
"status": "ok",
"message": "No error",
"availability": true,
"check_in_details": {
"gds": "LowCosts",
"gds_id": 108,
"seat_selection_required": true,
"seat_selection_available": false,
"registration_type": {
"airport_check_in": {
"airport_check_in": {
"price_details": {},
"baggages": [
{
"extra_baggage_id": "67709907_AirportCheckIn_0",
"bags_number": 1,
"one_bag_weight": 1,
"total_weight": 1,
"price_details": {}
}
]
}
},
"online_check_in": {}
}
}
Received response:
Request failed with error:
B2C
Get an authorization key by application (site) ID
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://stage-ng.etm-system.ru/api/login/b2c/voluptates',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request GET \
--get "https://stage-ng.etm-system.ru/api/login/b2c/voluptates" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://stage-ng.etm-system.ru/api/login/b2c/voluptates"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/login/b2c/voluptates'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (200, Success):
{
Session
}
Example response (400, Invalid input):
{}
Example response (403, Forbidden):
{}
Received response:
Request failed with error:
CreateController
Create order and booking
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://stage-ng.etm-system.ru/api/air/orders',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
[
'request_id' => 230230,
'buy_id' => '62550475_62550476',
'without_contacts' => 1,
'phone' => [
'code' => 'RU',
'number' => '9112871278',
'extra' => '9113971209',
],
'emails' => [
'similique',
],
'address' => [
'zip' => '12345',
'country' => 'UZ',
'city' => 'Samarkand',
'additional' => 'Amira Timura',
],
'passengers' => [
[
'phone_code' => 'RU',
'phone_number' => '9112871278',
'email' => 'jazz@te.net.ua',
'type' => 'ADT',
'gender' => 'M',
'last_name' => 'IVANOV',
'first_name' => 'IVAN',
'middle_name' => 'ANTONOVICH',
'birth_date' => '1990-06-19',
'citizenship' => 'RU',
'document' => [
'type' => 'PSP',
'number' => '298173832',
'issue' => '2006-07-23',
'expire' => '2024-11-23',
],
'frequent_numbers' => [
[
'airline' => 'S7',
'number' => '9066602',
],
],
],
],
'seats' => [
[
'far_id' => 42150,
'seat' => '12C',
],
],
'bonus_card' => '33656367',
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request POST \
"https://stage-ng.etm-system.ru/api/air/orders" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "[
{
\"request_id\": 230230,
\"buy_id\": \"62550475_62550476\",
\"without_contacts\": 1,
\"phone\": {
\"code\": \"RU\",
\"number\": \"9112871278\",
\"extra\": \"9113971209\"
},
\"emails\": [
\"similique\"
],
\"address\": {
\"zip\": \"12345\",
\"country\": \"UZ\",
\"city\": \"Samarkand\",
\"additional\": \"Amira Timura\"
},
\"passengers\": [
{
\"phone_code\": \"RU\",
\"phone_number\": \"9112871278\",
\"email\": \"jazz@te.net.ua\",
\"type\": \"ADT\",
\"gender\": \"M\",
\"last_name\": \"IVANOV\",
\"first_name\": \"IVAN\",
\"middle_name\": \"ANTONOVICH\",
\"birth_date\": \"1990-06-19\",
\"citizenship\": \"RU\",
\"document\": {
\"type\": \"PSP\",
\"number\": \"298173832\",
\"issue\": \"2006-07-23\",
\"expire\": \"2024-11-23\"
},
\"frequent_numbers\": [
{
\"airline\": \"S7\",
\"number\": \"9066602\"
}
]
}
],
\"seats\": [
{
\"far_id\": 42150,
\"seat\": \"12C\"
}
],
\"bonus_card\": \"33656367\"
}
]"
const url = new URL(
"https://stage-ng.etm-system.ru/api/air/orders"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = [
{
"request_id": 230230,
"buy_id": "62550475_62550476",
"without_contacts": 1,
"phone": {
"code": "RU",
"number": "9112871278",
"extra": "9113971209"
},
"emails": [
"similique"
],
"address": {
"zip": "12345",
"country": "UZ",
"city": "Samarkand",
"additional": "Amira Timura"
},
"passengers": [
{
"phone_code": "RU",
"phone_number": "9112871278",
"email": "jazz@te.net.ua",
"type": "ADT",
"gender": "M",
"last_name": "IVANOV",
"first_name": "IVAN",
"middle_name": "ANTONOVICH",
"birth_date": "1990-06-19",
"citizenship": "RU",
"document": {
"type": "PSP",
"number": "298173832",
"issue": "2006-07-23",
"expire": "2024-11-23"
},
"frequent_numbers": [
{
"airline": "S7",
"number": "9066602"
}
]
}
],
"seats": [
{
"far_id": 42150,
"seat": "12C"
}
],
"bonus_card": "33656367"
}
];
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/air/orders'
payload = [
{
"request_id": 230230,
"buy_id": "62550475_62550476",
"without_contacts": 1,
"phone": {
"code": "RU",
"number": "9112871278",
"extra": "9113971209"
},
"emails": [
"similique"
],
"address": {
"zip": "12345",
"country": "UZ",
"city": "Samarkand",
"additional": "Amira Timura"
},
"passengers": [
{
"phone_code": "RU",
"phone_number": "9112871278",
"email": "jazz@te.net.ua",
"type": "ADT",
"gender": "M",
"last_name": "IVANOV",
"first_name": "IVAN",
"middle_name": "ANTONOVICH",
"birth_date": "1990-06-19",
"citizenship": "RU",
"document": {
"type": "PSP",
"number": "298173832",
"issue": "2006-07-23",
"expire": "2024-11-23"
},
"frequent_numbers": [
{
"airline": "S7",
"number": "9066602"
}
]
}
],
"seats": [
{
"far_id": 42150,
"seat": "12C"
}
],
"bonus_card": "33656367"
}
]
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200, Success):
{
"status": "ok",
"message": "No error",
"data": {
"order_id": 45009,
"book_id": 47009,
"status": "B",
"pnr_number": "WT654F",
"amount": "35780",
"currency": "RUB",
"buyer": {
"email": "buyer@etm-system.ru",
"phone": "(7) 563464634",
"country": {
"code": "RU",
"name": "Russia"
},
"city": "Königsberg",
"address": "Teatralnaya str",
"zip": "84000"
},
"stamp_create": "2018-04-16 11:44:14",
"stamp_ticket": "2018-04-16 12:53:14",
"time_till_ticket": {
"days": 1,
"hours": 7,
"minutes": 34
},
"directions": [
{
"id": 2345323,
"direction": 1,
"stops": 2,
"duration": "19:50:00",
"segments": [
{
"number": 1,
"departure": {
"country": {
"code": "RU",
"name": "Russia"
},
"city": {
"code": "KRR",
"name": "Krasnodar"
},
"airport": {
"code": "KRR",
"name": "Pashkovsky"
},
"terminal": "2B",
"date": "2018-06-07",
"time": "02:55:00",
"timezone": "+03:00"
},
"arrival": {
"country": {
"code": "RU",
"name": "Russia"
},
"city": {
"code": "MOW",
"name": "Moscow"
},
"airport": {
"code": "SVO",
"name": "Sheremetyevo International"
},
"terminal": "1C",
"date": "2018-06-07",
"time": "05:05:00",
"timezone": "+03:00"
},
"technical": {
"duration": "02:30:00",
"country": {
"code": "US",
"name": "USA"
},
"city": {
"code": "LAX",
"name": "Los Angeles"
},
"airport": {
"code": "LAX",
"name": "Los Angeles International"
}
},
"wait": "04:20:00",
"duration": "02:10:00",
"flight_number": "2902",
"booking_class": "R",
"service_class": {
"code": "B",
"name": "Business"
},
"validating_airline": {
"code": "LH",
"name": "Lufthansa"
},
"marketing_airline": {
"code": "KL",
"name": "KLM"
},
"operating_airline": {
"code": "SU",
"name": "Aeroflot"
},
"airplane": {
"code": "73H",
"name": "BOEING 737-800"
}
}
]
}
],
"passengers": [
{
"pax_id": 60606,
"info": {
"type": {
"code": "ADT",
"name": "Adult"
},
"title": "Mr",
"firstname": "SERGEY",
"lastname": "PETROV",
"birthdate": "1981-02-08"
},
"document": {
"citizenship": {
"code": "RU",
"name": "Russia"
},
"type": {
"code": "PSP",
"name": "Foreign passport"
},
"number": "123456789",
"expire": "2020-02-20",
"issue": "1920-02-20"
},
"arrival_info": {
"type": {
"code": "D",
"name": "Arrival country"
},
"country": {
"code": "DE",
"name": "Germany"
},
"city": "Magdeburg",
"address": "Evangelische Domgemeinde",
"zip": "12345"
},
"visa_info": {
"number": "987654321",
"birth_address": "Moscow",
"birth_country": {
"code": "RU",
"name": "Russia"
},
"travel_country": {
"code": "DE",
"name": "Germany"
},
"issue_date": "2017-01-01",
"issue_place": "Moscow",
"issue_country": {
"code": "RU",
"name": "Russia"
}
},
"fe_data": {
"type": "DIS",
"passport": "123456789",
"birth": "1982-05-24",
"liner_citizen": "RU",
"liner_issue": "2015-09-01",
"disability": "12345",
"permit": "HZ"
},
"ticket": {
"ticket_id": 19990,
"status": "TKTT",
"number": "262-2051011941",
"stamp": "2018-04-19 12:14:00",
"taxes": [
{
"type": "YR",
"amount": 21.08,
"currency": "EUR"
}
],
"refund_info": {
"fare_used": 13.61,
"penalty": 50,
"service": [
{
"usertype": "agent",
"items": [
{
"currency": "RUB",
"amount": 32.5
}
]
}
],
"fee_return": {
"provider": "N",
"agent": "Y",
"subagent": "N"
},
"involuntary": false
},
"actions": {
"void": true,
"refund": false,
"exchange": true,
"ticket": true,
"docs": true,
"frequent": true,
"service": true,
"osi": true,
"fe": true
}
},
"price": {
"fare": 2812,
"tax": 3500,
"fee": 120,
"hidden": 0,
"total": 6432
}
}
],
"fare_family": [
{
"routes": [
{
"departure": "DME",
"arrival": "TXL"
}
],
"name": "BUSINESS SAVER",
"class": "Business",
"services": [
{
"name": "2 CHECKED BAGS UP TO 32KG EACH",
"status": {
"code": "included",
"name": "Included"
}
}
]
}
],
"payment_methods": {
"types": {
"corporate": true,
"customer": true,
"deposit": true
},
"psp": [
{
"psp_id": 12,
"name": "AlfaBank",
"card": "N",
"fee": 120
}
]
},
"actions": {
"void_book": true,
"void_segment": false,
"split": true,
"refund": false,
"share": true,
"owner": true,
"ticket": true,
"cancel_bills": false,
"remarks": true,
"tourcode": true,
"timelimit": false,
"seats": true,
"service": true,
"osi": true,
"queue": true,
"rebook": true,
"recalc": true,
"book_osi": false,
"add_bill": false,
"checktrip": false,
"involuntary_refund": false,
"itinerary": false,
"eticket": false,
"exchange": true,
"all_refund": false,
"print": true,
"bonus": false,
"krs": true
}
}
}
Received response:
Request failed with error:
DestinationsController
Get cities
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://stage-ng.etm-system.ru/api/suggest/destinations',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'locale'=> 'EN',
'term'=> 'MOW',
],
'json' => [
'term' => 'p',
'locale' => 'd',
'locations_types' => 'qui',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request GET \
--get "https://stage-ng.etm-system.ru/api/suggest/destinations?locale=EN&term=MOW" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"term\": \"p\",
\"locale\": \"d\",
\"locations_types\": \"qui\"
}"
const url = new URL(
"https://stage-ng.etm-system.ru/api/suggest/destinations"
);
const params = {
"locale": "EN",
"term": "MOW",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"term": "p",
"locale": "d",
"locations_types": "qui"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/suggest/destinations'
payload = {
"term": "p",
"locale": "d",
"locations_types": "qui"
}
params = {
'locale': 'EN',
'term': 'MOW',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, json=payload, params=params)
response.json()Example response (200, Success):
[
{
"children": [
{
"name": "Domodedovo",
"code": "DME"
},
{
"name": "Sheremetyevo International",
"code": "SVO"
},
{
"name": "Vnukovo",
"code": "VKO"
},
{
"name": "Zhukovsky",
"code": "ZIA"
},
{
"name": "Ostafyevo",
"code": "OSF"
},
{
"name": "Chkalovsky",
"code": "CKL"
}
],
"type": "city",
"code": "MOW",
"name": "Moscow",
"secondName": "Russia"
}
]
Received response:
Request failed with error:
Endpoints
Get an authorization key by using BasicAuth flow (login/password)
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://stage-ng.etm-system.ru/api/login',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'login' => 'login123',
'password' => 'sd$23a5',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request POST \
"https://stage-ng.etm-system.ru/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"login\": \"login123\",
\"password\": \"sd$23a5\"
}"
const url = new URL(
"https://stage-ng.etm-system.ru/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"login": "login123",
"password": "sd$23a5"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/login'
payload = {
"login": "login123",
"password": "sd$23a5"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200):
{
'etm_auth_key' : 'etm_auth_key',
'locale' : 'EN',
'currency' : 'USD',
'max_expiry_time' : 1703550854,
'max_timeout' : 7200
}
Example response (400, Invalid input):
{
'error': 'Invalid input'
}
Example response (403, Forbidden):
{
'error': 'Invalid input'
}
Received response:
Request failed with error:
GET api/login/{app_id}
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://stage-ng.etm-system.ru/api/login/at',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request GET \
--get "https://stage-ng.etm-system.ru/api/login/at" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://stage-ng.etm-system.ru/api/login/at"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/login/at'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
access-control-allow-methods: GET, POST, PATCH, PUT, DELETE, OPTIONS
access-control-allow-headers: Content-Type, Accept, Authorization, X-Requested-With, Application, Origin, X-Csrftoken, etm-auth-key
{
"status": "error",
"message": "No query results for model [App\\Models\\Sites]."
}
Received response:
Request failed with error:
IndexController
Get search results
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://stage-ng.etm-system.ru/api/air/offers',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'request_id'=> '4b78410c-e58c-4889-9cba-1a5af44abc2a',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request GET \
--get "https://stage-ng.etm-system.ru/api/air/offers?request_id=4b78410c-e58c-4889-9cba-1a5af44abc2a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://stage-ng.etm-system.ru/api/air/offers"
);
const params = {
"request_id": "4b78410c-e58c-4889-9cba-1a5af44abc2a",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/air/offers'
params = {
'request_id': '4b78410c-e58c-4889-9cba-1a5af44abc2a',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()Example response (200, Offers):
{
"status": "Ready",
"next_token": "eyJpdiI6IjB3dFVVbS9GSjR3SlVzU2VTcSt1SFE9PSIsInZhbHVlIjoicTR3UGFzOHQzSVR2Y1JJY1JPQlltVXA0WU9ISFoxMzFiRDU2TVJ6MlNLUEoreUNUUkx0aWh2UnFaWE1jTmJFcW5CdzdxRjhORDVYcENPTlpVbWhqdkloUExyUUlHbzQrUGltbFlEbjVqcG5GTWFQT3dhcTJsR01NVlVVcDF3VEtPSTlKZVpkK2pDNnJ3K1YvaXpqV3hRPT0iLCJtYWMiOiJjZjdhYzE4OTJjMDA0N2VlODVjODgzZmMwODM4MGI2OTk1MjI0ZTFkYjRkOGIyNzQ1MjU2YjUyZGU0NWYwMjgwIiwidGFnIjoiIn0=",
"request_id": "4b78410c-e58c-4889-9cba-1a5af44abc2a",
"sort": "price",
"offers": [
{
"carrier_code": "A1",
"carrier_name": "Airline One",
"carrier_logo": "https://stage-ng.etm-system.ru/images/airline/A1.svg",
"min_price": 25.42,
"offers": [
{
"min_price": 25.42,
"segments": [
{
"segment_id": "request_4b78410c-e58c-4889-9cba-1a5af44abc2a_d3bea99f-3886-420a-be61-fce6697e94f2_0",
"buy_id": "request_4b78410c-e58c-4889-9cba-1a5af44abc2a_d3bea99f-3886-420a-be61-fce6697e94f2_0",
"with_rules": true,
"is_policy_fail": null,
"policy_fail_details": null,
"is_ow": null,
"dir_number": 1,
"flight_number": "79",
"departure_airport": "TAS",
"departure_airport_name": "Tashkent",
"departure_city_name": "Tashkent",
"departure_timestamp": 1703757600,
"departure_date": "2023-12-28",
"departure_time": "10:00:00",
"arrival_airport": "IST",
"arrival_airport_name": "Istanbul",
"arrival_city_name": "Istanbul",
"arrival_timestamp": 1703763000,
"arrival_date": "2023-12-28",
"arrival_time": "11:30:00",
"duration_formated": "1 h 30 min",
"duration_minutes": 90,
"stops": 0,
"flights_info": [
{
"operating_airline_code": "A1",
"operating_airline_name": "Airline One",
"operating_airline_logo": "https://stage-ng.etm-system.ru/images/airline/A1.svg",
"marketing_airline_code": "A1",
"marketing_airline_name": "Airline One",
"marketing_airline_logo": "https://stage-ng.etm-system.ru/images/airline/A1.svg",
"flight_number": "79",
"flight_number_print": "A1-79",
"airplane_code": "320",
"airplane_name": "A320",
"departure_country": "UZ",
"departure_city": "Tashkent",
"departure_city_code": null,
"route_locales": [],
"departure_airport": "Tashkent",
"departure_airport_name": "Tashkent",
"departure_terminal": "",
"departure_date": "2023-12-28",
"departure_local_time": "10:00",
"departure_timezone": "GMT+03:00",
"departure_local_timestamp": 1703754000,
"arrival_country": "TK",
"arrival_city": "Istanbul",
"arrival_city_code": null,
"arrival_airport": "IST",
"arrival_airport_name": "Istanbul",
"arrival_terminal": "1",
"arrival_date": "2023-12-28",
"arrival_local_time": "11:30",
"arrival_timezone": "GMT+05:00",
"arrival_local_timestamp": 1703759400,
"duration_formated": "1 h 30 min",
"duration_minutes": 90,
"stop_time": null,
"stop_time_minutes": null,
"techstop": null,
"ifs": {},
"delays": false,
"baggage": "0PC",
"service_class": "Economy",
"booking_class": "O",
"vehicle_type": "aircraft"
}
],
"services_available": false,
"other_price_available": false,
"seatmap_available": false,
"tariff": "OPROW",
"prov_fare_type": {
"label": "Mix",
"color": "bg-color-violet"
},
"class": "O",
"seats": 9,
"price": 25.42,
"price_details": [
{
"passenger_type": "adult",
"type": "Adult",
"qty": 1,
"base": "0,05 EUR",
"base_amount": 0.05,
"tax": "25,37 EUR",
"tax_amount": 25.37,
"tax_dtl": [
{
"code": "YQ",
"amount": 1565,
"currency": "EUR"
},
{
"code": "YR",
"amount": 400,
"currency": "EUR"
}
],
"fee": "0,00 EUR",
"fee_amount": 0,
"single": "25,42 EUR",
"single_amount": 25.42,
"total": "25,42 EUR",
"total_amount": 25.42,
"base_total": 0.05,
"fee_total": 0,
"tax_total": 25.37
}
],
"price_details_extra": [],
"pricelist": [],
"baggage": "0PC",
"price_fare_family": true,
"fare_type": "RP",
"fare_messages": null,
"fare_family": "PR",
"gds": "Mixvel",
"gds_type": "Mixvel",
"sita": false,
"sita_calculate": false,
"pcc_name": "Mixvel_test",
"pcc_office": "Mixvel",
"fee": 0,
"comm": 0,
"is_subsidy": false,
"subsidy_instruction": null,
"discount_attention": null,
"discount_message": null,
"seats_required": false,
"only_ndc_acc": false,
"hash": "0ef5663171ac98f2c8b1b5de3277a035",
"price_hash": "8536f79ce82849c5f93af222c5f14ce1",
"bundled_fares": null,
"buy_message": null,
"consolidator_marker": null,
"consolidator_marker_color": null
}
]
}
]
}
],
"ow_offers": [],
"travel_policy_id": "",
"is_schedule": false,
"currency": "EUR"
}
Received response:
Request failed with error:
Get search results
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://stage-ng.etm-system.ru/api/air/offers',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'request_id'=> '4b78410c-e58c-4889-9cba-1a5af44abc2a',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request POST \
"https://stage-ng.etm-system.ru/api/air/offers?request_id=4b78410c-e58c-4889-9cba-1a5af44abc2a" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://stage-ng.etm-system.ru/api/air/offers"
);
const params = {
"request_id": "4b78410c-e58c-4889-9cba-1a5af44abc2a",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/air/offers'
params = {
'request_id': '4b78410c-e58c-4889-9cba-1a5af44abc2a',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, params=params)
response.json()Example response (200, Offers):
{
"status": "Ready",
"next_token": "eyJpdiI6IjB3dFVVbS9GSjR3SlVzU2VTcSt1SFE9PSIsInZhbHVlIjoicTR3UGFzOHQzSVR2Y1JJY1JPQlltVXA0WU9ISFoxMzFiRDU2TVJ6MlNLUEoreUNUUkx0aWh2UnFaWE1jTmJFcW5CdzdxRjhORDVYcENPTlpVbWhqdkloUExyUUlHbzQrUGltbFlEbjVqcG5GTWFQT3dhcTJsR01NVlVVcDF3VEtPSTlKZVpkK2pDNnJ3K1YvaXpqV3hRPT0iLCJtYWMiOiJjZjdhYzE4OTJjMDA0N2VlODVjODgzZmMwODM4MGI2OTk1MjI0ZTFkYjRkOGIyNzQ1MjU2YjUyZGU0NWYwMjgwIiwidGFnIjoiIn0=",
"request_id": "4b78410c-e58c-4889-9cba-1a5af44abc2a",
"sort": "price",
"offers": [
{
"carrier_code": "A1",
"carrier_name": "Airline One",
"carrier_logo": "https://stage-ng.etm-system.ru/images/airline/A1.svg",
"min_price": 25.42,
"offers": [
{
"min_price": 25.42,
"segments": [
{
"segment_id": "request_4b78410c-e58c-4889-9cba-1a5af44abc2a_d3bea99f-3886-420a-be61-fce6697e94f2_0",
"buy_id": "request_4b78410c-e58c-4889-9cba-1a5af44abc2a_d3bea99f-3886-420a-be61-fce6697e94f2_0",
"with_rules": true,
"is_policy_fail": null,
"policy_fail_details": null,
"is_ow": null,
"dir_number": 1,
"flight_number": "79",
"departure_airport": "TAS",
"departure_airport_name": "Tashkent",
"departure_city_name": "Tashkent",
"departure_timestamp": 1703757600,
"departure_date": "2023-12-28",
"departure_time": "10:00:00",
"arrival_airport": "IST",
"arrival_airport_name": "Istanbul",
"arrival_city_name": "Istanbul",
"arrival_timestamp": 1703763000,
"arrival_date": "2023-12-28",
"arrival_time": "11:30:00",
"duration_formated": "1 h 30 min",
"duration_minutes": 90,
"stops": 0,
"flights_info": [
{
"operating_airline_code": "A1",
"operating_airline_name": "Airline One",
"operating_airline_logo": "https://stage-ng.etm-system.ru/images/airline/A1.svg",
"marketing_airline_code": "A1",
"marketing_airline_name": "Airline One",
"marketing_airline_logo": "https://stage-ng.etm-system.ru/images/airline/A1.svg",
"flight_number": "79",
"flight_number_print": "A1-79",
"airplane_code": "320",
"airplane_name": "A320",
"departure_country": "UZ",
"departure_city": "Tashkent",
"departure_city_code": null,
"route_locales": [],
"departure_airport": "Tashkent",
"departure_airport_name": "Tashkent",
"departure_terminal": "",
"departure_date": "2023-12-28",
"departure_local_time": "10:00",
"departure_timezone": "GMT+03:00",
"departure_local_timestamp": 1703754000,
"arrival_country": "TK",
"arrival_city": "Istanbul",
"arrival_city_code": null,
"arrival_airport": "IST",
"arrival_airport_name": "Istanbul",
"arrival_terminal": "1",
"arrival_date": "2023-12-28",
"arrival_local_time": "11:30",
"arrival_timezone": "GMT+05:00",
"arrival_local_timestamp": 1703759400,
"duration_formated": "1 h 30 min",
"duration_minutes": 90,
"stop_time": null,
"stop_time_minutes": null,
"techstop": null,
"ifs": {},
"delays": false,
"baggage": "0PC",
"service_class": "Economy",
"booking_class": "O",
"vehicle_type": "aircraft"
}
],
"services_available": false,
"other_price_available": false,
"seatmap_available": false,
"tariff": "OPROW",
"prov_fare_type": {
"label": "Mix",
"color": "bg-color-violet"
},
"class": "O",
"seats": 9,
"price": 25.42,
"price_details": [
{
"passenger_type": "adult",
"type": "Adult",
"qty": 1,
"base": "0,05 EUR",
"base_amount": 0.05,
"tax": "25,37 EUR",
"tax_amount": 25.37,
"tax_dtl": [
{
"code": "YQ",
"amount": 1565,
"currency": "EUR"
},
{
"code": "YR",
"amount": 400,
"currency": "EUR"
}
],
"fee": "0,00 EUR",
"fee_amount": 0,
"single": "25,42 EUR",
"single_amount": 25.42,
"total": "25,42 EUR",
"total_amount": 25.42,
"base_total": 0.05,
"fee_total": 0,
"tax_total": 25.37
}
],
"price_details_extra": [],
"pricelist": [],
"baggage": "0PC",
"price_fare_family": true,
"fare_type": "RP",
"fare_messages": null,
"fare_family": "PR",
"gds": "Mixvel",
"gds_type": "Mixvel",
"sita": false,
"sita_calculate": false,
"pcc_name": "Mixvel_test",
"pcc_office": "Mixvel",
"fee": 0,
"comm": 0,
"is_subsidy": false,
"subsidy_instruction": null,
"discount_attention": null,
"discount_message": null,
"seats_required": false,
"only_ndc_acc": false,
"hash": "0ef5663171ac98f2c8b1b5de3277a035",
"price_hash": "8536f79ce82849c5f93af222c5f14ce1",
"bundled_fares": null,
"buy_message": null,
"consolidator_marker": null,
"consolidator_marker_color": null
}
]
}
]
}
],
"ow_offers": [],
"travel_policy_id": "",
"is_schedule": false,
"currency": "EUR"
}
Received response:
Request failed with error:
PaymentController
Update ticketing status
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://stage-ng.etm-system.ru/api/air/orders/officiis/payment',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request GET \
--get "https://stage-ng.etm-system.ru/api/air/orders/officiis/payment" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://stage-ng.etm-system.ru/api/air/orders/officiis/payment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/air/orders/officiis/payment'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()Example response (403):
Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
access-control-allow-methods: GET, POST, PATCH, PUT, DELETE, OPTIONS
access-control-allow-headers: Content-Type, Accept, Authorization, X-Requested-With, Application, Origin, X-Csrftoken, etm-auth-key
{
"status": "error",
"message": "Session expired",
"code": 72
}
Received response:
Request failed with error:
Ticketing initiation
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://stage-ng.etm-system.ru/api/air/orders/accusamus/payment',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'dolore',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request POST \
"https://stage-ng.etm-system.ru/api/air/orders/accusamus/payment" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "[
\"dolore\"
]"
const url = new URL(
"https://stage-ng.etm-system.ru/api/air/orders/accusamus/payment"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = [
"dolore"
];
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/air/orders/accusamus/payment'
payload = [
"dolore"
]
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Received response:
Request failed with error:
SearchController
Search initiating and getting a request ID
Example request:
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://stage-ng.etm-system.ru/api/air/search',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
[
'directions' => [
[
'departure_code' => 'aliquid',
'arrival_code' => 'est',
'date' => 'cumque',
],
],
'adult_qnt' => 17,
'child_qnt' => 3,
'infant_qnt' => 20,
'class' => 'temporibus',
'airlines' => [
[],
],
'fare_types' => [
[],
],
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));curl --request POST \
"https://stage-ng.etm-system.ru/api/air/search" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "[
{
\"directions\": [
{
\"departure_code\": \"aliquid\",
\"arrival_code\": \"est\",
\"date\": \"cumque\"
}
],
\"adult_qnt\": 17,
\"child_qnt\": 3,
\"infant_qnt\": 20,
\"class\": \"temporibus\",
\"airlines\": [
[]
],
\"fare_types\": [
[]
]
}
]"
const url = new URL(
"https://stage-ng.etm-system.ru/api/air/search"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = [
{
"directions": [
{
"departure_code": "aliquid",
"arrival_code": "est",
"date": "cumque"
}
],
"adult_qnt": 17,
"child_qnt": 3,
"infant_qnt": 20,
"class": "temporibus",
"airlines": [
[]
],
"fare_types": [
[]
]
}
];
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());import requests
import json
url = 'https://stage-ng.etm-system.ru/api/air/search'
payload = [
{
"directions": [
{
"departure_code": "aliquid",
"arrival_code": "est",
"date": "cumque"
}
],
"adult_qnt": 17,
"child_qnt": 3,
"infant_qnt": 20,
"class": "temporibus",
"airlines": [
[]
],
"fare_types": [
[]
]
}
]
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()Example response (200, Success):
{
"status": "ok",
"message": "",
"request_id": "4b78410c-e58c-4889-9cba-1a5af44abc2a",
"old_request_id": null,
"travel_policy_id": null,
"one_order_id": 0,
"show_mode": "classic",
"currency": "EUR",
"available_currencies": [
"AMD",
"EUR",
"RUB"
],
"is_round": false,
"is_multy": false,
"group_avia_offers": false
}
Example response (403, Expired):
{
"status": "error",
"message": "Session expired",
"code": 72
}
Received response:
Request failed with error: