Get information about a cancellation fee policy
curl --request GET \
--url https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}import requests
url = "https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyVersion 1
Get information about a cancellation fee policy
Get information about a cancellation fee policy
Retrieves information about the given cancellation fee policy.
Response
Top Level Result Object
| Field name | Nullable | Type | Description |
|---|---|---|---|
| cancellationFeePolicyId | n | Integer | ID of this cancellation fee policy. |
| policyName | n | String | Name of the cancellation fee policy. |
| policyDescription | y | String | Description of cancellation fee policy. |
| usePercentMode | n | boolean | Whether the cancellation fee policy uses “percent mode” (true) or “dollar mode” (false). |
| cancellationFeeRules | n | array | Collection of CancellationFeeRule objects. |
| isDefault | n | boolean | Whether this is the default cancellation fee policy for this supplier. |
CancellationFeeRule Object
| Field name | Nullable | Type | Description |
|---|---|---|---|
| daysBeforeTravelDate | n | Integer | Duration before voucher travel date that this rule will be in effect. For example, if there are two rules with daysBeforeTravelDate=2 and daysBeforeTravelDate=5, the first rule will be in effect if the voucher is cancelled within two days of travel, and the second rule will be in effect between three and five days before travel. |
| feeAmount | n | Float | Amount of cancellation fee. This value is a percentage between 0 and 100 if the policy is in “percent mode”, or a monetary amount in the applicable fare’s currency if the policy is in “dollar mode”. |
GET
/
{supplierapi}
/
cancellationpolicy
/
{cancellationFeePolicyId}
Get information about a cancellation fee policy
curl --request GET \
--url https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}import requests
url = "https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{supplierapi}/cancellationpolicy/{cancellationFeePolicyId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body