Utilize EasyPost's Tracking API to provide real-time shipment updates to you and your customers. Own the customer experience with branded tracking pages, empower your business with informed delivery estimates, and increase customer satisfaction with accurate shipping notifications.
# Import the EasyPost client.
import easypost
# Setup the client with your API key.
easypost.api_key = '259DA788-39A3-439E-BA1E-BC541B8BA520'
# Create a tracker from a tracking code.
easypost.Tracker.create(
tracking_code="EZ1000000001",
carrier="USPS"
)
{
"id": "trk_7e8f102cba904f9c90693957a91862b7",
"object": "Tracker",
"created_at": "2020-02-08T21:39:12Z",
"updated_at": "2020-02-08T21:39:12Z",
"mode": "test",
"tracking_code": "EZ1000000001",
"carrier": "USPS",
"public_url": "https://track.easypost.com/djE6dHJrXzdlOGYxMDJjYmE5MDRmOWM5MDY5Mzk1N2E5MTg2MmI3",
"status": "pre_transit",
"est_delivery_date": "2020-02-08T21:39:12Z",
"status_detail": "status_update",
"is_return": false,
"tracking_details": [
{
"carrier_code": null,
"datetime": "2020-01-08T21:39:12Z",
"description": null,
"message": "Pre-Shipment Info Sent to USPS",
"object": "TrackingDetail",
"source": "USPS",
"status": "pre_transit",
"status_detail": "status_update",
"tracking_location": {
"city": null,
"country": null,
"object": "TrackingLocation",
"state": null,
"zip": null
}
},
{
"carrier_code": null,
"datetime": "2020-01-09T10:16:12Z",
"description": null,
"message": "Shipping Label Created",
"object": "TrackingDetail",
"source": "USPS",
"status": "pre_transit",
"status_detail": "status_update",
"tracking_location": {
"city": "HOUSTON",
"country": null,
"object": "TrackingLocation",
"state": "TX",
"zip": "77063"
}
}
],
"carrier_detail": {
"alternate_identifier": null,
"container_type": null,
"destination_location": "CHARLESTON SC, 29401",
"destination_tracking_location": null,
"est_delivery_date_local": null,
"est_delivery_time_local": null,
"guaranteed_delivery_date": null,
"initial_delivery_attempt": null,
"object": "CarrierDetail",
"origin_location": "HOUSTON TX, 77001",
"origin_tracking_location": {
"city": "HOUSTON",
"country": null,
"object": "TrackingLocation",
"state": "TX",
"zip": "77063"
},
"service": "First-Class Package Service"
},
"fees": [
{
"amount": "0.00000",
"charged": false,
"object": "Fee",
"refunded": false,
"type": "TrackerFee"
}
],
"shipment_id": null,
"signed_by": null,
"weight": null
}
Take a look at our documentation and start building with one of our helper libraries (Python, PHP, Ruby, Node.js, Java, and more). Avoid month-long integrations and start simplifying your shipping in minutes with EasyPost.