Ingest Flight Booking List (XFBL/FBL)
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"flightId": "QR001-20240101",
"bookings": [
{
"awbNumber": "157-12345678",
"pieces": 10,
"weight": 500,
"volume": 2.1,
"origin": "DOH",
"destination": "LHR",
"status": "BKD",
"xfbl": "<XFBL XML or IMP>",
"fbl": "<FBL if sent>"
}
]
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings"
payload = {
"flightId": "QR001-20240101",
"bookings": [
{
"awbNumber": "157-12345678",
"pieces": 10,
"weight": 500,
"volume": 2.1,
"origin": "DOH",
"destination": "LHR",
"status": "BKD",
"xfbl": "<XFBL XML or IMP>",
"fbl": "<FBL if sent>"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
flightId: 'QR001-20240101',
bookings: [
{
awbNumber: '157-12345678',
pieces: 10,
weight: 500,
volume: 2.1,
origin: 'DOH',
destination: 'LHR',
status: 'BKD',
xfbl: '<XFBL XML or IMP>',
fbl: '<FBL if sent>'
}
]
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings', 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://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings",
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([
'flightId' => 'QR001-20240101',
'bookings' => [
[
'awbNumber' => '157-12345678',
'pieces' => 10,
'weight' => 500,
'volume' => 2.1,
'origin' => 'DOH',
'destination' => 'LHR',
'status' => 'BKD',
'xfbl' => '<XFBL XML or IMP>',
'fbl' => '<FBL if sent>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings"
payload := strings.NewReader("{\n \"flightId\": \"QR001-20240101\",\n \"bookings\": [\n {\n \"awbNumber\": \"157-12345678\",\n \"pieces\": 10,\n \"weight\": 500,\n \"volume\": 2.1,\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"status\": \"BKD\",\n \"xfbl\": \"<XFBL XML or IMP>\",\n \"fbl\": \"<FBL if sent>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flightId\": \"QR001-20240101\",\n \"bookings\": [\n {\n \"awbNumber\": \"157-12345678\",\n \"pieces\": 10,\n \"weight\": 500,\n \"volume\": 2.1,\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"status\": \"BKD\",\n \"xfbl\": \"<XFBL XML or IMP>\",\n \"fbl\": \"<FBL if sent>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flightId\": \"QR001-20240101\",\n \"bookings\": [\n {\n \"awbNumber\": \"157-12345678\",\n \"pieces\": 10,\n \"weight\": 500,\n \"volume\": 2.1,\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"status\": \"BKD\",\n \"xfbl\": \"<XFBL XML or IMP>\",\n \"fbl\": \"<FBL if sent>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"flightId": "QR001-20240101",
"accepted": 1,
"failed": 0
}Operational Events & Manifests
Ingest Flight Booking List (XFBL/FBL)
Bulk ingestion of bookings from Airline FBL/XFBL.
POST
/
api
/
flights
/
{id}
/
bookings
Ingest Flight Booking List (XFBL/FBL)
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"flightId": "QR001-20240101",
"bookings": [
{
"awbNumber": "157-12345678",
"pieces": 10,
"weight": 500,
"volume": 2.1,
"origin": "DOH",
"destination": "LHR",
"status": "BKD",
"xfbl": "<XFBL XML or IMP>",
"fbl": "<FBL if sent>"
}
]
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings"
payload = {
"flightId": "QR001-20240101",
"bookings": [
{
"awbNumber": "157-12345678",
"pieces": 10,
"weight": 500,
"volume": 2.1,
"origin": "DOH",
"destination": "LHR",
"status": "BKD",
"xfbl": "<XFBL XML or IMP>",
"fbl": "<FBL if sent>"
}
]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
flightId: 'QR001-20240101',
bookings: [
{
awbNumber: '157-12345678',
pieces: 10,
weight: 500,
volume: 2.1,
origin: 'DOH',
destination: 'LHR',
status: 'BKD',
xfbl: '<XFBL XML or IMP>',
fbl: '<FBL if sent>'
}
]
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings', 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://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings",
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([
'flightId' => 'QR001-20240101',
'bookings' => [
[
'awbNumber' => '157-12345678',
'pieces' => 10,
'weight' => 500,
'volume' => 2.1,
'origin' => 'DOH',
'destination' => 'LHR',
'status' => 'BKD',
'xfbl' => '<XFBL XML or IMP>',
'fbl' => '<FBL if sent>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings"
payload := strings.NewReader("{\n \"flightId\": \"QR001-20240101\",\n \"bookings\": [\n {\n \"awbNumber\": \"157-12345678\",\n \"pieces\": 10,\n \"weight\": 500,\n \"volume\": 2.1,\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"status\": \"BKD\",\n \"xfbl\": \"<XFBL XML or IMP>\",\n \"fbl\": \"<FBL if sent>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flightId\": \"QR001-20240101\",\n \"bookings\": [\n {\n \"awbNumber\": \"157-12345678\",\n \"pieces\": 10,\n \"weight\": 500,\n \"volume\": 2.1,\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"status\": \"BKD\",\n \"xfbl\": \"<XFBL XML or IMP>\",\n \"fbl\": \"<FBL if sent>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/flights/{id}/bookings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flightId\": \"QR001-20240101\",\n \"bookings\": [\n {\n \"awbNumber\": \"157-12345678\",\n \"pieces\": 10,\n \"weight\": 500,\n \"volume\": 2.1,\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"status\": \"BKD\",\n \"xfbl\": \"<XFBL XML or IMP>\",\n \"fbl\": \"<FBL if sent>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"flightId": "QR001-20240101",
"accepted": 1,
"failed": 0
}Reference Documentation
For more information on FBL/XFBL booking ingestion, please refer to:
- Page 163 of “Functional_Requirements_V18 FINAL”: https://belli.sg/4htHWul
Authorizations
ApiKeyAuthApiKeyHeader
Path Parameters
Flight ID
Body
application/json
⌘I