Tracking Update Webhook

Content Response Parameters

 

ParameterDescriptionTypeLength
reference Reference details object  
ourReference System reference for the shipment string 50
yourReference Tracking reference for the shipment string 50
serviceType Service used for delivery string 50
trackingUrl URL to track the shipment string 2048
relatedItems List of items related with the shipment (currently supports ProofOfDelivery documents) object  
type Related item type (i.e. "ProofOfDelivery") string 50
value Related item value (i.e. "https://docs.mainfreight.com/DownloadHandler.ashx?Xg2EWGgs...) string  
carrierReferences List of tracking reference(s) provided by the carrier for a dispatched warehouse order object  
reference Tracking reference for the shipment string 50
carrierName Name of the carrier of the freight string 200
trackingUrl URL to track the shipment string 2048
events List of all the statuses the document has been through object  
event Event details object  
eventDateTime Date when the event happened datetime  
groupingLevel1Code Matches the worm status on public tracking result, see: www.mainfreight.com/track string 50
groupingLevel2Code Matches the hero status on the public tracking result, see: www.mainfreight.com/track string 50
code Event status' system name. This is an immutable value A full list of response codes can be found here string 50
displayName Event status' description string 50
location Status location object  
isEstimate Event is estimated when True. Estimated are future events bool  
sequence Represents which order the events happened. In this case, will be 0 as tracking webhook uses the references method which only returns the latest event. int  

 

Code Sample

JSON Example

"id": "56277dc8-6edc-444f-ad87-02f796527b83",
"metadata": {
"subscriptionId": "dee4556a-7kza-4f23-8h71-eb6f5b6f11e2",
"subscriptionTransportEventId": "kJc8efa3-0cf9-44f8-89d7-8ebhj38sb5dd",
"eventTypeCode": "StatusUpdateViaApi",
"serviceTypeCode": "AirAndOcean",
"referenceTypeCode": "JobNumber",
"eventCode": "GoodsDelivered"
},
"content": {
"reference": {
"ourReference": "S01234567",
"yourReference": "HOUSEBILL01",
"serviceType": "AirAndOcean",
"trackingUrl": "https://www.mainfreight.com/track/CW/S01234567",
"relatedItems": [],
"carrierReferences": [],
"events": [
{
"sequence": 0,
"eventDateTime": "2022-02-02T09:52:00",
"groupingLevel1Code": "Delivered",
"groupingLevel2Code": "Delivered",
"code": "CargoDelivered",
"displayName": "Cargo Delivered",
"location": "",
"isEstimate": false
}
],
"relatedReferences": [
{
"ourReference": "AC8VV177-1BB2-40E9-875D-633POQ4352F6",
"yourReference": "ABCD1234567",
"serviceType": "AirAndOcean",
"trackingUrl": "",
"relatedItems": [],
"carrierReferences": [],
"events": [
{
"sequence": 0,
"eventDateTime": "2022-02-02T09:52:00",
"groupingLevel1Code": "Delivered",
"groupingLevel2Code": "Delivered",
"code": "FullContainerDelivered",
"displayName": "Full Container Delivered",
"location": "",
"isEstimate": false
}
],
"relatedReferences": null
}
]
}
}
}

NOTE: Content in the panels below this point are not visible on the site unless used by other features e.g. gadgets, OB&E, etc.