Get Order Cancellation
curl --request GET \
--url https://api.aisa.one/apis/v1/duffel/flights/order-cancellations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}', 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.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"airline_credits": [
{
"amount": "90.80",
"amount_currency": "GBP",
"code": "1234567890123",
"id": "act_00009qzZWzjDipIkqpaUAj",
"issued_on": "2023-02-24",
"passenger_id": "pas_00009hj8USM7Ncg31cBCLL",
"type": "eticket",
"credit_amount": "90.80",
"credit_code": "1234567890123",
"credit_currency": "GBP",
"credit_name": "Duffel Travel Credit"
}
],
"confirmed_at": "2020-01-17T11:51:43.114803Z",
"created_at": "2020-04-11T15:48:11.642Z",
"expires_at": "2020-01-17T10:42:14Z",
"id": "ore_00009qzZWzjDipIkqpaUAj",
"live_mode": false,
"order_id": "xxx_00009hthhsUZ8W4LxQgkjo",
"refund_amount": "90.80",
"refund_currency": "GBP",
"refund_to": "arc_bsp_cash"
},
"meta": {
"limit": 123,
"before": "<string>",
"after": "<string>"
}
}Duffel Flights
Get Order Cancellation
Retrieve an order cancellation quote
GET
https://api.aisa.one
/
apis
/
v1
/
duffel
/
flights
/
order-cancellations
/
{id}
Get Order Cancellation
curl --request GET \
--url https://api.aisa.one/apis/v1/duffel/flights/order-cancellations/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}', 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.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/apis/v1/duffel/flights/order-cancellations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"airline_credits": [
{
"amount": "90.80",
"amount_currency": "GBP",
"code": "1234567890123",
"id": "act_00009qzZWzjDipIkqpaUAj",
"issued_on": "2023-02-24",
"passenger_id": "pas_00009hj8USM7Ncg31cBCLL",
"type": "eticket",
"credit_amount": "90.80",
"credit_code": "1234567890123",
"credit_currency": "GBP",
"credit_name": "Duffel Travel Credit"
}
],
"confirmed_at": "2020-01-17T11:51:43.114803Z",
"created_at": "2020-04-11T15:48:11.642Z",
"expires_at": "2020-01-17T10:42:14Z",
"id": "ore_00009qzZWzjDipIkqpaUAj",
"live_mode": false,
"order_id": "xxx_00009hthhsUZ8W4LxQgkjo",
"refund_amount": "90.80",
"refund_currency": "GBP",
"refund_to": "arc_bsp_cash"
},
"meta": {
"limit": 123,
"before": "<string>",
"after": "<string>"
}
}授权
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
响应
Error response; upstream passthrough responses may use provider formats