Amounts in minor units
2026-11-14 · Breaking change · Upcoming: not yet in production
Amounts are whole numbers in the minor unit of the currency, with the same field names: every
currency has 2 decimals, so 422.44 is 42244 and ISK 1 250 is 125000.
What changed
- This holds for every amount in every request and response:
unitPriceofPOST /api/v1/ordersandPOST /api/v1/orders/{id}/lines;- the order, line and
pricingamounts ofGET /api/v1/orders/{id}andtotalAmountofGET /api/v1/orders; - the statistics of
/stats/summary,/stats/trendsand/stats/top-articles; data.unitPriceanddata.lineTotaloforder.line_addedin the order timeline and in theorder.line_addedwebhook (data.unit_price,data.line_total), including stored history, which was converted;parameters.minAmountof aMinOrderAmountrule inGET /api/v1/orders/validation-rules, which returns{"minAmount": 50000}for 500.00 (stored rules were converted);- and the
detailof 422https://orderex.io/problems/order-status-change-rejectedwhen that rule rejects a status change, which names minor units, such asOrder total amount 49999 is below the minimum required 50000 (minor units).
- Percent fields (
discountPercent,vatRate,percentage) are unchanged. - An amount that is not a whole number (
422.44,42244.0,4.2244e4) or does not fit in a 64-bit integer is rejected with 422https://orderex.io/problems/invalid-amountanderrorsnaming the field, such aserrors["lines[0].unitPrice"], and nothing is written. - An amount sent as a JSON string (
"42244"), which was read as a number before, is now rejected with 400https://orderex.io/problems/invalid-request. - Averages (
averageOrderValue) are rounded once to a whole minor unit away from zero (100.5 is 101), and/stats/trendsgetstotalsfor the whole period. - A retry with an
Idempotency-Keyfirst used with major units before this change gives 409https://orderex.io/problems/idempotency-key-reusedwhen you send the body in minor units, or 422https://orderex.io/problems/invalid-amountwhen it still has an amount with decimals; use a new key for a create you converted. - Note that a webhook retry after the change can carry minor units where the first attempt carried major units, with the same
id.
Affected operations
POST /api/v1/ordersPOST /api/v1/orders/{id}/linesGET /api/v1/orders/{id}GET /api/v1/ordersGET /api/v1/orders/stats/summary,GET /api/v1/orders/stats/trendsandGET /api/v1/orders/stats/top-articlesGET /api/v1/orders/{id}/timelineGET /api/v1/orders/validation-rulesPATCH /api/v1/orders/{id}/status, whose 422order-status-change-rejectednames minor units- The webhook
order.line_added
What you do
- Multiply every amount you send by 100 and divide every amount you read by 100 when you show it in major units.
How breaking changes are announced and how long a deprecated endpoint stays: see the versioning policy.