# Track API

Version: 1.0.0

## Servers

```
https://app.useonward.com
```

## Download OpenAPI description

[Track API](https://docs.useonward.com/_bundle/apis/track.yaml)

## Orders

### Get order details

 - [GET /api/order](https://docs.useonward.com/apis/track/orders/getorder.md): Retrieves order details including shipments, line items, and tracking information.

Orders can be looked up using one of three methods:
1. By order key
2. By order number and email address (both required together)
3. By tracking number

When more than one lookup parameter is supplied, key takes precedence over order_number/email, which takes precedence over tracking_number.

Alongside the per-fulfillment shipments[] view, the response includes a package-aware packages[] array — one entry per physical package, each with its carrier tracking links, a raw current_status, a customer-friendly current_status_label, delivery estimates, a tracking timeline, and its line items. Three order-level signals are also included: has_shippable_items, unfulfilled_line_items, and has_fulfillment_without_tracking.

If a shipment's enrichment_status is pending, the response may have an empty events array while Onward is still fetching the latest carrier tracking data. Poll GET /api/order/enrichment_status (which does not re-trigger enrichment) and refetch this endpoint once it reports all_settled: true, or render whatever data is already present. Enrichment settles within ~15 seconds.

### Poll shipment enrichment status

 - [GET /api/order/enrichment_status](https://docs.useonward.com/apis/track/orders/getorderenrichmentstatus.md): Lightweight poll target for clients waiting on Onward to finish fetching carrier tracking data. Returns the enrichment_status of each shipment on the order plus an all_settled flag, without the full order payload.

Unlike GET /api/order, this endpoint is read-only — it never triggers enrichment. While enrichment is in progress (a shipment reports enrichment_status: "pending" from GET /api/order), poll this endpoint, then refetch GET /api/order once all_settled is true to pick up the enriched events. Enrichment settles within ~15 seconds.

Orders are looked up with the same parameters as GET /api/order.

