Introduction
The Farel API is organized around REST. Our API has predictable resource-oriented URLs and uses standard HTTP response codes and API key based authentication.
Authorization
Use API keys to authenticate API requests.
Farel authenticates your API requests using your account’s API key. Farel raises an invalid request error if you don’t include a key, and an authentication error if the key is incorrect or outdated.
You can generate the account’s API key in your agency web portal in Settings - API-key.
API-key must be passed in header named X-AGENCY-API-KEY
Resources
Search Flights
The API allows you to search for flights by specified dates and route directions.
POST /v1/agency-api/flights/search HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Content-Length: 409
{
"departure" : {
"code" : "ALA",
"type" : "CITY"
},
"arrival" : {
"code" : "GDN",
"type" : "AIRPORT"
},
"departureDate" : "2022-10-03",
"returnDate" : "2022-11-03",
"paxes" : [ {
"paxType" : "ADT",
"quantity" : 1
}, {
"paxType" : "CHD",
"quantity" : 1
}, {
"paxType" : "INF",
"quantity" : 1
} ],
"cabinClass" : "ECONOMY",
"fareFrameId" : null
}
Path | Type | Description |
---|---|---|
|
|
Departure point description |
|
|
IATA-code of airport/city of departure Must not be blank. Size must be between 3 and 3 inclusive |
|
|
Type of point: airport or city Must not be null |
|
|
Arrival point description |
|
|
IATA-code of airport/city of arrival Must not be blank. Size must be between 3 and 3 inclusive |
|
|
Type of point: airport or city Must not be null |
|
|
Departure date Must not be null |
|
|
Departure date of return flight |
|
|
Cabin class filter |
|
|
Set of passengers types with their quantities Must not be null. Size must be between 1 and 9 inclusive |
|
|
Passenger type: ADT, CHD, INF or etc. Must not be null |
|
|
Number of passengers of a given type Must be positive |
The response contains information on each available flight: detailed information about the flight, branded fares, additional services, and prices for each passenger.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2744
{
"trips" : [ {
"date" : [ 2022, 10, 3 ],
"routes" : [ {
"legs" : [ {
"flightId" : "7f3d4300-f0fa-43c7-842a-b33bb42d2230",
"flightType" : "SCHEDULED",
"flightNumber" : "OK-1234",
"originAirport" : {
"airportCode" : "ALA",
"airportName" : "Almaty International Airport",
"cityName" : "Almaty"
},
"destinationAirport" : {
"airportCode" : "GDN",
"airportName" : "Gdansk Lech Walesa Airport",
"cityName" : "Gdansk"
},
"aircraft" : "Millennium Falcon",
"flightDuration" : 10,
"departureDate" : [ 2022, 10, 3 ],
"arrivalDate" : [ 2022, 10, 3 ],
"departureTime" : "09:00",
"arrivalTime" : "16:00",
"flightOption" : {
"fareFrameId" : "1ece9012-3596-40d3-815d-0ac1fadb1ce9",
"cabinClass" : "ECONOMY",
"originalPrice" : 100,
"taxPrice" : 0,
"farePrice" : 100,
"price" : 100,
"originalCurrencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"taxCurrencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "USD",
"value" : 0
}
},
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"currencyFarePrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
}
},
"flightSaleStatus" : "OPEN",
"arriveDateOffset" : 0
} ],
"stops" : [ {
"airport" : {
"cityCode" : "TSE",
"cityName" : "Astana",
"airportCode" : "TSE",
"airportName" : "Astana International Airport"
},
"duration" : 2
} ],
"totalDuration" : 10,
"availableSeats" : 100,
"returnRoutes" : [ {
"flightIds" : [ "a1c509cc-5079-44a4-a02c-d57218274528" ]
} ],
"currencyTotalPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"totalPrice" : 100
} ]
} ]
}
Path | Type | Description |
---|---|---|
|
|
Array of route options |
|
|
Date of the trip |
|
|
Array of route options |
|
|
Array of flight legs |
|
|
Flight ID |
|
|
Type of flight |
|
|
Flight number |
|
|
Origin airport |
|
|
IATA-code of origin airport |
|
|
Name of origin airport |
|
|
Name of origin city |
|
|
Destination airport |
|
|
IATA-code of destination airport |
|
|
Name of destination airport |
|
|
Name of destination city |
|
|
Aircraft model |
|
|
Duration of the flight |
|
|
Departure date |
|
|
Arrival date |
|
|
Departure time |
|
|
Arrival time |
|
|
Flight option |
|
|
Fare frame ID |
|
|
Cabin class |
|
|
Original price |
|
|
Tax price |
|
|
Fare price |
|
|
Price |
|
|
Original currency price |
|
|
Original currency base price |
|
|
Original currency base price currency |
|
|
Original currency base price currency sum |
|
|
Original currency display price |
|
|
Original currency display price currency |
|
|
Original currency display price sum |
|
|
Tax currency price |
|
|
Tax currency base price |
|
|
Tax currency base price currency |
|
|
Tax currency base price sum |
|
|
Tax currency display price |
|
|
Tax currency display price currency |
|
|
Tax currency display price sum |
|
|
Currency price |
|
|
Currency base price |
|
|
Currency base price currency |
|
|
Currency base price sum |
|
|
Currency display price |
|
|
Currency display price currency |
|
|
Currency display price sum |
|
|
Currency fare price |
|
|
Currency fare base price |
|
|
Currency fare base price currency |
|
|
Currency fare base price sum |
|
|
Currency fare display price |
|
|
Currency fare display price currency |
|
|
Currency fare display price sum |
|
|
Day(s) between departure and arrival |
|
|
Public sale status |
|
|
Array of stops |
|
|
Stop airport |
|
|
IATA-code of stop city |
|
|
Name of stop city |
|
|
IATA-code of stop airport |
|
|
Name of stop airport |
|
|
Duration of the stop |
|
|
Total duration of the trip |
|
|
Number of available seats |
|
|
Set of return routes |
|
|
Return flight IDs |
|
|
Total price in currency |
|
|
Total price in currency base |
|
|
Total price in currency base currency |
|
|
Total price in currency base sum |
|
|
Total price in currency display |
|
|
Total price in currency display currency |
|
|
Total price in currency display sum |
|
|
Total price |
Search Returning Flights
The API allows you to search for returning flights by specified dates, route directions and fare frame ID.
POST /v1/agency-api/flights/returning HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Content-Length: 252
{
"departure" : {
"code" : "ALA",
"type" : "AIRPORT"
},
"arrival" : {
"code" : "GDN",
"type" : "AIRPORT"
},
"departureDate" : "2022-10-03",
"cabinClass" : "ECONOMY",
"fareFrameId" : "0b89716d-22b4-4948-b53b-00ddbaa49f74"
}
Path | Type | Description |
---|---|---|
|
|
Departure point description |
|
|
IATA-code of airport/city of departure Must not be blank. Size must be between 3 and 3 inclusive |
|
|
Type of point: airport or city Must not be null |
|
|
Arrival point description |
|
|
IATA-code of airport/city of arrival Must not be blank. Size must be between 3 and 3 inclusive |
|
|
Type of point: airport or city Must not be null |
|
|
Departure date Must not be null |
|
|
Cabin class filter |
|
|
ID of outbound flight fare frame |
The response contains information on each available returning flight: detailed information about the flight, branded fares, additional services, and prices for each passenger.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2744
{
"trips" : [ {
"date" : [ 2022, 10, 3 ],
"routes" : [ {
"legs" : [ {
"flightId" : "7f3d4300-f0fa-43c7-842a-b33bb42d2230",
"flightType" : "SCHEDULED",
"flightNumber" : "OK-1234",
"originAirport" : {
"airportCode" : "ALA",
"airportName" : "Almaty International Airport",
"cityName" : "Almaty"
},
"destinationAirport" : {
"airportCode" : "GDN",
"airportName" : "Gdansk Lech Walesa Airport",
"cityName" : "Gdansk"
},
"aircraft" : "Millennium Falcon",
"flightDuration" : 10,
"departureDate" : [ 2022, 10, 3 ],
"arrivalDate" : [ 2022, 10, 3 ],
"departureTime" : "09:00",
"arrivalTime" : "16:00",
"flightOption" : {
"fareFrameId" : "1ece9012-3596-40d3-815d-0ac1fadb1ce9",
"cabinClass" : "ECONOMY",
"originalPrice" : 100,
"taxPrice" : 0,
"farePrice" : 100,
"price" : 100,
"originalCurrencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"taxCurrencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "USD",
"value" : 0
}
},
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"currencyFarePrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
}
},
"flightSaleStatus" : "OPEN",
"arriveDateOffset" : 0
} ],
"stops" : [ {
"airport" : {
"cityCode" : "TSE",
"cityName" : "Astana",
"airportCode" : "TSE",
"airportName" : "Astana International Airport"
},
"duration" : 2
} ],
"totalDuration" : 10,
"availableSeats" : 100,
"returnRoutes" : [ {
"flightIds" : [ "a1c509cc-5079-44a4-a02c-d57218274528" ]
} ],
"currencyTotalPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"totalPrice" : 100
} ]
} ]
}
Path | Type | Description |
---|---|---|
|
|
Array of route options |
|
|
Date of the trip |
|
|
Array of route options |
|
|
Array of flight legs |
|
|
Flight ID |
|
|
Type of flight |
|
|
Flight number |
|
|
Origin airport |
|
|
IATA-code of origin airport |
|
|
Name of origin airport |
|
|
Name of origin city |
|
|
Destination airport |
|
|
IATA-code of destination airport |
|
|
Name of destination airport |
|
|
Name of destination city |
|
|
Aircraft model |
|
|
Duration of the flight |
|
|
Departure date |
|
|
Arrival date |
|
|
Departure time |
|
|
Arrival time |
|
|
Flight option |
|
|
Fare frame ID |
|
|
Cabin class |
|
|
Original price |
|
|
Tax price |
|
|
Fare price |
|
|
Price |
|
|
Original currency price |
|
|
Original currency base price |
|
|
Original currency base price currency |
|
|
Original currency base price currency sum |
|
|
Original currency display price |
|
|
Original currency display price currency |
|
|
Original currency display price sum |
|
|
Tax currency price |
|
|
Tax currency base price |
|
|
Tax currency base price currency |
|
|
Tax currency base price sum |
|
|
Tax currency display price |
|
|
Tax currency display price currency |
|
|
Tax currency display price sum |
|
|
Currency price |
|
|
Currency base price |
|
|
Currency base price currency |
|
|
Currency base price sum |
|
|
Currency display price |
|
|
Currency display price currency |
|
|
Currency display price sum |
|
|
Currency fare price |
|
|
Currency fare base price |
|
|
Currency fare base price currency |
|
|
Currency fare base price sum |
|
|
Currency fare display price |
|
|
Currency fare display price currency |
|
|
Currency fare display price sum |
|
|
Day(s) between departure and arrival |
|
|
Public sale status |
|
|
Array of stops |
|
|
Stop airport |
|
|
IATA-code of stop city |
|
|
Name of stop city |
|
|
IATA-code of stop airport |
|
|
Name of stop airport |
|
|
Duration of the stop |
|
|
Total duration of the trip |
|
|
Number of available seats |
|
|
Set of return routes |
|
|
Return flight IDs |
|
|
Total price in currency |
|
|
Total price in currency base |
|
|
Total price in currency base currency |
|
|
Total price in currency base sum |
|
|
Total price in currency display |
|
|
Total price in currency display currency |
|
|
Total price in currency display sum |
|
|
Total price |
Get Flights Calendar
The API allows you to get flight dates for specified dates and route directions.
GET /v1/agency-api/flights/calendar?origin=ALA&destination=TSE&outboundDateFrom=2025-06-05&outboundDateTo=2025-06-06 HTTP/1.1
Accept: application/json;charset=UTF-8
Unresolved directive in index.adoc - include::/home/gitlab-runner/builds/RRsrzGr7L/0/farel_repos/farel-os/farel-os-api/agency-api/target/generated-snippets/AgencyApiFlightSearchControllerTest/calendar/request-parameters.adoc[]
The response contains list of dates with available flights.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 46
{
"dates" : [ "2025-06-05", "2025-06-06" ]
}
Path | Type | Description |
---|---|---|
|
|
List of dates with available flights |
Get fare data
The API allows you to get fare data by specified route directions.
GET /v1/agency-api/select/f4fab554-ba14-4642-b071-cc00c02e6cc6?roundTrip=true HTTP/1.1
Content-Type: application/json;charset=UTF-8
X-Currency: KZT
Accept: application/json;charset=UTF-8
The response contains information about fares.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 3225
{
"legs" : [ {
"flightId" : "50e7ebcb-e486-4518-b2fa-364f4e63ade0",
"flightNumber" : "OK-1234",
"departureDate" : [ 2022, 10, 3 ],
"arrivalDate" : [ 2022, 10, 3 ],
"departureTime" : [ 9, 0 ],
"arrivalTime" : [ 16, 0 ],
"aircraftInfo" : {
"id" : "6f6c0c1b-fed9-4995-b69b-43c4b8a7e564",
"name" : "Millennium Falcon",
"regNumber" : "NCC-1701"
},
"originAirport" : {
"airportCode" : "ALA",
"airportName" : "Almaty International Airport",
"cityName" : "Almaty"
},
"destinationAirport" : {
"airportCode" : "GDN",
"airportName" : "Gdansk Lech Walesa Airport",
"cityName" : "Gdansk"
},
"flightDuration" : 10,
"flightFarePrices" : [ {
"fareFrameId" : "1ece9012-3596-40d3-815d-0ac1fadb1ce9",
"cabinClass" : "ECONOMY",
"bookingClassPrice" : 100,
"currencyBookingClassPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"farePrice" : 100,
"globalDiscount" : 0,
"globalDiscountCurrency" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "USD",
"value" : 0
}
},
"currencyFarePrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"taxPrice" : 0,
"currencyTaxPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "USD",
"value" : 0
}
},
"price" : 100,
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
},
"hasAgencies" : true,
"name" : "Economy",
"managingRules" : [ {
"ancillaryId" : "93dff29e-296c-4a7f-a1a2-bbbb3b1839f9",
"ancillaryFrameId" : "83ec8c81-c996-4e4f-b935-185e0fe2ae43",
"amount" : {
"value" : 100,
"type" : "FREE_VALUE"
},
"type" : "NO_SHOW_CHANGE",
"timeBeforeDeparture" : 1
} ],
"baggageRules" : [ {
"quantity" : 1,
"ancillaryId" : "fe47236f-7b2f-4f50-9d72-9e0d0d95fb13",
"ancillaryFrameId" : "85c1adb6-1e86-474a-9eab-b658d51d5ce4",
"type" : "CABIN_BAGGAGE",
"weight" : 10
} ]
} ],
"flightSaleStatus" : "OPEN"
} ],
"stops" : [ {
"airport" : {
"airportCode" : "TSE",
"airportName" : "Astana International Airport",
"cityName" : "Astana"
},
"duration" : 2
} ],
"totalDuration" : 10,
"fareTotalPriceMap" : {
"d4ffe81c-8fd5-49c9-b130-24483ffc93f2" : {
"price" : 100,
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
}
}
},
"availableSeats" : 100
}
Path | Type | Description |
---|---|---|
|
|
Array of flights |
|
|
ID of the flight |
|
|
Number of the flight |
|
|
Departure date of the flight |
|
|
Arrival date of the flight |
|
|
Departure time of the flight |
|
|
Arrival time of the flight |
|
|
Aircraft information |
|
|
Aircraft ID |
|
|
Aircraft name |
|
|
Aircraft registration number |
|
|
Origin airport |
|
|
IATA-code of origin airport |
|
|
Name of origin airport |
|
|
Name of origin city |
|
|
Destination airport |
|
|
IATA-code of destination airport |
|
|
Name of destination airport |
|
|
Name of destination city |
|
|
Duration of the flight |
|
|
Array of fare prices |
|
|
Public sale status |
|
|
ID of the fare frame |
|
|
Cabin class |
|
|
Booking class price |
|
|
Currency booking class price |
|
|
Currency booking class price base currency |
|
|
Currency booking class price base sum |
|
|
Currency booking class price display currency |
|
|
Currency booking class price display sum |
|
|
Fare price |
|
|
Currency fare price |
|
|
Currency fare price base currency |
|
|
Currency fare price base sum |
|
|
Currency fare price display currency |
|
|
Currency fare price display sum |
|
|
Tax price |
|
|
Currency tax price |
|
|
Currency tax price base currency |
|
|
Currency tax price base sum |
|
|
Currency tax price display currency |
|
|
Currency tax price display sum |
|
|
Price |
|
|
Price in currency |
|
|
Price in currency base currency |
|
|
Price in currency base sum |
|
|
Price in currency display currency |
|
|
Price in currency display sum |
|
|
Global discount |
|
|
Global discount in currency |
|
|
Global discount in currency base currency |
|
|
Global discount in currency base sum |
|
|
Global discount in currency display currency |
|
|
Global discount in currency display sum |
|
|
If has agencies |
|
|
Fare name |
|
|
Managing rules |
|
|
Ancillary ID |
|
|
Ancillary frame ID |
|
|
Amount |
|
|
Amount value |
|
|
Amount type |
|
|
Type |
|
|
Hours before departure where rule is applied |
|
|
Baggage rules |
|
|
Quantity |
|
|
weight |
|
|
Type |
|
|
Ancillary ID |
|
|
Ancillary frame ID |
|
|
Array of stops |
|
|
Stop airport |
|
|
Name of stop city |
|
|
IATA-code of stop airport |
|
|
Name of stop airport |
|
|
Duration of the stop |
|
|
Total duration of the trip |
|
|
Map of fare to total price |
|
|
The total price for the fare |
|
|
Details of the currency for the fare price |
|
|
Base price information in a specific currency |
|
|
Currency code for the base price (e.g., USD) |
|
|
Value of the base price |
|
|
Display price information in a specific currency |
|
|
Currency code for the display price (e.g., USD) |
|
|
Value of the display price |
|
|
Number of seats available |
Get flight fare prices
The API allows you to get fare prices by specified flights.
GET /v1/agency-api/flights/fares/prices?paxTypes=ADT&fareFrameId=d596a83d-2560-48f6-9c64-92c5e741ba01&outboundFlightIds=e04af6b8-29ec-4933-b8ff-72c66e207cd8&returnFlightIds=aaaabbbb-cccc-4933-b8ff-72c66e207cd8 HTTP/1.1
X-Currency: USD
Accept: application/json
The response contains information about fare prices.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 709
{
"prices" : [ {
"paxType" : "ADT",
"taxPrice" : 10,
"originalPrice" : 100,
"originalCurrencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "USD",
"value" : 10
}
},
"taxCurrencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "USD",
"value" : 10
}
},
"price" : 90.0,
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "USD",
"value" : 10
}
}
} ],
"unavailabilityReason" : null
}
Path | Type | Description |
---|---|---|
|
|
The type of passenger |
|
|
The tax price for the fare |
|
|
The original price of the fare |
|
|
The final price after discounts |
|
|
Currency price |
|
|
Currency base price |
|
|
Currency base price currency |
|
|
Currency base price currency value |
|
|
Currency display price |
|
|
Currency display price currency |
|
|
Currency display price value |
|
|
Original currency price |
|
|
Original currency base price |
|
|
Original base currency code |
|
|
Original base currency value |
|
|
Original display currency price |
|
|
Display currency code |
|
|
Display currency value |
|
|
Tax currency price |
|
|
Tax currency base price |
|
|
Tax currency base price currency |
|
|
Tax currency base price currency value |
|
|
Tax currency display price |
|
|
Tax currency display price currency |
|
|
Tax currency display price value |
|
|
Reason of unavailability |
Get flight fare prices with rules
The API allows you to get fare prices by specified flights.
GET /v1/agency-api/flights/fares/prices-with-rules?paxTypes=ADT&fareFrameId=d596a83d-2560-48f6-9c64-92c5e741ba01&outboundFlightIds=e04af6b8-29ec-4933-b8ff-72c66e207cd8&returnFlightIds=aaaabbbb-cccc-4933-b8ff-72c66e207cd8 HTTP/1.1
X-Currency: USD
Accept: application/json
The response contains information about fare prices with riles.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 890
{
"prices" : [ {
"paxType" : "ADT",
"price" : 90.0,
"originalPrice" : 90.0,
"taxPrice" : 0,
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "USD",
"value" : 10
}
},
"currencyTaxPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "USD",
"value" : 0
}
},
"currencyOriginalPrice" : {
"base" : {
"currency" : "USD",
"value" : 90.0
},
"display" : {
"currency" : "USD",
"value" : 90.0
}
},
"managingRules" : [ {
"rule" : "CHANGE_BEFORE_DEPARTURE",
"penalty" : 10,
"timeBeforeDeparture" : 10,
"amount" : {
"type" : "FREE_VALUE",
"value" : 10
}
} ]
} ]
}
Path | Type | Description |
---|---|---|
|
|
The type of passenger |
|
|
The final price after discounts |
|
|
The final fare price after discounts |
|
|
The full tax price without discounts |
|
|
Currency code |
|
|
Currency value |
|
|
Currency code |
|
|
Currency value |
|
|
The rule type for changes or refunds |
|
|
The penalty amount for breaking the rule |
|
|
Tax currency price |
|
|
Tax currency base price |
|
|
Tax currency base price currency |
|
|
Tax currency base price currency value |
|
|
Tax currency display price |
|
|
Tax currency display price currency |
|
|
Tax currency display price value |
|
|
Original currency price |
|
|
Original currency base price |
|
|
Original base currency code |
|
|
Original base currency value |
|
|
Original display currency price |
|
|
Display currency code |
|
|
Display currency value |
|
|
Hours before departure when the rule applies |
|
|
Type of penalty amount |
|
|
Value of the penalty amount |
Get route details
The API allows you to get route ID by flight IDs.
GET /v1/agency-api/routes?flightIds=d596a83d-2560-48f6-9c64-92c5e741ba01%2Ce04af6b8-29ec-4933-b8ff-72c66e207cd8 HTTP/1.1
Accept: application/json
The response contains information about route with legs.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 244
{
"routeId" : "fbe12a3d-7771-4fcc-96dc-948ff1f6c5de",
"routeLegs" : [ {
"legNumber" : 0,
"flightId" : "d596a83d-2560-48f6-9c64-92c5e741ba01"
}, {
"legNumber" : 1,
"flightId" : "e04af6b8-29ec-4933-b8ff-72c66e207cd8"
} ]
}
Path | Type | Description |
---|---|---|
|
|
Route ID |
|
|
Leg (flight) number |
|
|
Flight ID |
Branded Fare Details
Branded fares consist of services such as baggage allowance, meals on board, seat selection, and exchange and refund conditions.
The request must include all of the following parameters to get information about the branded fares. Fare(Brand) frame id is a parameter in order to get actual fare.
POST /v1/agency-api/branded-fares HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Content-Length: 284
{
"flightIds" : [ "7f3d4300-f0fa-43c7-842a-b33bb42d2230" ],
"brandFrameId" : "a0ebd77c-e2ef-475f-87a7-a373de87318f",
"paxes" : [ {
"paxType" : "ADT",
"quantity" : 1
}, {
"paxType" : "CHD",
"quantity" : 1
}, {
"paxType" : "INF",
"quantity" : 1
} ]
}
Path | Type | Description |
---|---|---|
|
|
List of flight id (UUID) on the route Must not be empty |
|
|
Brand frame id (UUID) |
|
|
Set of passengers types with their quantities Must not be empty. Size must be between 1 and 9 inclusive |
|
|
Passenger type: ADT, CHD, INF or etc. Must not be null |
|
|
Number of passengers of a given type Must be positive |
The response contains information about each branded fare on the flight, indicating the scope of services, conditions, and prices for each passenger.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2089
{
"flightBrands" : [ {
"flightId" : "7f3d4300-f0fa-43c7-842a-b33bb42d2230",
"currency" : "USD",
"brandPrices" : {
"brandFrameId" : "a0ebd77c-e2ef-475f-87a7-a373de87318f",
"brandId" : "1ece9012-3596-40d3-815d-0ac1fadb1ce9",
"brandName" : "Light Saber",
"paxPrices" : [ {
"paxType" : "ADT",
"paxPrice" : 100,
"feeRules" : [ {
"timeLimit" : 15,
"allowance" : true,
"type" : "REFUND_BEFORE_DEPARTURE",
"penaltyAmount" : 0
}, {
"timeLimit" : null,
"allowance" : true,
"type" : "CHANGE_BEFORE_DEPARTURE",
"penaltyAmount" : 10
} ]
}, {
"paxType" : "CHD",
"paxPrice" : 50,
"feeRules" : [ {
"timeLimit" : null,
"allowance" : true,
"type" : "CHANGE_BEFORE_DEPARTURE",
"penaltyAmount" : 0
}, {
"timeLimit" : null,
"allowance" : true,
"type" : "REFUND_BEFORE_DEPARTURE",
"penaltyAmount" : 10
} ]
}, {
"paxType" : "INF",
"paxPrice" : 10,
"feeRules" : [ {
"timeLimit" : null,
"allowance" : true,
"type" : "REFUND_BEFORE_DEPARTURE",
"penaltyAmount" : 0
}, {
"timeLimit" : null,
"allowance" : true,
"type" : "CHANGE_BEFORE_DEPARTURE",
"penaltyAmount" : 10
} ]
} ],
"includedServices" : [ {
"service" : {
"payload" : {
"type" : "CABIN_BAGGAGE",
"weight" : 5,
"imageUrl" : null,
"description" : "CABIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
},
"quantity" : 2
}, {
"service" : {
"payload" : {
"type" : "CHECKIN_BAGGAGE",
"weight" : 23,
"imageUrl" : null,
"description" : "CHECKIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
},
"quantity" : 1
} ]
}
} ]
}
Path | Type | Description |
---|---|---|
|
|
Flight’s brand description |
|
|
Flight id (UUID) |
|
|
Currency |
|
|
Brand description |
|
|
Brand frame id (UUID) |
|
|
Brand id (UUID) |
|
|
Brand name |
|
|
List of passenger prices |
|
|
Passenger type |
|
|
Price |
|
|
Description of fee rules |
|
|
Type of fee rules (exm. before departure) |
|
|
Rule allowance |
|
|
Rule time limit |
|
|
Penalty value |
|
|
Included services in brand per passenger |
|
|
Service description |
|
|
Service category type |
|
|
Service payload |
|
|
Quantity of service |
Flight Offer
The airline may sell additional services on the flight, such as extra baggage, pre-paid meals onboard, seat selection, etc.
You need to submit a request to receive a list of additional services of the airline available for purchase.
GET /v1/agency-api/flight-offers?flightIds=7f3d4300-f0fa-43c7-842a-b33bb42d2230&brandFrameId=1ece9012-3596-40d3-815d-0ac1fadb1ce9 HTTP/1.1
Accept: application/json;charset=UTF-8
Unresolved directive in index.adoc - include::/home/gitlab-runner/builds/RRsrzGr7L/0/farel_repos/farel-os/farel-os-api/agency-api/target/generated-snippets/AgencyApiFlightOfferControllerTest/flightOffers/request-parameters.adoc[]
The response contains information about each branded fare on the flight, indicating the scope of services, conditions, and prices for each passenger.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1512
{
"flightOffers" : [ {
"flightId" : "7f3d4300-f0fa-43c7-842a-b33bb42d2230",
"brandName" : "Light Saber",
"currency" : "KZT",
"includedServices" : [ {
"service" : {
"payload" : {
"type" : "CABIN_BAGGAGE",
"weight" : 5,
"imageUrl" : null,
"description" : "CHECKIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
},
"quantity" : 2
}, {
"service" : {
"payload" : {
"type" : "CHECKIN_BAGGAGE",
"weight" : 23,
"imageUrl" : null,
"description" : "CHECKIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
},
"quantity" : 1
} ],
"offers" : [ {
"offerId" : "05dd8bf6-97b1-46a7-a613-36c534ec0201",
"services" : [ {
"payload" : {
"type" : "CHECKIN_BAGGAGE",
"weight" : 32,
"imageUrl" : null,
"description" : "CHECKIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
}, {
"payload" : {
"type" : "CABIN_BAGGAGE",
"weight" : 10,
"imageUrl" : null,
"description" : "CABIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
} ],
"maxPerPax" : 2,
"price" : 100,
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 100
},
"display" : {
"currency" : "USD",
"value" : 100
}
}
} ]
} ]
}
Path | Type | Description |
---|---|---|
|
|
Flight id (UUID) |
|
|
The name of the requested brand |
|
|
Currency |
|
|
List of services in the brand |
|
|
Service description |
|
|
Quantity of service |
|
|
Available offers for sale |
|
|
Offer id (UUID) |
|
|
Set of offer’s services |
|
|
Service category type |
|
|
Service payload |
|
|
Max quantity per passenger |
|
|
Offer price |
|
|
Offer currency price |
|
|
Offer currency price base currency |
|
|
Offer currency price base value |
|
|
Offer currency price display currency |
|
|
Offer currency price display value |
Flight Assistances
This request is for a list of available passenger assistance services.
GET /v1/agency-api/assistances?flightIds=64b03ce6-03a3-465c-9e16-48045b9840e6&flightIds=4166785e-6590-42cf-9dd6-256ddeb62d20 HTTP/1.1
Accept: application/json
Unresolved directive in index.adoc - include::/home/gitlab-runner/builds/RRsrzGr7L/0/farel_repos/farel-os/farel-os-api/agency-api/target/generated-snippets/AgencyApiAssistanceControllerTest/assistances/request-parameters.adoc[]
The response for each service additionally indicates the type of passenger for which assistance can be selected.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 719
{
"flightAssistances" : [ {
"flightId" : "64b03ce6-03a3-465c-9e16-48045b9840e6",
"assistances" : [ {
"assistanceId" : "a8012180-f384-4aef-bf6c-2bba128d7916",
"name" : "Deaf",
"category" : "DEAF",
"availability" : [ "ADT", "CHD" ]
}, {
"assistanceId" : "242ccb5d-46af-4042-8949-8e954ed2f440",
"name" : "Bassi.NET",
"category" : "BASSINET",
"availability" : [ "INF" ]
} ]
}, {
"flightId" : "4166785e-6590-42cf-9dd6-256ddeb62d20",
"assistances" : [ {
"assistanceId" : "58230fbc-bec8-4f31-9549-853bf5eeefc2",
"name" : "Nice wheels, bro.",
"category" : "WHEELCHAIR_SERVICE",
"availability" : [ "ADT", "CHD" ]
} ]
} ]
}
Path | Type | Description |
---|---|---|
|
|
Available assistances on flight |
|
|
Flight id (UUID) |
|
|
Assistance description |
|
|
Assistance id (UUID) |
|
|
Assistance name |
|
|
Assistance category |
|
|
List of passenger types for whom assistance is allowed |
Booking Create
To create a booking, you must specify information about the selected flight, brand, and passengers. Additionally, for each passenger, you can specify a list of selected additional services and assistance of the airline on this flight.
*The set of mandatory parameters that must be specified to the passenger when booking may differ depending on the selected airline configuration. For each airline, the agent must agree on the list of parameters to be used.
POST /v1/agency-api/bookings HTTP/1.1
Content-Type: application/json;charset=UTF-8
X-Currency: KZT
Accept: application/json;charset=UTF-8
Content-Length: 1375
{
"passengers" : [ {
"passenger" : {
"paxType" : "ADT",
"birthday" : "2021-03-01",
"firstname" : "Andrei",
"lastname" : "Shischits",
"gender" : "MALE",
"citizenship" : "KZT",
"documentId" : "MP22222222",
"documentType" : "PASSPORT",
"documentExpireDate" : "2030-10-10"
},
"outboundFlight" : {
"legs" : [ {
"flightId" : "7f3d4300-f0fa-43c7-842a-b33bb42d2230",
"brandFrameId" : "a0ebd77c-e2ef-475f-87a7-a373de87318f",
"offers" : [ {
"offerId" : "05dd8bf6-97b1-46a7-a613-36c534ec0201",
"quantity" : 2
} ],
"assistances" : [ "75b5a9a1-1244-4f02-9c7f-85d43c6f283d" ]
} ]
},
"returningFlight" : {
"legs" : [ {
"flightId" : "530a1925-0b3c-45da-927f-b217bd1cb516",
"brandFrameId" : "a0ebd77c-e2ef-475f-87a7-a373de87318f",
"offers" : [ {
"offerId" : "05dd8bf6-97b1-46a7-a613-36c534ec0201",
"quantity" : 2
} ],
"assistances" : [ "75b5a9a1-1244-4f02-9c7f-85d43c6f283d" ]
} ]
}
} ],
"customerInfo" : {
"email" : "andrei@farel.io",
"phone" : "+333222445566"
},
"agentFee" : 150,
"routes" : [ {
"routeId" : "75b5a9a1-1244-4f02-9c7f-85d43c6f283d",
"fareFrameId" : "75b5a9a1-1244-4f02-9c7f-85d43c6f283d",
"direction" : "OUTBOUND"
} ]
}
Path | Type | Description |
---|---|---|
|
|
Set of passengers data Must not be empty. Size must be between 1 and 9 inclusive |
|
|
Passenger Type Must be not null |
|
|
First name First name must be of Latin letters. Must be not blank. Size must be between 1 and 300 inclusive |
|
|
Last name Last name must be of Latin letters. Must be not blank. Size must be between 1 and 300 inclusive |
|
|
Date of birth Must be in past. Must be not null |
|
|
Gender Must be not null |
|
|
Citizenship Must be not blank. Size must be between 2 and 300 inclusive |
|
|
Document number ID must be alphanumeric. Must be not blank. Size must be between 2 and 300 inclusive |
|
|
Document type Must be not null |
|
|
Document expire date Must be in future |
|
|
Outbound flight description |
|
|
Outbound flight legs |
|
|
Flight id (UUID) |
|
|
Brand frame id (UUID) |
|
|
List of selected offers |
|
|
Offer id (UUID) |
|
|
Quantity |
|
|
List of assistances (UUID) |
|
|
Returning flight description if exists |
|
|
Returning flight legs |
|
|
Flight id (UUID) |
|
|
Brand frame id (UUID) |
|
|
List of selected offers |
|
|
Offer id (UUID) |
|
|
Quantity |
|
|
List of assistances (UUID) |
|
|
Customer contact information for notification |
|
|
Customer email Must be a well-formed email address |
|
|
Customer phone. Phone should be numeric and should have leading '+' |
|
|
Agent fee |
|
|
RouteId |
|
|
fareFrameId |
|
|
direction |
The response contains information about the created booking and its price.
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 184
{
"bookingId" : "13cf4b4c-d923-4ee9-a75e-e43999282fff",
"orderId" : "05dd8bf6-97b1-46a7-a613-36c534ec0201",
"bookingNumber" : "HQ2131",
"currency" : "USD",
"price" : 100500
}
Path | Type | Description |
---|---|---|
|
|
Booking id (UUID) |
|
|
Booking Order id (UUID) |
|
|
Booking number |
|
|
Currency |
|
|
Total price of booking |
Booking Payment
To pay for the booking from the agent’s balance, you must complete the following request with information on the booking id. Our system will automatically determine the payment instrument for your agency and authorize for the amount of the booking.
POST /v1/agency-api/bookings/13cf4b4c-d923-4ee9-a75e-e43999282fff/payments HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Parameter | Description |
---|---|
|
Booking id (UUID) |
HTTP/1.1 202 Accepted
Booking Order
Booking payment deadline in seconds. Order ID must be passed in path, it can be obtained from the booking create request.
Parameter | Description |
---|---|
|
Order ID (UUID) |
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 24
{
"timeLimit" : 1200
}
Booking Details
This endpoint is designed to receive detailed information on booking: booking details, data on each passenger segment, and route. The request can be made after paying for the booking, in order to receive information about successful authorization. And to receive changes to the reservation that could have occurred on the side of the airline.
GET /v1/agency-api/bookings/13cf4b4c-d923-4ee9-a75e-e43999282fff HTTP/1.1
Accept: application/json
Parameter | Description |
---|---|
|
Booking id (UUID) |
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3768
{
"bookingId" : "13cf4b4c-d923-4ee9-a75e-e43999282fff",
"bookingNumber" : "HQ2131",
"createdDate" : 1.66540171E9,
"payedDate" : 1.66540171E9,
"paymentFailReason" : "Payment Fail Reason",
"currency" : "USD",
"outboundFlight" : {
"legs" : [ {
"flightId" : "7f3d4300-f0fa-43c7-842a-b33bb42d2230",
"flightNumber" : "IO-9999",
"departureDateTime" : "2022-10-09T09:00:00",
"departureAirportCode" : "ALA",
"arrivalDateTime" : "2022-10-10T09:00:00",
"arrivalAirportCode" : "GDN",
"duration" : 180,
"aircraftName" : "Millennium Falcon"
} ],
"stops" : [ ],
"totalDuration" : 1000
},
"returningFlight" : {
"legs" : [ {
"flightId" : "530a1925-0b3c-45da-927f-b217bd1cb516",
"flightNumber" : "IO-8888",
"departureDateTime" : "2022-10-10T11:00:00",
"departureAirportCode" : "GDN",
"arrivalDateTime" : "2022-10-10T15:00:00",
"arrivalAirportCode" : "ALA",
"duration" : 180,
"aircraftName" : "Millennium Falcon"
} ],
"stops" : [ ],
"totalDuration" : 1000
},
"passengerSegments" : [ {
"passengerSegmentId" : "962cfe9e-2557-468a-9ca3-41f8d5975054",
"passengerSegmentStatus" : "ISSUED",
"flightId" : "7f3d4300-f0fa-43c7-842a-b33bb42d2230",
"price" : 100500.01,
"baseFarePrice" : 90,
"taxChargePrice" : 10,
"passengerData" : {
"paxType" : "ADT",
"birthday" : [ 2021, 3, 1 ],
"firstname" : "Andrei",
"lastname" : "Shischits",
"gender" : "MALE",
"citizenship" : "KZT",
"documentId" : "MP22222222",
"documentType" : "PASSPORT",
"documentExpireDate" : [ 2030, 10, 10 ],
"passengerId" : "a1c509cc-5079-44a4-a02c-d57218274528",
"eticketNumber" : null
},
"offers" : [ {
"offerId" : "05dd8bf6-97b1-46a7-a613-36c534ec0201",
"quantity" : 2,
"price" : 100,
"services" : [ {
"payload" : {
"type" : "CHECKIN_BAGGAGE",
"weight" : 32,
"imageUrl" : null,
"description" : "CHECKIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
}, {
"payload" : {
"type" : "CABIN_BAGGAGE",
"weight" : 10,
"imageUrl" : null,
"description" : "CABIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
} ]
} ],
"assistances" : [ {
"assistanceId" : "75b5a9a1-1244-4f02-9c7f-85d43c6f283d",
"name" : "Help disabled passenger",
"category" : "PASSENGER_WITH_DISABILITY"
} ],
"managingRules" : [ {
"timeLimit" : 30,
"allowance" : true,
"type" : "NO_SHOW_REFUND",
"penaltyValue" : 0,
"penaltyType" : "FREE_VALUE"
} ],
"brand" : {
"brandId" : "762cfe9e-2557-468a-9ca3-41f8d5975054",
"name" : "Light Saber",
"cabinClass" : "ECONOMY",
"services" : [ {
"service" : {
"payload" : {
"type" : "CHECKIN_BAGGAGE",
"weight" : 10,
"imageUrl" : null,
"description" : "CHECKIN_BAGGAGE_DESCRIPTION"
},
"category" : "BAGGAGE"
},
"quantity" : 3
} ]
}
} ],
"customerInfo" : {
"email" : "andrei@farel.io",
"phone" : "84952020327"
},
"agentFee" : 100,
"primaryBooking" : {
"bookingId" : "7777777c-d923-4ee9-a75e-e43999282ccc",
"bookingNumber" : "5"
},
"linkedBookings" : [ {
"bookingId" : "1111114c-d923-4ee9-a75e-e43999282aaa",
"bookingNumber" : "55"
} ],
"previousBookings" : [ {
"bookingId" : "99999999-9923-4ee9-a75e-e43999282ddd",
"bookingNumber" : "4"
} ],
"followingBookings" : [ {
"bookingId" : "22222222-2923-4ee9-a75e-e43999282bbb",
"bookingNumber" : "6"
} ]
}
Path | Type | Description |
---|---|---|
|
|
Booking id (UUID) |
|
|
Booking number |
|
|
Booking creation date |
|
|
Booking payment date |
|
|
Payment Fail Reason |
|
|
Currency |
|
|
Primary booking |
|
|
Booking id of primary booking |
|
|
Booking number of primary booking |
|
|
Linked booking |
|
|
Booking id of linked booking |
|
|
Booking number of linked booking |
|
|
Previous bookings |
|
|
Booking id of previous booking |
|
|
Booking number of previous booking |
|
|
Following booking |
|
|
Booking id of following booking |
|
|
Booking number of following booking |
|
|
Outbound flight |
|
|
Outbound flight legs |
|
|
Information about stops for flights with layovers |
|
|
Total duration of the flight |
|
|
Flight id (UUID) |
|
|
Flight number |
|
|
Date and time of flight departure |
|
|
IATA-code of airport of departure |
|
|
Date and time of flight arrival |
|
|
IATA-code of airport of arrival |
|
|
Flight duration |
|
|
Aircraft name |
|
|
Returning flight if exists |
|
|
Returning flight legs |
|
|
Information about stops for flights with layovers |
|
|
Total duration of the flight |
|
|
Flight id (UUID) |
|
|
Flight number |
|
|
Date and time of flight departure |
|
|
IATA-code of airport of departure |
|
|
Date and time of flight arrival |
|
|
IATA-code of airport of arrival |
|
|
Flight duration |
|
|
Aircraft name |
|
|
List of passenger booking segments with details |
|
|
Passenger segment id (UUID) |
|
|
Passenger segment status. Status descriptions are given below. |
|
|
Flight id (UUID) |
|
|
Price |
|
|
booking class & fare price |
|
|
tax & charge price |
|
|
Passenger data |
|
|
Passenger Type |
|
|
Date of birth |
|
|
First name |
|
|
Last name |
|
|
Gender |
|
|
Citizenship |
|
|
Document number |
|
|
Document type |
|
|
Document expire date |
|
|
Passenger ID |
|
|
eticketNumber |
|
|
List of offers |
|
|
Offer id (UUID) |
|
|
Quantity |
|
|
Offer price |
|
|
Set of offer’s services |
|
|
Services description |
|
|
Service category type |
|
|
Service payload |
|
|
Assistance description |
|
|
Assistance id (UUID) |
|
|
Assistance name |
|
|
Assistance category |
|
|
Passenger segment management rules |
|
|
Rule allowance |
|
|
Rule type |
|
|
Penalty value |
|
|
Penalty type |
|
|
Rule time limit |
|
|
Branded Fare details |
|
|
Brand id (UUID) |
|
|
Brand name |
|
|
Cabin class |
|
|
Brand services |
|
|
Service description |
|
|
Service category type |
|
|
Service payload with parameters (payload varies by category) |
|
|
Service quantity |
|
|
Customer contact information for notification |
|
|
Customer email |
|
|
Customer phone |
|
|
Agent fee |
Refund Details
Endpoint for getting refund details by booking for each passenger segment.
GET /v1/agency-api/bookings/13cf4b4c-d923-4ee9-a75e-e43999282fff/refund HTTP/1.1
Accept: application/json
Parameter | Description |
---|---|
|
Booking id (UUID) |
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 287
{
"currency" : "EUR",
"paxSegments" : [ {
"paxSegmentId" : "4d75efa9-deb9-426f-8d4f-780d10dff142",
"refundAmount" : 100500,
"available" : false
}, {
"paxSegmentId" : "9c474a4e-d182-499b-b94b-93c7b7c935a9",
"refundAmount" : 200100,
"available" : true
} ]
}
Path | Type | Description |
---|---|---|
|
|
Currency |
|
|
Refund info for each passenger segment |
|
|
Passenger segment ID |
|
|
Refund amount for this passenger segment |
|
|
The refund availability |
Refund
Endpoint for performing a refund on the specified passenger segments of the booking.
POST /v1/agency-api/bookings/13cf4b4c-d923-4ee9-a75e-e43999282fff/refund HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Content-Length: 106
{
"paxSegmentIds" : [ "162fc5c0-fed0-49dd-9fb7-c4e5ec68e417", "34fb9a7a-8a46-486c-96a7-eb61316f6b28" ]
}
Parameter | Description |
---|---|
|
Booking id (UUID) |
{
"paxSegmentIds" : [ "162fc5c0-fed0-49dd-9fb7-c4e5ec68e417", "34fb9a7a-8a46-486c-96a7-eb61316f6b28" ]
}
Path | Type | Description |
---|---|---|
|
|
Passenger segment ID Must not be empty |
HTTP/1.1 202 Accepted
Add Infant
The endpoint is designed to add an infant for the current booking. Information about the route, brand and fare rules is inherited from the main booking.
POST /v1/agency-api/bookings/13cf4b4c-d923-4ee9-a75e-e43999282fff/infant HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Content-Length: 1095
{
"passengers" : [ {
"passenger" : {
"birthday" : "1991-03-01",
"firstname" : "Andrei",
"lastname" : "Shischits",
"gender" : "MALE",
"citizenship" : "KZT",
"documentId" : "MP22222222",
"documentType" : "PASSPORT",
"documentExpireDate" : "2027-09-09"
},
"outboundFlight" : {
"legs" : [ {
"flightId" : "7f3d4300-f0fa-43c7-842a-b33bb42d2230",
"brandFrameId" : "a0ebd77c-e2ef-475f-87a7-a373de87318f",
"offers" : [ {
"offerId" : "05dd8bf6-97b1-46a7-a613-36c534ec0201",
"quantity" : 2
} ],
"assistances" : [ "34348bf6-97b1-46a7-a613-36c534121212" ]
} ]
},
"returningFlight" : {
"legs" : [ {
"flightId" : "530a1925-0b3c-45da-927f-b217bd1cb516",
"brandFrameId" : "a0ebd77c-e2ef-475f-87a7-a373de87318f",
"offers" : [ {
"offerId" : "05dd8bf6-97b1-46a7-a613-36c534ec0201",
"quantity" : 2
} ],
"assistances" : [ "34348bf6-97b1-46a7-a613-36c534121212" ]
} ]
}
} ],
"agentFee" : 100500
}
Path | Type | Description |
---|---|---|
|
|
Set of passengers data Must not be empty |
|
|
First name First name must be of Latin letters. Must be not blank. Size must be between 1 and 300 inclusive |
|
|
Last name Last name must be of Latin letters. Must be not blank. Size must be between 1 and 300 inclusive |
|
|
Date of birth Must be in past. Must be not null |
|
|
Gender Must be not null |
|
|
Citizenship Must be not blank. Size must be between 2 and 300 inclusive |
|
|
Document number ID must be alphanumeric. Must be not blank. Size must be between 2 and 300 inclusive |
|
|
Document type Must be not null |
|
|
Document expire date Must be in future |
|
|
Outbound flight description |
|
|
Outbound flight legs |
|
|
Flight id (UUID) |
|
|
Brand frame id (UUID) |
|
|
List of selected offers |
|
|
Offer id (UUID) |
|
|
Quantity |
|
|
List of assistances (UUID) |
|
|
Returning flight description if exists |
|
|
Returning flight legs |
|
|
Flight id (UUID) |
|
|
Brand frame id (UUID) |
|
|
List of selected offers |
|
|
Offer id (UUID) |
|
|
Quantity |
|
|
List of assistances (UUID) |
|
|
Agent fee |
As a result of the operation, a new booking with an infant is created, which is associated with the main booking.
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 184
{
"bookingId" : "13cf4b4c-d923-4ee9-a75e-e43999282fff",
"orderId" : "05dd8bf6-97b1-46a7-a613-36c534ec0201",
"bookingNumber" : "HQ2131",
"currency" : "USD",
"price" : 100500
}
Path | Type | Description |
---|---|---|
|
|
Booking id (UUID) |
|
|
Booking Order id (UUID) |
|
|
Booking number |
|
|
Currency |
|
|
Total price of booking |
Exchange Flight Alternative Dates
Endpoint for getting exchange flight alternative dates by booking ID and flightIDs.
GET /v1/agency-api/bookings/00000000-0000-0000-0000-000000000000/exchange/alternative?flightIds=00000000-0000-0000-0000-000000000001%2C00000000-0000-0000-0000-000000000002 HTTP/1.1
Accept: application/json;charset=UTF-8
Parameter | Description |
---|---|
|
Booking id (UUID) |
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 46
{
"dates" : [ "2025-06-05", "2025-06-06" ]
}
Path | Type | Description |
---|---|---|
|
|
List of dates with available flights |
Get Exchange Alternative Flights
An endpoint for getting for an alternative flights to exchange.
GET /v1/agency-api/bookings/00000000-0000-0000-0000-000000000000/exchange/flights HTTP/1.1
Accept: application/json;charset=UTF-8
Parameter | Description |
---|---|
|
Booking id (UUID) |
The response contains information about each available flight and passengers.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2250
{
"fareName" : "Cheapest fare",
"fareFrameId" : "f2ad959e-1c2d-4135-90d2-8ca77336be22",
"orderNumber" : "123456",
"routes" : [ {
"routeId" : "7fe11c69-040f-45f0-925b-7b6ed0b388ee",
"routeInfo" : {
"origin" : "ALA",
"destination" : "JFK"
},
"direction" : "OUTBOUND",
"legs" : [ {
"flightId" : "5011ef21-de47-45de-8d7f-5664cbf36efa",
"flightNumber" : "KC123",
"origin" : {
"city" : "ALA",
"cityName" : "Almaty",
"airportCode" : "ALA",
"airportName" : "Almaty International Airport"
},
"departureDateTime" : [ 2025, 6, 5, 10, 0 ],
"destination" : {
"city" : "JFK",
"cityName" : "New York",
"airportCode" : "JFK",
"airportName" : "John F. Kennedy International Airport"
},
"arrivalDateTime" : [ 2025, 6, 5, 20, 0 ],
"duration" : 36000,
"aircraft" : "Boeing 737",
"alternativeFlight" : true,
"departureDate" : [ 2025, 6, 5 ],
"arrivalDate" : [ 2025, 6, 5 ],
"departureTime" : "10:00",
"arrivalTime" : "20:00",
"arriveDateOffset" : 0
} ],
"stops" : [ {
"airport" : {
"city" : "TSE",
"cityName" : "Astana",
"airportCode" : "TSE",
"airportName" : "Astana International Airport"
},
"airportCode" : "TSE",
"duration" : 3600
} ],
"totalDuration" : 7200
} ],
"passengers" : [ {
"passengerId" : "167b9536-55da-48ef-bdb5-58b7b2853276",
"firstName" : "John",
"lastName" : "Doe",
"paxSegments" : [ {
"paxSegmentId" : "f890f91b-743b-45e4-a986-7b4bad2f9d6b",
"status" : "ISSUED",
"flightId" : "82bf46e8-f288-439e-b49c-c228f4029394",
"legNumber" : 1,
"exchangeAllowed" : true,
"involuntary" : "NONE",
"involuntaryChange" : false,
"totalPrice" : 10,
"paxType" : {
"type" : "ADT",
"unn" : false,
"discount" : null,
"seatIncluded" : true
},
"farePrice" : 10,
"offersPrice" : 0,
"taxPrice" : 0,
"offers" : [ ]
} ]
} ],
"managingRules" : [ {
"name" : "REFUND_BEFORE_DEPARTURE",
"penalty" : {
"value" : 10,
"type" : "PERCENT"
}
} ]
}
Path | Type | Description |
---|---|---|
|
|
Fare name |
|
|
Fare frame ID (UUID) |
|
|
Booking number |
|
|
List of routes |
|
|
Route ID (UUID) |
|
|
Route information |
|
|
Origin airport code |
|
|
Destination airport code |
|
|
Route direction |
|
|
List of route legs |
|
|
Flight ID (UUID) |
|
|
Flight number |
|
|
Origin airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Departure date and time |
|
|
Destination airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Arrival date and time |
|
|
Flight duration in seconds |
|
|
Aircraft name |
|
|
Is this alternative flight |
|
|
Departure date |
|
|
Arrival date |
|
|
Departure time |
|
|
Arrival time |
|
|
Number of days between departure and arrival |
|
|
List of stops |
|
|
Stop airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Airport code |
|
|
Stop duration in seconds |
|
|
Total route duration in seconds |
|
|
List of passengers |
|
|
Passenger ID (UUID) |
|
|
Passenger first name |
|
|
Passenger last name |
|
|
List of passenger segments |
|
|
Passenger segment ID (UUID) |
|
|
Passenger segment fare price |
|
|
Passenger segment offers price |
|
|
Passenger segment taxes price |
|
|
List of passenger segment offers |
|
|
Passenger segment status |
|
|
Flight ID (UUID) |
|
|
Leg number |
|
|
Is exchange allowed |
|
|
Involuntary type |
|
|
Is involuntary change |
|
|
Total price |
|
|
Passenger type |
|
|
Passenger type |
|
|
Is seat included |
|
|
Is UNN |
|
|
List of managing rules |
|
|
Rule name |
|
|
Penalty amount |
|
|
Penalty value |
|
|
Penalty type |
Search exchange options by pax segment IDs and flight date
Endpoint for searching exchange options by pax segment IDs and flight date.
POST /v1/agency-api/bookings/00000000-0000-0000-0000-000000000000/exchange/search HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
X-Currency: USD
Content-Length: 137
{
"oldPaxSegmentIds" : [ "f045688d-5c86-4a4d-9dad-f9022ae4869f", "d94f308c-8143-4e23-9af4-7fcd98caf94c" ],
"newDate" : "2025-06-05"
}
Parameter | Description |
---|---|
|
Booking id (UUID) |
Path | Type | Description |
---|---|---|
|
|
List of pax segments to exchange |
|
|
Exchange flight date |
The response contains information about the exchange option routes.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 7030
{
"routes" : [ {
"passengers" : [ {
"passengerId" : "8c9de749-5614-4733-87e2-0d40d7ebe254",
"paxSegments" : [ {
"paxSegmentId" : "83555eff-20a2-4efc-84a2-4703784131d2",
"offers" : [ {
"offerId" : "cbf3fbd8-412f-4cc6-9be5-ea2004962bdd",
"price" : 10,
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
},
"debit" : 10,
"currencyDebit" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
},
"quantity" : 1,
"ancillaries" : [ ],
"active" : true,
"area" : "B2B"
} ],
"offerPrices" : [ {
"offerId" : "cbf3fbd8-412f-4cc6-9be5-ea2004962bdd",
"quantity" : 1
} ]
} ],
"firstName" : "John",
"lastName" : "Doe",
"birthday" : [ 1995, 6, 5 ],
"documentNumber" : "123456",
"documentType" : "PASSPORT",
"citizenship" : "KZ",
"documentExpireDate" : [ 2035, 6, 5 ],
"paxType" : {
"type" : "ADT",
"unn" : false,
"discount" : null,
"seatIncluded" : true
},
"farePrice" : 1,
"price" : 1000,
"taxPrice" : 0,
"currencyTaxPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"taxCharge" : 0,
"currencyTaxCharge" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"taxxPrice" : 0,
"currencyTaxxPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalCharge" : 10,
"totalCurrencyCharge" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
},
"fareCharge" : 1,
"fareCurrencyCharge" : {
"base" : {
"currency" : "USD",
"value" : 1
},
"display" : {
"currency" : "KZT",
"value" : 480
}
},
"totalFee" : 10,
"totalCurrencyFee" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
}
} ],
"route" : {
"legs" : [ {
"flightId" : "54393032-9e41-4022-bd4a-2ef4b5b303b2",
"flightNumber" : "KC123",
"origin" : {
"city" : "ALA",
"cityName" : "Almaty",
"airportCode" : "ALA",
"airportName" : "Almaty International Airport"
},
"departureDateTime" : [ 2025, 6, 5, 10, 0 ],
"destination" : {
"city" : "JFK",
"cityName" : "New York",
"airportCode" : "JFK",
"airportName" : "John F. Kennedy International Airport"
},
"arrivalDateTime" : [ 2025, 6, 5, 20, 0 ],
"duration" : 36000,
"aircraft" : "Boeing 737",
"alternativeFlight" : true,
"departureDate" : [ 2025, 6, 5 ],
"arrivalDate" : [ 2025, 6, 5 ],
"departureTime" : "10:00",
"arrivalTime" : "20:00",
"arriveDateOffset" : 0
} ],
"stops" : [ {
"airport" : {
"city" : "TSE",
"cityName" : "Astana",
"airportCode" : "TSE",
"airportName" : "Astana International Airport"
},
"airportCode" : "TSE",
"duration" : 3600
} ],
"totalDuration" : 20
},
"fare" : {
"fareId" : "3febb90c-959d-4807-a21c-41acbb6e052c",
"fareFrameId" : "fe71678f-0b9d-49df-932b-c39a052d3b66",
"name" : "Cheapest fare",
"cabinClass" : "FIRST",
"managingRules" : [ {
"name" : "REFUND_BEFORE_DEPARTURE",
"penalty" : {
"type" : "PERCENT",
"value" : 10
},
"timeBeforeDeparture" : 30
} ],
"baggageRules" : [ {
"quantity" : 1,
"type" : "CABIN_BAGGAGE",
"weight" : 23
} ],
"price" : 1000
},
"legs" : [ {
"flightId" : "54393032-9e41-4022-bd4a-2ef4b5b303b2",
"flightNumber" : "KC123",
"origin" : {
"city" : "ALA",
"cityName" : "Almaty",
"airportCode" : "ALA",
"airportName" : "Almaty International Airport"
},
"departureDateTime" : [ 2025, 6, 5, 10, 0 ],
"destination" : {
"city" : "JFK",
"cityName" : "New York",
"airportCode" : "JFK",
"airportName" : "John F. Kennedy International Airport"
},
"arrivalDateTime" : [ 2025, 6, 5, 20, 0 ],
"duration" : 36000,
"aircraft" : "Boeing 737",
"alternativeFlight" : true,
"departureDate" : [ 2025, 6, 5 ],
"arrivalDate" : [ 2025, 6, 5 ],
"departureTime" : "10:00",
"arrivalTime" : "20:00",
"arriveDateOffset" : 0
} ],
"stops" : [ {
"airport" : {
"city" : "TSE",
"cityName" : "Astana",
"airportCode" : "TSE",
"airportName" : "Astana International Airport"
},
"airportCode" : "TSE",
"duration" : 3600
} ],
"totalDuration" : 20,
"totalCharge" : 10,
"totalCurrencyCharge" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalPrice" : 0,
"totalCurrencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalFarePrice" : 0,
"totalCurrencyFarePrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalTaxPrice" : 0,
"totalCurrencyTaxPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalFeePrice" : 0,
"totalCurrencyFeePrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalFareCharge" : 0,
"totalCurrencyFareCharge" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
}
} ]
}
Path | Type | Description |
---|---|---|
|
|
List of exchange routes |
|
|
Total charge |
|
|
Total currency charge |
|
|
Base currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Total currency price |
|
|
Currency value price |
|
|
Base currency price |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency price |
|
|
Currency code |
|
|
Currency value |
|
|
List of passengers |
|
|
Passenger ID (UUID) |
|
|
List of passenger segments |
|
|
Passenger segment ID (UUID) |
|
|
List of offers |
|
|
Offer ID (UUID) |
|
|
Offer area |
|
|
Offer price |
|
|
Offer currency price |
|
|
Offer base currency price |
|
|
Offer base currency price currency code |
|
|
Offer base currency price value |
|
|
Offer display currency price |
|
|
Offer display currency price currency code |
|
|
Offer display currency price value |
|
|
List of ancillaries |
|
|
Offer quantity |
|
|
Is offer available |
|
|
Total charge |
|
|
Total currency charge |
|
|
Base currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Fare charge |
|
|
Fare currency charge |
|
|
Base currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Total fee |
|
|
Total currency fee |
|
|
Base currency fee |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency fee |
|
|
Currency code |
|
|
Currency value |
|
|
Passenger first name |
|
|
Passenger last name |
|
|
Passenger birthday |
|
|
Passenger document number |
|
|
Passenger document type |
|
|
Passenger citizenship |
|
|
Passenger document expire date |
|
|
Passenger type |
|
|
Passenger type |
|
|
Is seat included |
|
|
Is UNN |
|
|
Fare price |
|
|
Price |
|
|
Tax price |
|
|
Tax price base |
|
|
Tax price base currency |
|
|
Tax price base value |
|
|
Tax price display currency |
|
|
Tax price display value |
|
|
Tax charge |
|
|
Tax charge base |
|
|
Tax charge base currency |
|
|
Tax charge base value |
|
|
Tax charge display currency |
|
|
Tax charge display value |
|
|
Total fare price |
|
|
Fare price currency |
|
|
Fare price base value |
|
|
Fare price display currency |
|
|
Fare price display value |
|
|
Total fare price |
|
|
Tax price currency |
|
|
Tax price base value |
|
|
Tax price display currency |
|
|
Tax price display value |
|
|
Total fee price |
|
|
Fee price currency |
|
|
Fee price base value |
|
|
Fee price display currency |
|
|
Fee price display value |
|
|
Total fare charge |
|
|
Fare price base currency |
|
|
Fare charge base value |
|
|
Fare price display currency |
|
|
Fare charge display value |
|
|
Route |
|
|
List of route legs |
|
|
Flight ID (UUID) |
|
|
Flight number |
|
|
Origin airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Departure date and time |
|
|
Destination airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Arrival date and time |
|
|
Flight duration in seconds |
|
|
Aircraft name |
|
|
Is this alternative flight |
|
|
Departure date |
|
|
Arrival date |
|
|
Departure time |
|
|
Arrival time |
|
|
Number of days between departure and arrival |
|
|
List of stops |
|
|
Stop airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Airport code |
|
|
Stop duration in seconds |
|
|
Total route duration in seconds |
|
|
Fare |
|
|
Fare frame ID (UUID) |
|
|
Fare ID (UUID) |
|
|
Fare name |
|
|
Cabin class |
|
|
List of managing rules |
|
|
Rule name |
|
|
Penalty amount |
|
|
Penalty value |
|
|
Penalty type |
|
|
Time before departure |
|
|
List of baggage rules |
|
|
Baggage quantity |
|
|
Baggage type |
|
|
Baggage weight |
|
|
Fare price |
Execute booking exchange
Endpoint for executing booking exchange.
POST /v1/agency-api/bookings/00000000-0000-0000-0000-000000000000/exchange HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
Content-Length: 185
{
"oldPaxSegmentIds" : [ "d6027ee2-3f4d-4480-977b-b74c46734c02", "37289b1a-e96c-48bc-8c78-75666e025b7a" ],
"newRouteId" : "215b29c8-44a0-4a59-8340-18131d15b938",
"agentFee" : 10
}
Parameter | Description |
---|---|
|
Booking id (UUID) |
Path | Type | Description |
---|---|---|
|
|
List of pax segments to exchange |
|
|
Route ID to exchange |
|
|
Agent fee amount |
The response contains new booking ID and newly created order ID.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 112
{
"bookingId" : "00000000-0000-0000-0000-000000000000",
"orderId" : "cc383b7e-aeac-494c-b616-56ab812af93e"
}
Path | Type | Description |
---|---|---|
|
|
New booking ID |
|
|
New order ID to pay |
Get booking exchange preview
Endpoint for getting booking exchange preview.
POST /v1/agency-api/bookings/00000000-0000-0000-0000-000000000000/exchange/preview HTTP/1.1
Content-Type: application/json;charset=UTF-8
Accept: application/json;charset=UTF-8
X-Currency: USD
Content-Length: 185
{
"oldPaxSegmentIds" : [ "eacb1135-bba2-48e4-947a-69a09665f15d", "f9f36ffa-86cc-47a1-9c74-f6f00172f1d1" ],
"newRouteId" : "6ec49a61-45da-4d0e-9102-b32ed12c9b76",
"agentFee" : 10
}
Parameter | Description |
---|---|
|
Booking id (UUID) |
Path | Type | Description |
---|---|---|
|
|
List of pax segments to exchange |
|
|
Route ID to exchange |
|
|
Agent fee amount |
The response contains booking exchange preview data.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 7027
{
"data" : {
"passengers" : [ {
"passengerId" : "d04649f6-b896-4b43-a643-371ea99a2d37",
"paxSegments" : [ {
"paxSegmentId" : "3749e8ed-db90-4fde-932e-79734010a9a5",
"offers" : [ {
"offerId" : "366bea39-f76f-41d0-99f8-4ba54a6a2285",
"price" : 10,
"currencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
},
"debit" : 10,
"currencyDebit" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
},
"quantity" : 1,
"ancillaries" : [ ],
"active" : true,
"area" : "B2B"
} ],
"offerPrices" : [ {
"offerId" : "366bea39-f76f-41d0-99f8-4ba54a6a2285",
"quantity" : 1
} ]
} ],
"firstName" : "John",
"lastName" : "Doe",
"birthday" : [ 1995, 6, 5 ],
"documentNumber" : "123456",
"documentType" : "PASSPORT",
"citizenship" : "KZ",
"documentExpireDate" : [ 2035, 6, 5 ],
"paxType" : {
"type" : "ADT",
"unn" : false,
"discount" : null,
"seatIncluded" : true
},
"farePrice" : 1,
"price" : 1000,
"taxPrice" : 0,
"currencyTaxPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"taxCharge" : 0,
"currencyTaxCharge" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"taxxPrice" : 0,
"currencyTaxxPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalCharge" : 10,
"totalCurrencyCharge" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
},
"fareCharge" : 1,
"fareCurrencyCharge" : {
"base" : {
"currency" : "USD",
"value" : 1
},
"display" : {
"currency" : "KZT",
"value" : 480
}
},
"totalFee" : 10,
"totalCurrencyFee" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
}
} ],
"route" : {
"legs" : [ {
"flightId" : "6fd83237-b541-4b28-8284-4689fab28054",
"flightNumber" : "KC123",
"origin" : {
"city" : "ALA",
"cityName" : "Almaty",
"airportCode" : "ALA",
"airportName" : "Almaty International Airport"
},
"departureDateTime" : [ 2025, 6, 5, 10, 0 ],
"destination" : {
"city" : "JFK",
"cityName" : "New York",
"airportCode" : "JFK",
"airportName" : "John F. Kennedy International Airport"
},
"arrivalDateTime" : [ 2025, 6, 5, 20, 0 ],
"duration" : 36000,
"aircraft" : "Boeing 737",
"alternativeFlight" : true,
"departureDate" : [ 2025, 6, 5 ],
"arrivalDate" : [ 2025, 6, 5 ],
"departureTime" : "10:00",
"arrivalTime" : "20:00",
"arriveDateOffset" : 0
} ],
"stops" : [ {
"airport" : {
"city" : "TSE",
"cityName" : "Astana",
"airportCode" : "TSE",
"airportName" : "Astana International Airport"
},
"airportCode" : "TSE",
"duration" : 3600
} ],
"totalDuration" : 20
},
"fare" : {
"fareId" : "322116af-b906-4155-b53d-8360fbc791a2",
"fareFrameId" : "6fa0fc4c-89a3-43e7-8c4e-21a32d9c857a",
"name" : "Cheapest fare",
"cabinClass" : "FIRST",
"managingRules" : [ {
"name" : "REFUND_BEFORE_DEPARTURE",
"penalty" : {
"type" : "PERCENT",
"value" : 10
},
"timeBeforeDeparture" : 30
} ],
"baggageRules" : [ {
"quantity" : 1,
"type" : "CABIN_BAGGAGE",
"weight" : 23
} ],
"price" : 1000
},
"legs" : [ {
"flightId" : "6fd83237-b541-4b28-8284-4689fab28054",
"flightNumber" : "KC123",
"origin" : {
"city" : "ALA",
"cityName" : "Almaty",
"airportCode" : "ALA",
"airportName" : "Almaty International Airport"
},
"departureDateTime" : [ 2025, 6, 5, 10, 0 ],
"destination" : {
"city" : "JFK",
"cityName" : "New York",
"airportCode" : "JFK",
"airportName" : "John F. Kennedy International Airport"
},
"arrivalDateTime" : [ 2025, 6, 5, 20, 0 ],
"duration" : 36000,
"aircraft" : "Boeing 737",
"alternativeFlight" : true,
"departureDate" : [ 2025, 6, 5 ],
"arrivalDate" : [ 2025, 6, 5 ],
"departureTime" : "10:00",
"arrivalTime" : "20:00",
"arriveDateOffset" : 0
} ],
"stops" : [ {
"airport" : {
"city" : "TSE",
"cityName" : "Astana",
"airportCode" : "TSE",
"airportName" : "Astana International Airport"
},
"airportCode" : "TSE",
"duration" : 3600
} ],
"totalDuration" : 20,
"totalCharge" : 10,
"totalCurrencyCharge" : {
"base" : {
"currency" : "USD",
"value" : 10
},
"display" : {
"currency" : "KZT",
"value" : 4800
}
},
"totalPrice" : 0,
"totalCurrencyPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalFarePrice" : 0,
"totalCurrencyFarePrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalTaxPrice" : 0,
"totalCurrencyTaxPrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalFeePrice" : 0,
"totalCurrencyFeePrice" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
},
"totalFareCharge" : 0,
"totalCurrencyFareCharge" : {
"base" : {
"currency" : "USD",
"value" : 0
},
"display" : {
"currency" : "KZT",
"value" : 0
}
}
}
}
Path | Type | Description |
---|---|---|
|
|
Exchange preview |
|
|
Total charge |
|
|
Total currency charge |
|
|
Base currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Total currency price |
|
|
Currency value price |
|
|
Base currency price |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency price |
|
|
Currency code |
|
|
Currency value |
|
|
List of passengers |
|
|
Passenger ID (UUID) |
|
|
List of passenger segments |
|
|
Passenger segment ID (UUID) |
|
|
List of offers |
|
|
Offer ID (UUID) |
|
|
Offer area |
|
|
Offer price |
|
|
Offer currency price |
|
|
Offer base currency price |
|
|
Offer base currency price currency code |
|
|
Offer base currency price value |
|
|
Offer display currency price |
|
|
Offer display currency price currency code |
|
|
Offer display currency price value |
|
|
List of ancillaries |
|
|
Offer quantity |
|
|
Is offer available |
|
|
Total charge |
|
|
Total currency charge |
|
|
Base currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Fare charge |
|
|
Fare currency charge |
|
|
Base currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency charge |
|
|
Currency code |
|
|
Currency value |
|
|
Total fee |
|
|
Total currency fee |
|
|
Base currency fee |
|
|
Currency code |
|
|
Currency value |
|
|
Display currency fee |
|
|
Currency code |
|
|
Currency value |
|
|
Passenger first name |
|
|
Passenger last name |
|
|
Passenger birthday |
|
|
Passenger document number |
|
|
Passenger document type |
|
|
Passenger citizenship |
|
|
Passenger document expire date |
|
|
Passenger type |
|
|
Passenger type |
|
|
Is seat included |
|
|
Is UNN |
|
|
Fare price |
|
|
Price |
|
|
Tax Price |
|
|
Tax price currency |
|
|
Tax price base value |
|
|
Tax price display currency |
|
|
Tax price display value |
|
|
Tax Charge |
|
|
Tax charge currency |
|
|
Tax charge base value |
|
|
Tax charge display currency |
|
|
Tax charge display value |
|
|
Fare Price |
|
|
Total fare price |
|
|
Fare price currency |
|
|
Fare price base value |
|
|
Fare price display currency |
|
|
Fare price display value |
|
|
Total fare price |
|
|
Tax price currency |
|
|
Tax price base value |
|
|
Tax price display currency |
|
|
Tax price display value |
|
|
Total fare price |
|
|
Fee price currency |
|
|
Fee price base value |
|
|
Fee price display currency |
|
|
Fee price display value |
|
|
Total fare charge |
|
|
Fare price base currency |
|
|
Fare charge base value |
|
|
Fare price display currency |
|
|
Fare charge display value |
|
|
Route |
|
|
List of route legs |
|
|
Flight ID (UUID) |
|
|
Flight number |
|
|
Origin airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Departure date and time |
|
|
Destination airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Arrival date and time |
|
|
Flight duration in seconds |
|
|
Aircraft name |
|
|
Is this alternative flight |
|
|
Departure date |
|
|
Arrival date |
|
|
Departure time |
|
|
Arrival time |
|
|
Number of days between departure and arrival |
|
|
List of stops |
|
|
Stop airport |
|
|
City code |
|
|
City name |
|
|
Airport code |
|
|
Airport name |
|
|
Airport code |
|
|
Stop duration in seconds |
|
|
Total route duration in seconds |
|
|
Fare |
|
|
Fare frame ID (UUID) |
|
|
Fare ID (UUID) |
|
|
Fare name |
|
|
Cabin class |
|
|
List of managing rules |
|
|
Rule name |
|
|
Penalty amount |
|
|
Penalty value |
|
|
Penalty type |
|
|
Time before departure |
|
|
List of baggage rules |
|
|
Baggage quantity |
|
|
Baggage type |
|
|
Baggage weight |
|
|
Fare price |
Get exchange calendar by specified filter
Endpoint for getting exchange calendar by specified filter.
GET /v1/agency-api/bookings/00000000-0000-0000-0000-000000000000/exchange/calendar?origin=ALA&destination=TSE&outboundDateFrom=2025-06-05&outboundDateTo=2025-06-10&oldRouteId=d83621ac-71c7-4720-ac9c-06238a984d52&legCount=1&fareFrameId=dc6e07df-6791-4775-833c-7ff06d80a82d HTTP/1.1
Accept: application/json;charset=UTF-8
Parameter | Description |
---|---|
|
Booking id (UUID) |
GET /v1/agency-api/bookings/00000000-0000-0000-0000-000000000000/exchange/calendar?origin=ALA&destination=TSE&outboundDateFrom=2025-06-05&outboundDateTo=2025-06-10&oldRouteId=d83621ac-71c7-4720-ac9c-06238a984d52&legCount=1&fareFrameId=dc6e07df-6791-4775-833c-7ff06d80a82d HTTP/1.1
Accept: application/json;charset=UTF-8
The response flight dates for specified request.
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 60
{
"dates" : [ "2022-01-01", "2022-01-02", "2022-01-03" ]
}
Path | Type | Description |
---|---|---|
|
|
List of dates satisfying the conditions on which you can change the flight |
Service Payload
Each service has additional parameters, which depend on the category of the service.
Service Category |
Payload Path |
Type |
Description |
BAGGAGE |
|
|
Type of baggage: Cabin or Check-in |
BAGGAGE |
|
|
Baggage weight |
Errors code
Agency API uses conventional HTTP response codes to indicate the success or failure of an API request. In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc). Codes in the 5xx range indicate an error with Agency API’s servers (these are rare).
Some 4xx errors that could be handled programmatically (e.g., a card is declined) include an error code that briefly explains the error reported.
HTTP Code |
Description |
|
Everything worked as expected. |
|
The request redirection response code indicates that there is no need to retransmit the requested resources. It is an implicit redirection to a cached resource. |
|
The request was unacceptable, often due to missing a required parameter. |
|
No valid API key provided. |
|
Forbidden. The API key doesn’t have permissions to perform the request. |
|
The requested resource doesn’t exist. |
|
Something went wrong on Agency API’s end. (These are rare.) |