Skip to content

Tracking

Mehrdad Pajuhaan edited this page Oct 23, 2026 · 1 revision

Tracking

When your ERP hands a shipment to a carrier, it can attach the carrier's tracking code and tracking URL to the order. This page shows the request and a working example.

Endpoint

PUT https://api.selldone.com/shops/{shop-id-here}/process-center/baskets/{order-id-here}/tracking

Send JSON with Authorization: Bearer <token>.

Parameters:

Parameter Required Description
tracking_code Optional The tracking code of the order (any string).
tracking_url Optional The tracking URL of the order (must be a valid URL).

Example

curl -X PUT "https://api.selldone.com/shops/12345/process-center/baskets/67890/tracking" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -H "Authorization: Bearer abcdef123456" \
     -d '{
           "tracking_code": "1Z999AA10123456784",
           "tracking_url": "https://example.com/track/1Z999AA10123456784"
         }'

JavaScript, as used by the demo page (empty fields are left out of the body):

const body = {
  ...(trackingCode && { tracking_code: trackingCode }),
  ...(trackingUrl && { tracking_url: trackingUrl }),
};

const res = await fetch(
  `https://api.selldone.com/shops/${shopId}/process-center/baskets/${orderId}/tracking`,
  {
    method: "PUT",
    headers: {
      Authorization: `Bearer ${token}`,
      "Content-Type": "application/json",
      Accept: "application/json",
    },
    body: JSON.stringify(body),
  }
);

When to call it

Set tracking after the order is shipped, typically right after you move it to SentOrder (see Order Statuses). If the shipment comes back, report it with the delivery-returned endpoint.

Try it

Set Order Tracking Demo: enter the shop ID, token and order ID plus a tracking code and/or URL, then click Update Order. You can prefill the IDs with ?shopId=<shop_id>&orderId=<order_id>.

Next steps

Clone this wiki locally