Skip to main content

Tracking

Track any shipment across all supported carriers using a single API call. FlexOps normalizes tracking events from every carrier into a consistent format.

Shipment lifecycle

Every shipment follows this state machine. FlexOps fires webhook events at each transition:

Get tracking status

curl -X GET https://api.flexops.io/v1/tracking/9400111899223456789012 \
-H "X-API-Key: your-api-key"
{
"trackingNumber": "9400111899223456789012",
"carrier": "usps",
"status": "in_transit",
"estimatedDelivery": "2026-03-12T17:00:00Z",
"events": [
{
"timestamp": "2026-03-10T14:30:00Z",
"status": "in_transit",
"description": "Arrived at USPS Regional Facility",
"location": {
"city": "Salt Lake City",
"state": "UT",
"country": "US"
}
},
{
"timestamp": "2026-03-10T08:00:00Z",
"status": "accepted",
"description": "Accepted at USPS Origin Facility",
"location": {
"city": "Denver",
"state": "CO",
"country": "US"
}
}
]
}

Tracking statuses

StatusDescriptionWebhook event
pre_transitLabel created, not yet scannedlabel.created
acceptedCarrier has accepted the packagetracking.updated
in_transitPackage is moving through the networktracking.updated
out_for_deliveryOn the delivery vehicletracking.updated
deliveredSuccessfully deliveredtracking.delivered
failed_attemptDelivery attempted but unsuccessfultracking.exception
returnedPackage is being returned to sendertracking.updated
exceptionIssue with delivery (held, damaged, etc.)tracking.exception

Carrier-specific notes

Carrier detection

FlexOps auto-detects the carrier from the tracking number format. You can also pass ?carrier=usps to skip auto-detection for faster responses.

CarrierTracking number formatUpdate frequency
USPS20-34 digitsEvery 1-4 hours
FedEx12-15 digitsEvery 30-60 minutes
UPS1Z + 16 alphanumericEvery 15-30 minutes
DHL10 digitsEvery 2-6 hours
Canada Post16 digitsEvery 2-4 hours

Webhook notifications

Instead of polling, subscribe to tracking webhooks to receive real-time updates. See Webhooks.