Line quantities follow the quantity rules
2026-11-14 · Breaking change · Upcoming: not yet in production
Line quantities that break a rule are rejected with 422
https://orderex.io/problems/line-quantity-rule-violated on
PATCH /api/v1/orders/{id}/lines/{lineId}/quantities.
What changed
- The rules: cancelled plus shipped at most ordered, delivered and returned at most shipped, invoiced at most ordered minus cancelled.
- The problem has
orderLineId,lineNumberand every broken rule inrules, in this order:cancelled-exceeds-ordered-minus-shipped,shipped-exceeds-ordered-minus-cancelled,delivered-exceeds-shipped,returned-exceeds-shipped,invoiced-exceeds-ordered-minus-cancelled. The first two are one rule, named after cancelled when only cancelled changed. Nothing is changed. - A line from before this change whose quantities already break a rule keeps them, and every change that still breaks a rule is rejected until one brings it within the rules.
- Not breaking, with this change: a changed
orderedrecomputes the line'slineTotaland VAT amounts and the order's totals (422https://orderex.io/problems/invalid-amountwhen one does not fit), the line's current numbers give 204 without a change, and two changes to lines of the same order at the same time can give 409https://orderex.io/problems/concurrency-conflict; read the order and retry.
Affected operations
PATCH /api/v1/orders/{id}/lines/{lineId}/quantities
What you do
- Correct the quantities and send them again.
How breaking changes are announced and how long a deprecated endpoint stays: see the versioning policy.