Developer - Shipment Tracking Push

Shipment Tracking Push

The Shipment Tracking Push 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.

Developer - awb subscribe - POST request uri

Create a subscription

Create a subscription per AWB number for which you would like to get automatic tracking status updates.

Request URI

POST https://api.lhcargo.com/shipmentSubscribe

 

Request Body

VariableDescriptionFormat
AWBThe Air Waybill Number (AWB)AWB prefix: 3-digit : [0-9]{3} e.g. 020
AWB number: 8-digit [0-9]{8} e.g. 08002050
CallbackThe callback URL from your system. Please note that you must inform which Callback URLs you want to useString
StatesAWB 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

Request body example

{
  "awb": "020-12345678",
  "callback": "https://yoursoftwaresolution.com/lufthansacargo/trackingCallback",
  "states": "*"
} 

Response body

VariableDescriptionFormat
subscriptionIdUUIDv4 of the subscriptionString
AWBThe Air Waybill Number (AWB)AWB prefix: 3-digit : [0-9]{3} e.g. 020
AWB number: 8-digit [0-9]{8} e.g. 08002050
CallbackThe callback URL from your system. Please note that you must inform which Callback URLs you want to useString
StatesAWB 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 example

{
  "subscriptionId": "33a811bc-a165-4a88-a1c2-1c522ed89e28",
  "awb": "020-12345678",
  "callback": "https://yoursoftwaresolution.com/lufthansacargo/trackingCallback",
  "states": "*"
} 

Developer - awb subscribe - GET subscription details

Get subscription details

Request URI

GET https://api.lhcargo.com/shipmentSubscribe/{subscriptionId}

 

Request parameters

VariableDescriptionFormat
{subscriptionId}UUIDv4 of the subscriptionString

Request example

GET https://api.lhcargo.com/shipmentSubscribe/33a811bc-a165-4a88-a1c2-1c522ed89e28

 

Response body

VariableDescriptionFormat
subscriptionIdUUIDv4 of the subscriptionString
AWBThe Air Waybill Number (AWB)AWB prefix: 3-digit : [0-9]{3} e.g. 020
AWB number: 8-digit [0-9]{8} e.g. 08002050
CallbackThe callback URL from your system. Please note that you must inform which Callback URLs you want to useString
StatesAWB 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 example

{
  "subscriptionId": "33a811bc-a165-4a88-a1c2-1c522ed89e28",
  "awb": "020-12345678",
  "callback": "https://yoursoftwaresolution.com/lufthansacargo/trackingCallback",
  "states": "*"
} 

Developer - awb subscribe - Update a subscription

Update a subscription

You can update the subscription.

Request URI

PUT https://api.lhcargo.com/shipmentSubscribe/{subscriptionId}

 

Request parameter

VariableDescriptionFormat
{subscriptionId}UUIDv4 of the subscriptionString

Request body

VariableDescriptionFormat
subscriptionIdUUIDv4 of the subscriptionString
AWBThe Air Waybill Number (AWB)AWB prefix: 3-digit : [0-9]{3} e.g. 020
AWB number: 8-digit [0-9]{8} e.g. 08002050
CallbackThe callback URL from your system. Please note that you must inform which Callback URLs you want to useString
StatesAWB 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

Request body example

PUT https://api.lhcargo.com/shipmentSubscribe/33a811bc-a165-4a88-a1c2-1c522ed89e28

 

{
  "awb": "020-12345678",
  "callback": "https://yoursoftwaresolution.com/lufthansacargo/trackingCallback",
  "states": "DLV"
} 

Response body

VariableDescriptionFormat
subscriptionIdUUIDv4 of the subscriptionString
AWBThe Air Waybill Number (AWB)AWB prefix: 3-digit : [0-9]{3} e.g. 020
AWB number: 8-digit [0-9]{8} e.g. 08002050
CallbackThe callback URL from your system. Please note that you must inform which Callback URLs you want to useString
StatesAWB 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 example

{

  "subscriptionId": "33a811bc-a165-4a88-a1c2-1c522ed89e28",
  "awb": "020-12345678",
  "callback": "https://yoursoftwaresolution.com/lufthansacargo/trackingCallback",
  "states": "DLV"
} 

Developer - awb subscribe - DELETE subscription

Delete a subscription

You can delete a subscription in case you no longer need it 

Request URI

DELETE https://api.lhcargo.com/shipmentSubscribe/{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

Developer - awb subscribe - What we will send you

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. 

 

Example Request 

{
  "subscriptionId":"33a811bc-a165-4a88-a1c2-1c522ed89e28",
  "awb":"020-12345678",
  "state":"DLV",
  "toaTimestamp":null,
  "timestamp":"2020-01-20T11:29:57.519Z"
} 

 

VariableDescriptionFormat
subscriptionIdUUIDv4 of the subscriptionString
AWBThe Air Waybill NumberAWB prefix: 3-digit : [0-9]{3} e.g. 020
AWB number: 8-digit [0-9]{8} e.g. 08002050
StateAWB 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
toaTimestampIn case the AWB receives a new TOA (state=TOA), this field will be filled with the new TOATimestamp or NULL
timestampTimestamp when the API backend receives the status event notificationTimestamp