Postman collection
Orderlines Read

pixiCanUpdateOrderline

Returns the status of an order line and whether it can still be changed or cancelled.

Looks up the order line given by OrderlineKey in Orderlines and joins its status code to OrderStates to get the status text.

The column CanCancel is 1 only if all of these conditions are met:

  • the status is not a final state (FinalState of the status is N or not set),
  • the status is not EIN,
  • the order line is not referenced in any box item (boxitems.OrderLineRef), i.e. it has not been packed,
  • the order line is not referenced in any invoice line (Invlines.OrderLineRef), i.e. it has not been invoiced.

Otherwise CanCancel is 0.

If the order line does not exist, or its status has no entry in OrderStates (inner join), no row is returned.

Notes

All tables are read with NOLOCK, so the result can reflect uncommitted data. The call only checks; it does not change the order line. An empty result means the order line key is unknown (or its status is missing in OrderStates), not that it cannot be cancelled.

Tables used

Orderlines · Read OrderStates · Read boxitems · Read Invlines · Read
SQL object:
dbo.pipiCanUpdateOrderline
Updated at 2026-10-30