Tracking Modes: Reference and Inline

Starting from version 2026-01, the trackings array on a fulfillment supports two mutually exclusive modes. Choosing the wrong mode could be one of the common issue when integrating with the Commerce API, you may use this guide for the troubleshooting.


Create the tracking with the Tracking API first, then reference its ID from the fulfillment.

Step 1 — create the tracking with the Tracking API:

preparing...

Here id is an identifier you define yourself. If you omit it, AfterShip generates one and you need to read it from the response.

Step 2 — reference it when creating the fulfillment:

preparing...

In this mode the courier, tracking number, ship date, custom fields and other shipment attributes all come from the tracking record in the Tracking API. Passing any other field inside trackings[] has no effect.

Provide the tracking number directly, without creating a tracking:

preparing...

Inline Mode fits exactly one scenario: you already track the parcel somewhere else, and you only want the tracking number stored alongside the order for reference.

CapabilityReference ModeInline Mode
Tracking checkpointsYesNo
Visible in the Tracking dashboardYesNo
Email / SMS shipment notificationsYesNo
Shipment status on the Branded Tracking PageYesNo
Webhook eventsYesNo
Estimated Delivery Date (EDD)YesNo
Shipment details in the Apple Wallet order passYesNo
Tracking number recorded on the orderYesYes
Consumes tracking quotaYesNo
  • Within a single tracking object, id and tracking_number cannot both be present. The request is rejected if they are.
  • Reference Mode requires only id.
  • In Inline Mode, tracking_number is required and slug is optional.
  • You can mix objects of both modes inside the same trackings array.
  • PATCH /fulfillments/{id} replaces the whole trackings array — it does not merge. Send the complete list you want to keep; anything omitted is removed.

GET endpoints return the trackings in the same shape you wrote them:

How it was writtenWhat is returned
Reference ModeOnly id — the custom ID you passed in
Inline Modetracking_number and slug; id is not returned

The AfterShip internal tracking UUID is never exposed through the Commerce API.

This is usually one of the following two causes.

Check the request body you posted:

  • You sent trackings[].id — this is Reference Mode, and the shipment should be visible.
  • You sent trackings[].tracking_number — this is Inline Mode, and not seeing the shipment is expected. Switch to Reference Mode.

The same cause explains most reports of "the API returned 201 but no webhook fired" or "my customer did not receive the notification email".

Every Commerce API resource belongs to a store. After you create a store, you still need to contact the AfterShip support team or your customer success manager to configure and enable the Tracking feature for that store. This is a separate step from any AfterShip product you have already subscribed to, and it is easy to miss.

Until it is done, your data does not flow into AfterShip Tracking. See API Quick Start — Activating the store for the full instructions.

In 2025-07 and earlier, tracking_number inside trackings[] was required, and the Commerce API created the tracking for you automatically.

Starting from 2026-01 that automatic creation has been removed. The exact same request body creates a tracking on the older versions, but is treated as Inline Mode — a record only — on 2026-01 and 2026-07.

If new shipments stopped appearing in your Tracking dashboard after an upgrade, and notifications and webhooks went quiet, this is why. The fix is to switch to Reference Mode.