Push shipment events
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/shipments/{awb}/events \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"eventType": "RCS",
"eventDate": "2024-01-01T08:00:00Z",
"location": "DOH",
"pieces": 10,
"weight": 500,
"notes": "Cargo received at origin"
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/shipments/{awb}/events"
payload = {
"eventType": "RCS",
"eventDate": "2024-01-01T08:00:00Z",
"location": "DOH",
"pieces": 10,
"weight": 500,
"notes": "Cargo received at origin"
}
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({
eventType: 'RCS',
eventDate: '2024-01-01T08:00:00Z',
location: 'DOH',
pieces: 10,
weight: 500,
notes: 'Cargo received at origin'
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/shipments/{awb}/events', 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/shipments/{awb}/events",
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([
'eventType' => 'RCS',
'eventDate' => '2024-01-01T08:00:00Z',
'location' => 'DOH',
'pieces' => 10,
'weight' => 500,
'notes' => 'Cargo received at origin'
]),
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/shipments/{awb}/events"
payload := strings.NewReader("{\n \"eventType\": \"RCS\",\n \"eventDate\": \"2024-01-01T08:00:00Z\",\n \"location\": \"DOH\",\n \"pieces\": 10,\n \"weight\": 500,\n \"notes\": \"Cargo received at origin\"\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/shipments/{awb}/events")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventType\": \"RCS\",\n \"eventDate\": \"2024-01-01T08:00:00Z\",\n \"location\": \"DOH\",\n \"pieces\": 10,\n \"weight\": 500,\n \"notes\": \"Cargo received at origin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/shipments/{awb}/events")
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 \"eventType\": \"RCS\",\n \"eventDate\": \"2024-01-01T08:00:00Z\",\n \"location\": \"DOH\",\n \"pieces\": 10,\n \"weight\": 500,\n \"notes\": \"Cargo received at origin\"\n}"
response = http.request(request)
puts response.read_body{
"eventId": "event-123",
"awbNumber": "15712345678",
"eventType": "RCS",
"recordedAt": "2024-01-01T08:00:00Z"
}Tracking
Post Shipment Events
Push status events (RCS, MAN, DEP, ARR, etc.) with XFSU equivalents
POST
/
api
/
shipments
/
{awb}
/
events
Push shipment events
curl --request POST \
--url https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/shipments/{awb}/events \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"eventType": "RCS",
"eventDate": "2024-01-01T08:00:00Z",
"location": "DOH",
"pieces": 10,
"weight": 500,
"notes": "Cargo received at origin"
}
'import requests
url = "https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/shipments/{awb}/events"
payload = {
"eventType": "RCS",
"eventDate": "2024-01-01T08:00:00Z",
"location": "DOH",
"pieces": 10,
"weight": 500,
"notes": "Cargo received at origin"
}
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({
eventType: 'RCS',
eventDate: '2024-01-01T08:00:00Z',
location: 'DOH',
pieces: 10,
weight: 500,
notes: 'Cargo received at origin'
})
};
fetch('https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/shipments/{awb}/events', 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/shipments/{awb}/events",
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([
'eventType' => 'RCS',
'eventDate' => '2024-01-01T08:00:00Z',
'location' => 'DOH',
'pieces' => 10,
'weight' => 500,
'notes' => 'Cargo received at origin'
]),
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/shipments/{awb}/events"
payload := strings.NewReader("{\n \"eventType\": \"RCS\",\n \"eventDate\": \"2024-01-01T08:00:00Z\",\n \"location\": \"DOH\",\n \"pieces\": 10,\n \"weight\": 500,\n \"notes\": \"Cargo received at origin\"\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/shipments/{awb}/events")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventType\": \"RCS\",\n \"eventDate\": \"2024-01-01T08:00:00Z\",\n \"location\": \"DOH\",\n \"pieces\": 10,\n \"weight\": 500,\n \"notes\": \"Cargo received at origin\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://1a557de0-701c-477d-bedd-433520441dae.mock.pstmn.io/api/shipments/{awb}/events")
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 \"eventType\": \"RCS\",\n \"eventDate\": \"2024-01-01T08:00:00Z\",\n \"location\": \"DOH\",\n \"pieces\": 10,\n \"weight\": 500,\n \"notes\": \"Cargo received at origin\"\n}"
response = http.request(request)
puts response.read_body{
"eventId": "event-123",
"awbNumber": "15712345678",
"eventType": "RCS",
"recordedAt": "2024-01-01T08:00:00Z"
}Reference Documentation
For more information on departure and offload status updates, please refer to:
- Pages 226-232 of “Functional_Requirements_V18 FINAL”: https://belli.sg/4nxxCDR
Authorizations
ApiKeyAuthApiKeyHeader
Path Parameters
AWB number
Body
application/json
⌘I