Hoppa till huvudinnehåll

Line status derived from the quantities

2026-11-14 · Breaking change · Upcoming: not yet in production

lineStatus of GET /api/v1/orders/{id} and of the line POST /api/v1/orders/{id}/lines returns has seven fixed values instead of free strings: Open, PartiallyShipped, Shipped, Delivered, PartiallyReturned, Returned and Cancelled, never null.

What changed

  • It is derived from the line's quantities: Cancelled when all ordered is cancelled; otherwise the first that holds: Returned when returned equals shipped and is above 0, PartiallyReturned when returned is above 0, Delivered or Shipped when delivered or shipped equals ordered minus cancelled, PartiallyShipped when shipped is above 0, else Open. Invoiced never affects it.
  • Every existing line got the status its quantities give, and its old value is kept in the order timeline as order.line_status_migrated with orderLineId, previousLineStatus and lineStatus.
  • Added with this change, not breaking: quantities.remaining (ordered minus cancelled minus shipped, never below 0), and orders.line_quantities_changed.v1 in the order timeline for every change of a line's quantities. It is not a webhook.

Affected operations

  • GET /api/v1/orders/{id}
  • POST /api/v1/orders/{id}/lines
  • GET /api/v1/orders/{id}/timeline

What you do

  • Read the seven values, and stop reading Active or your own values.

How breaking changes are announced and how long a deprecated endpoint stays: see the versioning policy.