Special Order List
Get Special Order List
Settings, the Google connection that reads the sheet, item counts and the latest sync reports.
Update Special Order List
Update any of: `enabled`, `spreadsheet_id` (id or Sheets URL), `range` (tab), `brand_id`, `supplier_id` (the supplier linked to products created at checkout — and the supplier the cost tab's costs belong to), `note`, `preorder_min_subtotal`, `cost_range` (optional STAFF-ONLY cost tab, e.g. `internal`: a part # column + a 'Supplier cost'/'Cost' column; must differ from `range`, else 422; null/blank = no cost source), `supplier_pricing_tier_id` (the supplier pricing tier the cost is written to on a created product; null = the supplier's own default tier). Omitted keys are unchanged. With a cost tab set, checkout gives each product it creates a supplier price = the part's cost (once, at creation); a part with no cost is still created and the order is tagged 'Needs supplier cost'.
Use My Google Connection
Read the sheet through the acting user's Google connection. 422 when the user has none.
Create Special Order Sheet
Create a private sheet in the acting user's Drive with the portal header row and point the list at it (the per-user drive.file grant can read only sheets SKU.io created).
Sync Special Order List
Sync now. 200 with the run's report (`sync.status` succeeded|failed + `message`); 409 when a sync is already running. A cost/supplier column in the portal range refuses the sheet. With a cost tab set, the same run reads it into a staff-only table: `sync.cost_status` (succeeded|failed, null = no cost tab), `costs_imported`, `cost_errors`, `cost_message`. A cost tab problem never fails the portal import and leaves stored costs unchanged. Counts only — no cost value is ever returned.
List Special Order Items
Synced parts (staff view): sheet row, active, the product an order created.
Preview Special Order List Upload
Upload a CSV / XLSX / XLS file (multipart `file`, max 10 MB, 20,000 rows) and get the dry run: detected columns, first rows, counts, errors and what confirming would add / update / remove. Changes nothing; works whatever the source setting is. 422 when the file is refused as a whole (an internal cost/supplier column, a missing required column, no valid row).
Confirm Special Order List Upload
Import a previewed file — it REPLACES the list (rows missing from it are deactivated) and is filed in the document store linked to the run. Requires `source` = `upload`. 200 with `sync` (trigger `upload`); 422 when the source is the Google Sheet or the preview expired; 409 when a sync is running.
Discard Special Order List Upload
Throw a previewed file away. Unknown or expired tokens are a no-op.
Download Special Order List Upload File
Download the file an upload run imported (404 when the run has no filed document).
Special Order List Summary
Whether the merchant's Special order list is on (`available`), its buyer note, the total and the category chips (counted under `search`). Parts the merchant sources on request; never products until ordered.
List Special Order Parts
Paginated orderable parts: dealer price, pre-order price, lead time. Filters: `search` (part # / description), `category`; `sort` = sku|name|category|dealer_price|preorder_price. Empty while the list is off. Never includes cost.