Cart
Get Cart
Return the active account's cart, re-priced and re-validated. Each line reports its current unit price, line total, availability, and any warnings; the cart reports subtotal and minimum-order-value progress.
Empty Cart
Remove every line from the active cart.
Add Cart Line
Add or increase a product line. `product_id` and `quantity` are required. Rejected with 422 and a `reason` (`invalid_quantity`, `below_moq`, `increment_mismatch`, `unknown_product`) when quantity rules or catalog visibility fail.
Update Cart Line
Set the quantity on an existing line (enforces MOQ + increment). Send the line's last-seen `expected_updated_at` for shared-cart concurrency: if another buyer changed it first, the write still applies (last-write-wins) but the returned cart's `conflict` flag is true so the client can refresh.
Remove Cart Line
Remove a single line from the active cart.
Set Cart Mode
Switch the shared cart between 'Order now — ships from stock' (`stock`) and 'Pre-order' (`preorder`). The lines are kept and the cart is re-priced.
Quick Add to Cart
Bulk-add lines by SKU and/or product id. Send structured `items` ([{sku, quantity}] and/or [{product_id, quantity}]) or a pasted `text` block of `SKU,QTY` lines. Returns the added lines, the rejected lines with a reason (`unknown_sku`, `unknown_product`, `below_moq`, `increment_mismatch`), and the refreshed cart.
Import Cart from CSV
Upload a 2-column `sku,quantity` CSV to bulk-add lines. The parser strips a BOM, handles quotes, skips blank rows, sums duplicate SKUs, and reports malformed rows (`missing_sku`, `invalid_quantity`, `row_limit_exceeded`). Valid rows are added; the response summarizes added/rejected and returns the refreshed cart.
Import Cart from PO Document
Upload a purchase-order document (PDF) to extract order lines by OCR. High-confidence, catalog-matched rows are added automatically; low-confidence or unmatched rows are returned as `candidates` requiring confirmation and are never added silently. Returns 422 when document import is not enabled or the document cannot be processed.
Add Special Order Line
Put a Special order list part in the cart (sets the quantity) and switch the cart to pre-order — list parts are pre-order only. Priced at the dealer price, or the pre-order price once the pre-order threshold is reached (`preorder.special_order_list`). 422 `unknown_special_order_item` when the part is not on the list.
Update Special Order Line
Change the quantity of a Special order list line. 404 for another account's line.
Remove Special Order Line
Remove a Special order list line.