Add a single line item to an order
Adds a single line item to an order in draft or confirmed status. Validates that
the product is active and belongs to the entity. Runs the pricing engine (qty-break
tiers, account pricing level) to compute sell_rate if not overridden. Triggers
fullRecalculateOrder after insert. Idempotent via Idempotency-Key. Requires
orders:write scope.
A line cannot be added to a CLOSED AR document: a cancelled/voided order, a
posted/fulfilled order (returns edit_not_allowed with suggested_action: create_return),
or a billed-and-paid / fully-paid order (invoice_status in paid/overdue or
payment_status = paid; returns edit_not_allowed with suggested_action: revise_order).
To revise a paid order, pass override: true in the body with the orders.revision_override
permission; the edit then proceeds, the order’s revision_count increments, and the
override is recorded in the activity log. The customer must re-acknowledge the new total.
Authorizations
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.
Headers
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.
255Path Parameters
Body
x >= 1Override unit price (canonical Arcus field).
Alias of sell_rate (Stripe/Shopify convention). Either name accepted. Both with different values returns 400; negative/zero returns 422. When applied price differs from catalog list_price, response carries warnings array entries plus emits order.price_override audit row.
Set true (with the orders.revision_override permission) to revise a paid/billed order by adding this line. Without it, a paid/billed order returns 422 edit_not_allowed (suggested_action revise_order).
Optional reason recorded in the audit log when override is used.
Response
Added order item. Response includes unit_price alias of sell_rate. When override detected, response also carries warnings array entries (item, code price_override, product_id, catalog_price, applied_price, delta).
A line item on an order. Sub-resource of Order.
Multi-tenant scoping column (Layer 1 isolation). Set automatically
from the parent orders.entity_id and enforced by Postgres trigger
trg_order_items_entity_parity (P0-ENTITY-ID-CHILD-TABLES, 2026-05-18).
Cross-tenant writes are rejected at the database layer.
Canonical Arcus per-unit price column (matches order_items.sell_rate).
Public-API alias of sell_rate (Stripe/Shopify/QuickBooks convention). Always populated on read; equal to sell_rate. Set per NEW-GAP-API-V1-CALLER-UNIT-PRICE-SILENTLY-OVERRIDDEN 2026-05-17 closure.
Per-unit pricing-rule savings (list_price minus sell_rate, positive magnitude). Already baked into sell_rate (and therefore line_subtotal) per ASC 606 transaction-price pricing; surfaced for the gross-to-net bridge display, never re-subtracted.
Per-line allocated coupon/order-level discount (signed; negative for a discount). Reflected in line_subtotal.
Per-line, per-source adjustment breakdown from order_item_adjustments (the canonical SSOT). Each entry attributes a signed line_amount to a source (pricing_rule | order_adjustment | coupon | manual_line_override | return_refund_adjust | restocking_fee). Empty array for lines with no allocations (and on legacy orders predating the writer). Industry parity: Shopify Admin GraphQL LineItem.discountAllocations[].
For purchase_order document_type lines only: exact product_vendors
row this line is bound to (NEW-GAP-ORDER-ITEMS-PRODUCT-VENDOR-ID-PROVENANCE,
2026-05-14). NULL for legacy PO lines and all non-PO doc types; PDF
falls back to the deterministic default-vendor-part pick.

