Create HAWB
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"hawbNumber": "H001",
"mawbNumber": "15712345678",
"pieces": 5,
"weight": 250,
"shipper": {
"name": "Example Corp",
"address": "123 Main St, City, Country",
"contact": "contact@example.com"
},
"consignee": {
"name": "Example Corp",
"address": "123 Main St, City, Country",
"contact": "contact@example.com"
}
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb"
payload = {
"hawbNumber": "H001",
"mawbNumber": "15712345678",
"pieces": 5,
"weight": 250,
"shipper": {
"name": "Example Corp",
"address": "123 Main St, City, Country",
"contact": "contact@example.com"
},
"consignee": {
"name": "Example Corp",
"address": "123 Main St, City, Country",
"contact": "contact@example.com"
}
}
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({
hawbNumber: 'H001',
mawbNumber: '15712345678',
pieces: 5,
weight: 250,
shipper: {
name: 'Example Corp',
address: '123 Main St, City, Country',
contact: 'contact@example.com'
},
consignee: {
name: 'Example Corp',
address: '123 Main St, City, Country',
contact: 'contact@example.com'
}
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb', 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",
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([
'hawbNumber' => 'H001',
'mawbNumber' => '15712345678',
'pieces' => 5,
'weight' => 250,
'shipper' => [
'name' => 'Example Corp',
'address' => '123 Main St, City, Country',
'contact' => 'contact@example.com'
],
'consignee' => [
'name' => 'Example Corp',
'address' => '123 Main St, City, Country',
'contact' => 'contact@example.com'
]
]),
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"
payload := strings.NewReader("{\n \"hawbNumber\": \"H001\",\n \"mawbNumber\": \"15712345678\",\n \"pieces\": 5,\n \"weight\": 250,\n \"shipper\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n },\n \"consignee\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\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")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"hawbNumber\": \"H001\",\n \"mawbNumber\": \"15712345678\",\n \"pieces\": 5,\n \"weight\": 250,\n \"shipper\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n },\n \"consignee\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb")
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 \"hawbNumber\": \"H001\",\n \"mawbNumber\": \"15712345678\",\n \"pieces\": 5,\n \"weight\": 250,\n \"shipper\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n },\n \"consignee\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"hawbNumber": "H001",
"mawbNumber": "15712345678",
"status": "created"
}Shipment Documents
Create HAWB
Create and submit HAWB with FHL/XFZB data
POST
/
api
/
hawb
Create HAWB
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"hawbNumber": "H001",
"mawbNumber": "15712345678",
"pieces": 5,
"weight": 250,
"shipper": {
"name": "Example Corp",
"address": "123 Main St, City, Country",
"contact": "contact@example.com"
},
"consignee": {
"name": "Example Corp",
"address": "123 Main St, City, Country",
"contact": "contact@example.com"
}
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb"
payload = {
"hawbNumber": "H001",
"mawbNumber": "15712345678",
"pieces": 5,
"weight": 250,
"shipper": {
"name": "Example Corp",
"address": "123 Main St, City, Country",
"contact": "contact@example.com"
},
"consignee": {
"name": "Example Corp",
"address": "123 Main St, City, Country",
"contact": "contact@example.com"
}
}
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({
hawbNumber: 'H001',
mawbNumber: '15712345678',
pieces: 5,
weight: 250,
shipper: {
name: 'Example Corp',
address: '123 Main St, City, Country',
contact: 'contact@example.com'
},
consignee: {
name: 'Example Corp',
address: '123 Main St, City, Country',
contact: 'contact@example.com'
}
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb', 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",
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([
'hawbNumber' => 'H001',
'mawbNumber' => '15712345678',
'pieces' => 5,
'weight' => 250,
'shipper' => [
'name' => 'Example Corp',
'address' => '123 Main St, City, Country',
'contact' => 'contact@example.com'
],
'consignee' => [
'name' => 'Example Corp',
'address' => '123 Main St, City, Country',
'contact' => 'contact@example.com'
]
]),
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"
payload := strings.NewReader("{\n \"hawbNumber\": \"H001\",\n \"mawbNumber\": \"15712345678\",\n \"pieces\": 5,\n \"weight\": 250,\n \"shipper\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n },\n \"consignee\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\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")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"hawbNumber\": \"H001\",\n \"mawbNumber\": \"15712345678\",\n \"pieces\": 5,\n \"weight\": 250,\n \"shipper\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n },\n \"consignee\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/hawb")
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 \"hawbNumber\": \"H001\",\n \"mawbNumber\": \"15712345678\",\n \"pieces\": 5,\n \"weight\": 250,\n \"shipper\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n },\n \"consignee\": {\n \"name\": \"Example Corp\",\n \"address\": \"123 Main St, City, Country\",\n \"contact\": \"contact@example.com\"\n }\n}"
response = http.request(request)
puts response.read_body{
"hawbNumber": "H001",
"mawbNumber": "15712345678",
"status": "created"
}Create/submit House Air Waybill (HAWB) with FHL/XFZB data.
Reference Documentation
For more information on HAWB creation with FHL/XFZB format, please refer to:
- Pages 40-44 of “Functional_Requirements_V18 FINAL”: https://belli.sg/4nxxCDR
Authorizations
ApiKeyAuthApiKeyHeader
Body
application/json
⌘I