Guides
Track Shipments

Track Shipments

Set tracking info on orders and get real-time delivery updates.

Set tracking after shipping

When you ship an order (via your WMS, label printer, or manually), set the tracking number:

curl -X POST "https://api.spectradiag.com/api/v1/orders/1234/tracking" \
  -H "Authorization: Bearer spk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "tracking_number": "1Z999AA10123456789",
    "carrier": "UPS"
  }'

Then mark the order shipped:

curl -X PATCH "https://api.spectradiag.com/api/v1/orders/1234/status" \
  -H "Authorization: Bearer spk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{ "status": "shipped" }'

This fires:

  • order.status_changed (status: shipped)
  • order.shipped webhook
  • Customer shipping notification email (unless this is a test order)

Delivery webhooks

When the order is marked delivered, order.delivered fires:

{
  "event": "order.delivered",
  "timestamp": "2026-05-18T14:23:00+00:00",
  "data": {
    "id": 1234,
    "order_number": "ORD-20260515-0042",
    "tracking_number": "1Z999AA10123456789",
    "shipping_carrier": "UPS",
    "delivered_at": "2026-05-18T14:23:00Z"
  }
}

Automated tracking updates (coming soon)

Future versions will include:

  • Automatic polling of FedEx/UPS/USPS tracking APIs
  • Mid-transit events (out for delivery, delivery exception)
  • Automatic status sync from carrier events

For now, your integration should POST status changes when your carrier confirms delivery.

Recommended webhook subscriptions

For a full shipment lifecycle integration, subscribe to:

  • order.shipped
  • order.delivered
  • order.cancelled (to void labels)
curl -X POST "https://api.spectradiag.com/api/v1/webhooks" \
  -H "Authorization: Bearer spk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://myapp.com/shipment-webhook",
    "events": ["order.shipped", "order.delivered", "order.cancelled"]
  }'