Receive HAWB as Draft (XFZB/FHL)
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb/drafts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"awbNumber": "157-12345675",
"hawbNumber": "HAWB-0001",
"origin": "DOH",
"destination": "LHR",
"shipper": {
"name": "ACME Export",
"address": "123 Export Street"
},
"consignee": {
"name": "ACME UK",
"address": "456 Import Avenue"
},
"pieces": 5,
"weight": 250.5,
"volume": 1.2,
"goodsDescription": "Electronics",
"iataMessages": {
"xfzb": "<XFZB XML or IMP here>",
"fhl": "<FHL if sent>"
}
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb/drafts"
payload = {
"awbNumber": "157-12345675",
"hawbNumber": "HAWB-0001",
"origin": "DOH",
"destination": "LHR",
"shipper": {
"name": "ACME Export",
"address": "123 Export Street"
},
"consignee": {
"name": "ACME UK",
"address": "456 Import Avenue"
},
"pieces": 5,
"weight": 250.5,
"volume": 1.2,
"goodsDescription": "Electronics",
"iataMessages": {
"xfzb": "<XFZB XML or IMP here>",
"fhl": "<FHL 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({
awbNumber: '157-12345675',
hawbNumber: 'HAWB-0001',
origin: 'DOH',
destination: 'LHR',
shipper: {name: 'ACME Export', address: '123 Export Street'},
consignee: {name: 'ACME UK', address: '456 Import Avenue'},
pieces: 5,
weight: 250.5,
volume: 1.2,
goodsDescription: 'Electronics',
iataMessages: {xfzb: '<XFZB XML or IMP here>', fhl: '<FHL if sent>'}
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb/drafts', 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/hawb/drafts",
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([
'awbNumber' => '157-12345675',
'hawbNumber' => 'HAWB-0001',
'origin' => 'DOH',
'destination' => 'LHR',
'shipper' => [
'name' => 'ACME Export',
'address' => '123 Export Street'
],
'consignee' => [
'name' => 'ACME UK',
'address' => '456 Import Avenue'
],
'pieces' => 5,
'weight' => 250.5,
'volume' => 1.2,
'goodsDescription' => 'Electronics',
'iataMessages' => [
'xfzb' => '<XFZB XML or IMP here>',
'fhl' => '<FHL 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/hawb/drafts"
payload := strings.NewReader("{\n \"awbNumber\": \"157-12345675\",\n \"hawbNumber\": \"HAWB-0001\",\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"shipper\": {\n \"name\": \"ACME Export\",\n \"address\": \"123 Export Street\"\n },\n \"consignee\": {\n \"name\": \"ACME UK\",\n \"address\": \"456 Import Avenue\"\n },\n \"pieces\": 5,\n \"weight\": 250.5,\n \"volume\": 1.2,\n \"goodsDescription\": \"Electronics\",\n \"iataMessages\": {\n \"xfzb\": \"<XFZB XML or IMP here>\",\n \"fhl\": \"<FHL if sent>\"\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/hawb/drafts")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"awbNumber\": \"157-12345675\",\n \"hawbNumber\": \"HAWB-0001\",\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"shipper\": {\n \"name\": \"ACME Export\",\n \"address\": \"123 Export Street\"\n },\n \"consignee\": {\n \"name\": \"ACME UK\",\n \"address\": \"456 Import Avenue\"\n },\n \"pieces\": 5,\n \"weight\": 250.5,\n \"volume\": 1.2,\n \"goodsDescription\": \"Electronics\",\n \"iataMessages\": {\n \"xfzb\": \"<XFZB XML or IMP here>\",\n \"fhl\": \"<FHL if sent>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb/drafts")
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 \"awbNumber\": \"157-12345675\",\n \"hawbNumber\": \"HAWB-0001\",\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"shipper\": {\n \"name\": \"ACME Export\",\n \"address\": \"123 Export Street\"\n },\n \"consignee\": {\n \"name\": \"ACME UK\",\n \"address\": \"456 Import Avenue\"\n },\n \"pieces\": 5,\n \"weight\": 250.5,\n \"volume\": 1.2,\n \"goodsDescription\": \"Electronics\",\n \"iataMessages\": {\n \"xfzb\": \"<XFZB XML or IMP here>\",\n \"fhl\": \"<FHL if sent>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"hawbId": "hawb_01HXYZ",
"hawbNumber": "HAWB-0001",
"status": "draft",
"linkedAwb": "157-12345675"
}Shipment Documents
Receive HAWB as Draft (XFZB/FHL)
Ingest HAWB as a draft from XFZB/FHL sources before finalization.
POST
/
api
/
hawb
/
drafts
Receive HAWB as Draft (XFZB/FHL)
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb/drafts \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"awbNumber": "157-12345675",
"hawbNumber": "HAWB-0001",
"origin": "DOH",
"destination": "LHR",
"shipper": {
"name": "ACME Export",
"address": "123 Export Street"
},
"consignee": {
"name": "ACME UK",
"address": "456 Import Avenue"
},
"pieces": 5,
"weight": 250.5,
"volume": 1.2,
"goodsDescription": "Electronics",
"iataMessages": {
"xfzb": "<XFZB XML or IMP here>",
"fhl": "<FHL if sent>"
}
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb/drafts"
payload = {
"awbNumber": "157-12345675",
"hawbNumber": "HAWB-0001",
"origin": "DOH",
"destination": "LHR",
"shipper": {
"name": "ACME Export",
"address": "123 Export Street"
},
"consignee": {
"name": "ACME UK",
"address": "456 Import Avenue"
},
"pieces": 5,
"weight": 250.5,
"volume": 1.2,
"goodsDescription": "Electronics",
"iataMessages": {
"xfzb": "<XFZB XML or IMP here>",
"fhl": "<FHL 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({
awbNumber: '157-12345675',
hawbNumber: 'HAWB-0001',
origin: 'DOH',
destination: 'LHR',
shipper: {name: 'ACME Export', address: '123 Export Street'},
consignee: {name: 'ACME UK', address: '456 Import Avenue'},
pieces: 5,
weight: 250.5,
volume: 1.2,
goodsDescription: 'Electronics',
iataMessages: {xfzb: '<XFZB XML or IMP here>', fhl: '<FHL if sent>'}
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb/drafts', 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/hawb/drafts",
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([
'awbNumber' => '157-12345675',
'hawbNumber' => 'HAWB-0001',
'origin' => 'DOH',
'destination' => 'LHR',
'shipper' => [
'name' => 'ACME Export',
'address' => '123 Export Street'
],
'consignee' => [
'name' => 'ACME UK',
'address' => '456 Import Avenue'
],
'pieces' => 5,
'weight' => 250.5,
'volume' => 1.2,
'goodsDescription' => 'Electronics',
'iataMessages' => [
'xfzb' => '<XFZB XML or IMP here>',
'fhl' => '<FHL 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/hawb/drafts"
payload := strings.NewReader("{\n \"awbNumber\": \"157-12345675\",\n \"hawbNumber\": \"HAWB-0001\",\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"shipper\": {\n \"name\": \"ACME Export\",\n \"address\": \"123 Export Street\"\n },\n \"consignee\": {\n \"name\": \"ACME UK\",\n \"address\": \"456 Import Avenue\"\n },\n \"pieces\": 5,\n \"weight\": 250.5,\n \"volume\": 1.2,\n \"goodsDescription\": \"Electronics\",\n \"iataMessages\": {\n \"xfzb\": \"<XFZB XML or IMP here>\",\n \"fhl\": \"<FHL if sent>\"\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/hawb/drafts")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"awbNumber\": \"157-12345675\",\n \"hawbNumber\": \"HAWB-0001\",\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"shipper\": {\n \"name\": \"ACME Export\",\n \"address\": \"123 Export Street\"\n },\n \"consignee\": {\n \"name\": \"ACME UK\",\n \"address\": \"456 Import Avenue\"\n },\n \"pieces\": 5,\n \"weight\": 250.5,\n \"volume\": 1.2,\n \"goodsDescription\": \"Electronics\",\n \"iataMessages\": {\n \"xfzb\": \"<XFZB XML or IMP here>\",\n \"fhl\": \"<FHL if sent>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb/drafts")
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 \"awbNumber\": \"157-12345675\",\n \"hawbNumber\": \"HAWB-0001\",\n \"origin\": \"DOH\",\n \"destination\": \"LHR\",\n \"shipper\": {\n \"name\": \"ACME Export\",\n \"address\": \"123 Export Street\"\n },\n \"consignee\": {\n \"name\": \"ACME UK\",\n \"address\": \"456 Import Avenue\"\n },\n \"pieces\": 5,\n \"weight\": 250.5,\n \"volume\": 1.2,\n \"goodsDescription\": \"Electronics\",\n \"iataMessages\": {\n \"xfzb\": \"<XFZB XML or IMP here>\",\n \"fhl\": \"<FHL if sent>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"hawbId": "hawb_01HXYZ",
"hawbNumber": "HAWB-0001",
"status": "draft",
"linkedAwb": "157-12345675"
}Receive House Air Waybill (HAWB) as draft with FHL/XFZB data format.
Reference Documentation
For more information on HAWB draft handling with FHL/XFZB format, please refer to:
- Pages 196–197 of “Functional_Requirements_V18 FINAL”: https://belli.sg/3Lu7pYH
Authorizations
ApiKeyAuthApiKeyHeader
Body
application/json
Example:
"157-12345675"
Example:
"HAWB-0001"
Example:
"DOH"
Example:
"LHR"
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
5
Example:
250.5
Example:
1.2
Example:
"Electronics"
Show child attributes
Show child attributes
⌘I