Tracking
When a shipment is created, the API response will include a tracking number from the specified carrier.
With eHub's API there are two different ways to receive tracking events.
- Manually
- Make a GET request to /shipments request to retrieve the shipment and all tracking events will be returned in the response.
- Webhook
- Subscribe to the shipment tracking webhook and receive tracking events as they are sent to eHub.
Shipment Example tracking_info Array
The tracking_info array provides detailed information about the shipment's tracking status. This includes the shipment's current status, any updates on the shipment's location, and a list of tracking events that document the progress of the parcel through the carrier's network.
"tracking_info": { "status": "manifested", "updated_at": "2024-08-16T12:00:00.000Z", "estimated_delivery_date": null, "delivery_date": null, "tracking_events": [ { "event_date": "2024-08-16T12:00:00.000Z", "status": "manifested", "description": "Shipment information sent to FedEx (Processed by shipper and loaded in truck)", "city": "BUFFALO", "state": "NY", "postal_code": "14216", "country": "US" }, { "event_date": "2024-08-16T08:13:57.000Z", "status": "manifested", "description": "Shipment information sent to FedEx", "city": null, "state": null, "postal_code": null, "country": null } ]}
Webhook Example tracking_events Array
The tracking_events array in the webhook response provides a real-time record of all tracking updates related to a shipment. Each event includes details such as the date, status, description of the event (e.g., "Out for Delivery"), and location information like city, state, postal code, and country. This allows you to monitor a shipment's journey as updates are received directly from the carrier.
{ "tracking_events": [ { "event_date": "2021-08-06T10:06:00.000Z", "status": "available_for_pickup", "description": "Available for Pickup", "city": "MALTA", "state": "MT", "postal_code": "59538", "country": "US" }, { "event_date": "2021-08-06T08:41:00.000Z", "status": "out_for_delivery", "description": "Out for Delivery, Expected Delivery by 9:00pm", "city": "MALTA", "state": "MT", "postal_code": "59538", "country": "US" }, { "event_date": "2021-08-06T08:30:00.000Z", "status": "in_transit", "description": "Arrived at Post Office", "city": "MALTA", "state": "MT", "postal_code": "59538", "country": "US" } ]}On this page
- Tracking