Applies an order-level adjustment — a discount, fee, or coupon — to an existing order.
The adjustment is recorded in order_adjustments and the order totals are recalculated
immediately. Adjustments can be added to orders in draft or open status; terminal
orders (cancelled, fulfilled, posted-invoice) reject with 422.
Supported effect_type values: discount, fee.
Supported discount_type values: percentage, fixed_amount.
To apply a coupon by code instead, use POST /v1/orders/{id}/apply-coupon.
Idempotent via Idempotency-Key header. Requires orders:write scope.
Layer 1 isolation: entity_id is resolved server-side from your API
key and the order’s ownership is pre-flight verified before any mutation.
Callers do not pass entity_id in the body; any supplied value is
ignored in favor of the key-resolved value. Cross-tenant attempts
(POSTing a foreign order UUID) return HTTP 404 order_not_found.
Documentation Index
Fetch the complete documentation index at: https://docs.arcuserp.com/llms.txt
Use this file to discover all available pages before exploring further.
API key issued per entity via Settings > Developers > API Keys.
Each key carries scopes (e.g. orders:read, products:write).
Bearer token format: Authorization: Bearer ark_live_ent_Test keys use ark_test_ent_. Both are issued per entity
via Settings > Developers > API Keys.
Client-generated unique key for idempotent POST/PATCH/DELETE operations. Alias for the Idempotency parameter. Max 255 chars. On retry with the same key, the original response is returned without re-executing the operation. Keys expire after 24 hours.
255UUID of the order to apply the adjustment to.
Display label for the adjustment (e.g. "Summer Promo 10%", "Rush Fee").
Whether this adjustment reduces (discount) or increases (fee) the order total.
discount, fee How value is interpreted.
percentage, fixed_amount Numeric value. For percentage, 0--100. For fixed_amount, a dollar amount.
Optional. If provided, applies the named coupon instead of a manual adjustment.
Optional internal notes.
UUID of the user applying the adjustment. Defaults to API key owner if omitted.
Adjustment applied and order totals recalculated.
The created adjustment row with updated order total.