- Previous: Shipment Tracking
- Up: Public APIs
- Next: Routing Offer
Shipment Tracking Subscribe
The Shipment Tracking Subscribe API enables you to receive automatic updates on the status of a shipment. You may subscribe for a selected AWB and every time the shipment reaches a new milestone you will be automatically notified via the API.
The structures of all-sub-services of the Station Information API are defined in a Swagger. You can find the respective Swagger in our Interactive API.
Create a subscription
Create a subscription per AWB number for which you would like to get automatic tracking status updates.
Prerequisites
Prior to the creation of a subscription, we will call your provided callback URL with an HTTP OPTIONS call.
In the response, we require the HTTP Allow Header which allows a HTTP POST to this endpoint.
e.g.
Request: > OPTIONS https://yoursoftwaresolution.com/lufthansacargo/trackingCallback > ... Response: < ... < Allow: OPTIONS, GET, HEAD, POST < ...
Request URI
POST https://api.lufthansa-cargo.com/lh/handling/shipment/subscribe
Request Body
Variable | Description | Format |
---|---|---|
awb | The Air Waybill Number (AWB) | AWB prefix: 3-digit : [0-9]{3} e.g. 020 AWB number: 8-digit [0-9]{8} e.g. 08002050 |
callback | The callback URL from your system. Please note that you must inform which Callback URLs you want to use | String |
states | AWB status you are interested in. Possible Values: * (all changes), RCS (shipment physically received from shipper/ agent), MAN (shipment manifested on flight), DEP (shipment departed on flight), ARR (shipment arrived from flight), RCF (shipment physically received from flight), NFD (agent/consignee informed of shipment arrival), DLV (shipment delivered to agent/ consignee), DDL (shipment delivered to the consignee’s door), RCT (shipment received from another airline), TFD (shipment transferred to another airline), DIS (discrepancy: offload, shortshipped, missing cargo or found cargo), TOA (TOA change information) |
String |
Response body
Variable | Description | Format |
---|---|---|
subscriptionId | UUIDv4 of the subscription | String |
AWB | The Air Waybill Number (AWB) | AWB prefix: 3-digit : [0-9]{3} e.g. 020 AWB number: 8-digit [0-9]{8} e.g. 08002050 |
Callback | The callback URL from your system. Please note that you must inform which Callback URLs you want to use | String |
States | AWB status you are interested in. Can be: * (all changes), RCS (shipment physically received from shipper/ agent), MAN (shipment manifested on flight), DEP (shipment departed on flight), ARR (shipment arrived from flight), RCF (shipment physically received from flight), NFD (agent/consignee informed of shipment arrival), DLV (shipment delivered to agent/ consignee), DDL (shipment delivered to the consignee’s door), RCT (shipment received from another airline), TFD (shipment transferred to another airline), TOA (TOA change information) |
String |
Get subscription details
You can get the details for a given subscription
Request URI
GET https://api.lufthansa-cargo.com/lh/handling/shipment/subscribe/{subscriptionId}
Request parameters
Variable | Description | Format |
---|---|---|
{subscriptionId} | UUIDv4 of the subscription | String |
Response body
Variable | Description | Format |
---|---|---|
subscriptionId | UUIDv4 of the subscription | String |
AWB | The Air Waybill Number (AWB) | AWB prefix: 3-digit : [0-9]{3} e.g. 020 AWB number: 8-digit [0-9]{8} e.g. 08002050 |
Callback | The callback URL from your system. Please note that you must inform which Callback URLs you want to use | String |
States | AWB status you are interested in. Can be: * (all changes), RCS (shipment physically received from shipper/agent), MAN (shipment manifested on flight), DEP (shipment departed on flight), ARR (shipment arrived from flight), RCF (shipment physically received from flight), NFD (agent/consignee informed of shipment arrival), DLV (shipment delivered to agent/consignee), DDL (shipment delivered to the consignee’s door), RCT (shipment received from another airline), TFD (shipment transferred to another airline), TOA (TOA change information) |
String |
Update a subscription
You can update the subscription.
Request URI
PUT https://api.lufthansa-cargo.com/lh/handling/shipment/subscribe/{subscriptionId}
Request parameter
Variable | Description | Format |
---|---|---|
{subscriptionId} | UUIDv4 of the subscription | String |
Request body
Variable | Description | Format |
---|---|---|
subscriptionId | UUIDv4 of the subscription | String |
AWB | The Air Waybill Number (AWB) | AWB prefix: 3-digit : [0-9]{3} e.g. 020 AWB number: 8-digit [0-9]{8} e.g. 08002050 |
Callback | The callback URL from your system. Please note that you must inform which Callback URLs you want to use | String |
States | AWB Status you are interested in. Can be: * (all changes), RCS (shipment physically received from shipper/ agent), MAN (shipment manifested on flight), DEP (shipment departed on flight), ARR (shipment arrived from flight), RCF (shipment physically received from flight), NFD (agent/consignee informed of shipment arrival), DLV (shipment delivered to agent/ consignee), DDL (shipment delivered to the consignee’s door), RCT (shipment received from another airline), TFD (shipment transferred to another airline), TOA (TOA change information) |
String |
Response body
Variable | Description | Format |
---|---|---|
subscriptionId | UUIDv4 of the subscription | String |
AWB | The Air Waybill Number (AWB) | AWB prefix: 3-digit : [0-9]{3} e.g. 020 AWB number: 8-digit [0-9]{8} e.g. 08002050 |
Callback | The callback URL from your system. Please note that you must inform which Callback URLs you want to use | String |
States | AWB Status you are interested in. Can be:* (all changes), RCS (shipment physically received from shipper/ agent), MAN (shipment manifested on flight), DEP (shipment departed on flight), ARR (shipment arrived from flight), RCF (shipment physically received from flight), NFD (agent/consignee informed of shipment arrival), DLV (shipment delivered to agent/ consignee), DDL (shipment delivered to the consignee’s door), RCT (shipment received from another airline), TFD (shipment transferred to another airline), TOA (TOA change information) |
String |
Delete a subscription
You can delete a subscription in case you no longer need it
Request URI
DELETE https://api.lufthansa-cargo.com/lh/handling/shipment/subscribe/{subscriptionId}
Request parameters
Variable | Description | Format |
---|---|---|
{subscriptionId} | UUIDv4 of the subscription | String |
Response
In case your request was processed correctly, you will receive a HTTP status code
204 - no content
What we will send you
As soon as an update for your subscribed AWB is available, we will POST this JSON to your callback URL. Then you should call the ShipmentTracking API to get full shipment status.
In rare cases the push notification is faster then the processing in ShipmentTracking API, so that the ShipmentTracking API returns the status before (old status). We recommend to wait few seconds, f.e. 10s, after the push notification and then call ShipmentTracking API. Also we recommend after creating a booking to wait 10s and then create a subscription.
Variable | Description | Format |
---|---|---|
subscriptionId | UUIDv4 of the subscription | String |
AWB | The Air Waybill Number | AWB prefix: 3-digit : [0-9]{3} e.g. 020 AWB number: 8-digit [0-9]{8} e.g. 08002050 |
State | AWB State you are interested in. Can be: * (all changes), RCS (shipment physically received from shipper/ agent), MAN (shipment manifested on flight), DEP (shipment departed on flight), ARR (shipment arrived from flight), RCF (shipment physically received from flight), NFD (agent/consignee informed of shipment arrival), DLV (shipment delivered to agent/ consignee), DDL (shipment delivered to the consignee’s door), RCT (shipment received from another airline), TFD (shipment transferred to another airline), TOA (TOA change information) |
String |
toaTimestamp | In case the AWB receives a new TOA (state=TOA), this field will be filled with the new TOA | Timestamp or NULL |
timestamp | Timestamp when the API backend receives the status event notification | Timestamp |
- Previous: Shipment Tracking
- Up: Public APIs
- Next: Routing Offer
0 Comments
Please sign in to post a comment.