cURL
curl --request POST \
--url https://app.example.com/v1/admin/catalog/departure-airports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"destination": {
"countryCode": "<string>",
"region": "<string>",
"city": "<string>",
"destinationCodes": [
"<string>"
]
},
"nights": {
"min": 123,
"max": 123
}
}'const response = await fetch("https://app.example.com/v1/admin/catalog/departure-airports", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
body: JSON.stringify({
"destination": {
"countryCode": "<string>",
"region": "<string>",
"city": "<string>",
"destinationCodes": [
"<string>"
]
},
"nights": {
"min": 123,
"max": 123
}
}),
});
const data = await response.json();import requests
response = requests.post(
"https://app.example.com/v1/admin/catalog/departure-airports",
headers={
"Authorization": "Bearer <token>"
},
json={
"destination": {
"countryCode": "<string>",
"region": "<string>",
"city": "<string>",
"destinationCodes": [
"<string>"
]
},
"nights": {
"min": 123,
"max": 123
}
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{operatorDomain}/v1/admin/catalog/departure-airports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'destination' => [
'countryCode' => '<string>',
'region' => '<string>',
'city' => '<string>',
'destinationCodes' => [
'<string>'
]
],
'nights' => [
'min' => 123,
'max' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{operatorDomain}/v1/admin/catalog/departure-airports"
payload := strings.NewReader("{\n \"destination\": {\n \"countryCode\": \"<string>\",\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"destinationCodes\": [\n \"<string>\"\n ]\n },\n \"nights\": {\n \"min\": 123,\n \"max\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{operatorDomain}/v1/admin/catalog/departure-airports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": {\n \"countryCode\": \"<string>\",\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"destinationCodes\": [\n \"<string>\"\n ]\n },\n \"nights\": {\n \"min\": 123,\n \"max\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{operatorDomain}/v1/admin/catalog/departure-airports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination\": {\n \"countryCode\": \"<string>\",\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"destinationCodes\": [\n \"<string>\"\n ]\n },\n \"nights\": {\n \"min\": 123,\n \"max\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"departureAirports": [
{
"code": "OTP",
"label": "Bucharest (OTP)"
}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}Catalog
Departure airports for a destination
Resolve available departure airport codes to labelled options for a destination.
POST
/
v1
/
admin
/
catalog
/
departure-airports
cURL
curl --request POST \
--url https://app.example.com/v1/admin/catalog/departure-airports \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"destination": {
"countryCode": "<string>",
"region": "<string>",
"city": "<string>",
"destinationCodes": [
"<string>"
]
},
"nights": {
"min": 123,
"max": 123
}
}'const response = await fetch("https://app.example.com/v1/admin/catalog/departure-airports", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer <token>"
},
body: JSON.stringify({
"destination": {
"countryCode": "<string>",
"region": "<string>",
"city": "<string>",
"destinationCodes": [
"<string>"
]
},
"nights": {
"min": 123,
"max": 123
}
}),
});
const data = await response.json();import requests
response = requests.post(
"https://app.example.com/v1/admin/catalog/departure-airports",
headers={
"Authorization": "Bearer <token>"
},
json={
"destination": {
"countryCode": "<string>",
"region": "<string>",
"city": "<string>",
"destinationCodes": [
"<string>"
]
},
"nights": {
"min": 123,
"max": 123
}
}
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{operatorDomain}/v1/admin/catalog/departure-airports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'destination' => [
'countryCode' => '<string>',
'region' => '<string>',
'city' => '<string>',
'destinationCodes' => [
'<string>'
]
],
'nights' => [
'min' => 123,
'max' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://{operatorDomain}/v1/admin/catalog/departure-airports"
payload := strings.NewReader("{\n \"destination\": {\n \"countryCode\": \"<string>\",\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"destinationCodes\": [\n \"<string>\"\n ]\n },\n \"nights\": {\n \"min\": 123,\n \"max\": 123\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{operatorDomain}/v1/admin/catalog/departure-airports")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"destination\": {\n \"countryCode\": \"<string>\",\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"destinationCodes\": [\n \"<string>\"\n ]\n },\n \"nights\": {\n \"min\": 123,\n \"max\": 123\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{operatorDomain}/v1/admin/catalog/departure-airports")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination\": {\n \"countryCode\": \"<string>\",\n \"region\": \"<string>\",\n \"city\": \"<string>\",\n \"destinationCodes\": [\n \"<string>\"\n ]\n },\n \"nights\": {\n \"min\": 123,\n \"max\": 123\n }\n}"
response = http.request(request)
puts response.read_body{
"departureAirports": [
{
"code": "OTP",
"label": "Bucharest (OTP)"
}
]
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"requestId": "<string>",
"details": {}
}⌘I