# Luminous API Documentation: API Reference Sales & Fulfillment ## Sales & Fulfillment ### Sales Orders - [Sales orders](https://docs.joinluminous.com/api-reference/sales-orders/sales-orders.md): Get a paginated list of sales orders with optional filtering. - [Create a new sales order](https://docs.joinluminous.com/api-reference/sales-orders/create-a-new-sales-order.md): Create a new sales order with items, addresses, and optional metadata. - [Export sales orders (incremental)](https://docs.joinluminous.com/api-reference/sales-orders/export-sales-orders-incremental.md): Incrementally export active sales orders updated within a given time window, with cursor-based pagination. Designed for real-time syncing and data pipelines. - [Bulk refresh sales orders](https://docs.joinluminous.com/api-reference/sales-orders/bulk-refresh-sales-orders.md): Re-pull up to 100 sales orders from their source channels in the background. Creates a batch job and returns immediately — orders are refreshed asynchronously. - [Single sales order](https://docs.joinluminous.com/api-reference/sales-orders/single-sales-order.md): Get details of a specific sales order by ID. - [Update a sales order](https://docs.joinluminous.com/api-reference/sales-orders/update-a-sales-order.md): Partially update an existing sales order. All body fields are optional — only send fields you want to change. - [Get purchase-to-order allocation availability](https://docs.joinluminous.com/api-reference/sales-orders/get-purchase-to-order-allocation-availability.md): Read what each fulfillable line of a sales order can be sourced from right now — the read surface behind the in-app allocation planner, exposed so a caller can see availability **before** calling `POST /purchase-orders/{purchaseOrderId}/allocate` (rather than allocating blind and guessing the PO lin… - [Set sales order lines' fulfillment priority list](https://docs.joinluminous.com/api-reference/sales-orders/set-sales-order-lines-fulfillment-priority-list.md): Set, change, or clear the line-level fulfillment priority list on named lines of one sales order, then re-route those lines the way the Re-route tool does: each affected fulfillment order is deleted (unpushed first if it was pushed) and regenerated under the new list. Send `dry_run: true` to preview… - [Preview a sales-order item remap](https://docs.joinluminous.com/api-reference/sales-orders/preview-a-sales-order-item-remap.md): Dry-run a remap of a single posted line item to a different product. Reports whether the remap is allowed, whether a `force` flag is required, and what will happen to the fulfillment order — **without mutating anything**. - [Remap a sales-order item](https://docs.joinluminous.com/api-reference/sales-orders/remap-a-sales-order-item.md): Remap a single posted line item to a different product and re-post the order's sales items. Use this to correct an incorrect product mapping on an already-posted sales order (purgatory mapping only covers pre-posting orders). - [Push fulfillment to order source](https://docs.joinluminous.com/api-reference/sales-orders/push-fulfillment-to-order-source.md): Push fulfillment/tracking for all shipments on a sales order to its source channel (e.g. Shopify). Mirrors the admin "push order fulfillment" action and runs the same OMS integration flow that fires automatically when shipments are created — useful for retrying a sync that previously failed or for o… - [Simulate fulfillment for a sales order](https://docs.joinluminous.com/api-reference/sales-orders/simulate-fulfillment-for-a-sales-order.md): Dry-run fulfillment-order generation for a single sales order. Read-only — no database writes and no inventory allocation take place. Use this to preview which fulfillment orders *would* be generated, and whether stock shortages would occur, before committing with `POST /sales-orders/{salesOrderId}/… - [Auto-generate fulfillment orders (synchronous)](https://docs.joinluminous.com/api-reference/sales-orders/auto-generate-fulfillment-orders-synchronous.md): Generate fulfillment orders for a single sales order **synchronously** and return the outcome inline. Contrast with `POST /sales-orders/{salesOrderId}/refresh`, which dispatches an asynchronous order-refresh job. - [Create a fulfillment order (no stock checks)](https://docs.joinluminous.com/api-reference/sales-orders/create-a-fulfillment-order-no-stock-checks.md): Create **one** fulfillment order for a sales order's open quantity, without stock or threshold checks and without warehouse splits. Contrast with `POST /sales-orders/{salesOrderId}/auto-generate-fulfillment-orders`, which always runs Smart Fulfillment (stock thresholds and warehouse splits). - [Refresh a sales order](https://docs.joinluminous.com/api-reference/sales-orders/refresh-a-sales-order.md): Dispatch a background refresh for a single active sales order — the same pipeline used by the admin `order:refresh` Artisan command. The job pulls shipping updates, recalculates quantities, deletes unpushed fulfillment orders, and auto-generates new ones. - [List sales order shipments](https://docs.joinluminous.com/api-reference/sales-orders/list-sales-order-shipments.md): Get a paginated list of sales order shipments across all sales orders. Use it to fetch recent shipments in a few paged calls instead of calling `GET /sales-orders/{salesOrderId}/shipments` once per order. - [Get shipments for a sales order](https://docs.joinluminous.com/api-reference/sales-orders/get-shipments-for-a-sales-order.md): Retrieve a paginated list of shipments associated with a specific sales order. - [Create a new shipment for a sales order](https://docs.joinluminous.com/api-reference/sales-orders/create-a-new-shipment-for-a-sales-order.md): Create a new shipment record for a specific sales order. Once the shipment is added, the sales order status will automatically be updated to either `shipped` or `partially_shipped`. Also, any shipment costs will be added to the sales order total. - [Force-push shipment fulfillment to order source](https://docs.joinluminous.com/api-reference/sales-orders/force-push-shipment-fulfillment-to-order-source.md): Push fulfillment for a shipment to the source OMS, explicitly choosing which sales order lines to fulfill (rather than relying on SKU matching). Use this when shipment lines do not match SKUs cleanly — e.g. for custom kits or rebranded items. After the push, `shipment_item_fulfillments` are synced a… - [Create shipment packages](https://docs.joinluminous.com/api-reference/sales-orders/create-shipment-packages.md): Create detailed package and item tracking for a sales order shipment. - [List sales order attachments](https://docs.joinluminous.com/api-reference/sales-orders/list-sales-order-attachments.md): List all files attached to a sales order. Returns a bare array (not paginated). - [Upload a sales order attachment](https://docs.joinluminous.com/api-reference/sales-orders/upload-a-sales-order-attachment.md): Upload a file and attach it to a sales order. Send the file as `multipart/form-data` in a field named `file`. - [Download a sales order attachment](https://docs.joinluminous.com/api-reference/sales-orders/download-a-sales-order-attachment.md): Download an attachment file from a sales order. The file bytes are streamed over the authenticated connection. - [Delete a sales order attachment](https://docs.joinluminous.com/api-reference/sales-orders/delete-a-sales-order-attachment.md): Delete an attachment from a sales order. ### Fulfillment Orders - [Fulfillment orders](https://docs.joinluminous.com/api-reference/fulfillment-orders/fulfillment-orders.md): Get a paginated list of fulfillment orders with nested sales order, picklists, and line items. - [Simulate fulfillment-order generation (bulk)](https://docs.joinluminous.com/api-reference/fulfillment-orders/simulate-fulfillment-order-generation-bulk.md): Dry-run fulfillment-order generation for up to **50** sales orders at once. Read-only — no database writes and no inventory allocation take place. Returns, per order, which fulfillment orders *would* be generated and whether stock shortages would occur. - [Bulk delete fulfillment orders](https://docs.joinluminous.com/api-reference/fulfillment-orders/bulk-delete-fulfillment-orders.md): Delete up to 50 fulfillment orders in one call. Each fulfillment order follows the same rules as `DELETE /fulfillment-orders/{id}`: a pushed order is removed from its fulfillment channel first, `skip_unpush` deletes in Luminous only, and an order on a picklist or with a shipped shipment is refused,… - [Get fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/get-fulfillment-order.md): Return one fulfillment order by ID, including destination OMS, fulfillment channel, push timestamps, and the last `error_message` from a failed push. - [Delete fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/delete-fulfillment-order.md): Delete a fulfillment order, the same way deleting it in the Luminous web app does. The fulfillment order is removed from its sales order and the quantities it held on the sales order lines are freed, so new fulfillment orders can be generated for them (for example with `POST /sales-orders/{salesOrde… - [Push fulfillment order to OMS](https://docs.joinluminous.com/api-reference/fulfillment-orders/push-fulfillment-order-to-oms.md): Push this fulfillment order to its destination OMS (fulfillment channel). The destination is determined by the fulfillment order's existing channel mapping; no destination is taken from the request body. - [Unpush fulfillment order from OMS](https://docs.joinluminous.com/api-reference/fulfillment-orders/unpush-fulfillment-order-from-oms.md): Remove this fulfillment order from its destination OMS, when the destination supports unpushing. Optionally enable per-request HTTP debug capture by sending `{ "debug": true }`. - [Reconcile source reference](https://docs.joinluminous.com/api-reference/fulfillment-orders/reconcile-source-reference.md): Bind an existing remote OMS order ID to a fulfillment order's `source_reference_identifier`, resolving push failures caused by duplicate-push errors (HTTP 409) or other desync states where Luminous lost track of the remote order it already created. - [Remove sales order line from fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/remove-sales-order-line-from-fulfillment-order.md): Detach a sales order line from this fulfillment order. The pivot allocation is removed and FO line quantities are resynced. Fails 422 if the FO has been picked or pushed (use `allow_pushed=true` to override the pushed guard). - [Set custom field values on a fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/set-custom-field-values-on-a-fulfillment-order.md): Sets one or more custom field values on a fulfillment order. Each key in the `fields` object must match the **label** of a pre-configured `CustomField` definition that is set up for `FulfillmentOrder` records. - [Check fulfillment-order push readiness](https://docs.joinluminous.com/api-reference/fulfillment-orders/check-fulfillment-order-push-readiness.md): Structured pre-push checklist for a fulfillment order. Evaluates, without pushing: - [List fulfillment-order activity logs](https://docs.joinluminous.com/api-reference/fulfillment-orders/list-fulfillment-order-activity-logs.md): Paginated activity timeline scoped to a single fulfillment order (audit trail of changes, pushes, errors, and system events). The subject is fixed to this fulfillment order. - [Preview fulfillment-order push mapping](https://docs.joinluminous.com/api-reference/fulfillment-orders/preview-fulfillment-order-push-mapping.md): Fulfillment-order-scoped mapping preview. Resolves the PUSH_ORDERS integration mapping from the fulfillment order's fulfillment channel and renders the output that *would* be sent to the destination OMS — without pushing. - [Repair address and push fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/repair-address-and-push-fulfillment-order.md): Harness-safe recovery action for a fulfillment order that failed to push because of address gaps (e.g. a UAE/Israel-style order missing `postal_code` or `state`). In one call it will: - [Create Shipment](https://docs.joinluminous.com/api-reference/fulfillment-orders/create-shipment.md): Create a carrier shipment bound to a specific fulfillment order. The fulfillment order's parent sales order is resolved from the path, so callers do not need to look up the sales order first. - [Update fulfillment order notes](https://docs.joinluminous.com/api-reference/fulfillment-orders/update-fulfillment-order-notes.md): Update the customer-facing and/or internal notes on a fulfillment order. Send either field on its own to change one without clobbering the other; send `null` to clear a note. At least one of the two fields must be present, or the request is rejected. - [Get tags on a fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/get-tags-on-a-fulfillment-order.md): Retrieve the tags attached directly to this fulfillment order. - [Attach tag(s) to a fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/attach-tags-to-a-fulfillment-order.md): Attach one or more tags to a fulfillment order. Existing tags are not removed — use `PUT` to replace the full tag set. - [Replace all tags on a fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/replace-all-tags-on-a-fulfillment-order.md): Replace the entire tag set on a fulfillment order with the provided list. Tags not in the new list are removed; tags already present that are in the list are kept. Send an empty array to clear all tags. - [Detach a tag from a fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/detach-a-tag-from-a-fulfillment-order.md): Remove a specific tag from a fulfillment order by tag name or ID. Only tags attached directly to the fulfillment order can be removed; tags inherited from the parent sales order will silently do nothing. - [Hold fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/hold-fulfillment-order.md): Put a fulfillment order on hold. The order must be in a state from which a hold is allowed; otherwise the request is rejected with `422` and a message explaining why the transition was refused. - [Release fulfillment order from hold](https://docs.joinluminous.com/api-reference/fulfillment-orders/release-fulfillment-order-from-hold.md): Release a fulfillment order from hold, returning it to pending. The order must be on hold; otherwise the request is rejected with `422` and a message explaining why the transition was refused. - [Cancel fulfillment order](https://docs.joinluminous.com/api-reference/fulfillment-orders/cancel-fulfillment-order.md): Cancel a fulfillment order. The order must be in a state from which cancellation is allowed; otherwise the request is rejected with `422` and a message explaining why the transition was refused. - [Mark fulfillment order as shipped](https://docs.joinluminous.com/api-reference/fulfillment-orders/mark-fulfillment-order-as-shipped.md): Mark a fulfillment order as shipped, optionally recording carrier details. This mints the shipment through the same path the web app uses, so it carries the existing transition checks — if the order cannot be shipped from its current state the request is rejected with `422`. - [Set fulfillment order status](https://docs.joinluminous.com/api-reference/fulfillment-orders/set-fulfillment-order-status.md): Set a fulfillment order's status. Intended for external systems (for example a 3PL or file-based fulfillment partner) that report back what happened to an order. Three statuses are accepted: - [Update ship-by date](https://docs.joinluminous.com/api-reference/fulfillment-orders/update-ship-by-date.md): Change a fulfillment order's ship-by date. The date is stored as a UTC instant (send an ISO-8601 timestamp; a bare date is treated as midnight UTC). - [Freight account and booking defaults](https://docs.joinluminous.com/api-reference/fulfillment-orders/freight-account-and-booking-defaults.md): The Freightview (LTL) integration account a fulfillment order will quote with, and that account's booking defaults (location types, destination accessorials, pickup window). - [Freight record and active shipments](https://docs.joinluminous.com/api-reference/fulfillment-orders/freight-record-and-active-shipments.md): The fulfillment order's latest freight record — an open quote session to book from before quoting again (`bookedAt` is `null`, `quotes` included), or the booking — plus the order's active Luminous shipments. Check this before `POST /fulfillment-orders/{id}/freight/quotes`, since every quote call cre… - [Build a package plan](https://docs.joinluminous.com/api-reference/fulfillment-orders/build-a-package-plan.md): Package Builder's "Auto-create Structure" for a fulfillment order: packs the order's lines into pallets/cases/boxes using the products' pallet standards, carton sizes and weights, and the tenant's saved auto-create defaults. The plan is **not saved**. Use `freight_items` as the `items` of `POST /ful… - [Create freight shipment and request quotes](https://docs.joinluminous.com/api-reference/fulfillment-orders/create-freight-shipment-and-request-quotes.md): Create a Freightview LTL shipment for the fulfillment order and start rating. The response is the new freight record (`id` is the `metadataId` for the `/freight/shipments/{metadataId}` routes); poll `GET /freight/shipments/{metadataId}/quotes` until `polling_status` is `completed`, then book with `P… - [Packing slip PDF](https://docs.joinluminous.com/api-reference/fulfillment-orders/packing-slip-pdf.md): The tenant's packing slip for a fulfillment order, rendered as a PDF. By default one page set per package (`per_package=true`); pass `per_package=false` for a single slip. `template_id` selects a specific packing-slip export template. ### Freight - [Single freight shipment](https://docs.joinluminous.com/api-reference/freight/single-freight-shipment.md): A freight shipment record by ID: status, booking references (BOL, PRO, tracking, carrier), pickup details, the last provider error, and its quotes. `providerStatus` is as of the last sync; call `POST /freight/shipments/{metadataId}/sync-status` to refresh it from Freightview. - [Freight quotes](https://docs.joinluminous.com/api-reference/freight/freight-quotes.md): The carrier rates on a freight shipment, refreshed from Freightview. Rating is finished when `polling_status` is `completed`; poll until then. Carriers that failed to rate come last with `status: error` and their messages in `errors`, whatever their `price` — skip them when choosing the cheapest quo… - [Book a freight quote](https://docs.joinluminous.com/api-reference/freight/book-a-freight-quote.md): Book one of the shipment's quotes with the carrier. **This creates a real carrier pickup that cannot be cancelled from Luminous.** Booking the same record twice is refused (`409`), as is a quote that is not on the record or whose carrier failed to rate (`422`). - [Sync status from Freightview](https://docs.joinluminous.com/api-reference/freight/sync-status-from-freightview.md): Pull the freight shipment's latest status from Freightview and return the updated record. - [Freight documents](https://docs.joinluminous.com/api-reference/freight/freight-documents.md): The documents Freightview holds for the shipment — bill of lading, labels, proof of delivery. Documents already mirrored into Luminous are returned as-is when the shipment can gain no more; otherwise (or with `refresh=1`) the provider's list is re-pulled and merged. Download a document with `GET /fr… - [Download a freight document](https://docs.joinluminous.com/api-reference/freight/download-a-freight-document.md): Stream a freight document (BOL, label, POD) from Freightview. The `Content-Type` is the document's own MIME type, typically `application/pdf`. ### Fulfillment Priority Lists - [List fulfillment priority lists](https://docs.joinluminous.com/api-reference/fulfillment-priority-lists/list-fulfillment-priority-lists.md): Paginated list of fulfillment priority lists (routing priority lists). Each list holds an ordered set of routing lines used to decide how a sales order's fulfillment orders are routed to warehouse groups, fulfillment channels, and destination OMS accounts. - [Create a fulfillment priority list](https://docs.joinluminous.com/api-reference/fulfillment-priority-lists/create-a-fulfillment-priority-list.md): Create a routing priority list with one or more ordered lines. `destination_oms_id` maps to `app_integration_accounts.id`. A line's `warehouse_group_id` may be omitted only when the fulfillment channel defines a default warehouse group. - [Get a fulfillment priority list](https://docs.joinluminous.com/api-reference/fulfillment-priority-lists/get-a-fulfillment-priority-list.md): Retrieve a single fulfillment priority list with its routing lines. - [Update a fulfillment priority list](https://docs.joinluminous.com/api-reference/fulfillment-priority-lists/update-a-fulfillment-priority-list.md): Replace a fulfillment priority list's attributes and routing lines. The `lines` array is required and replaces the existing set. - [Delete a fulfillment priority list](https://docs.joinluminous.com/api-reference/fulfillment-priority-lists/delete-a-fulfillment-priority-list.md): Soft-delete a fulfillment priority list. Returns `204 No Content` on success. ### PickFlow Warehouse - [Resolve a scanned barcode](https://docs.joinluminous.com/api-reference/pickflow-warehouse/resolve-a-scanned-barcode.md): Returns **every** record a scanned code could refer to, rather than the first match, so the client can choose based on what the operator is doing (a code that is both a SKU and a bin name is the destination when moving stock, and the product when looking it up). - [Get bin contents](https://docs.joinluminous.com/api-reference/pickflow-warehouse/get-bin-contents.md): Everything in one bin, as bin × lot rows. Rows with zero on-hand **and** zero reserved quantity are omitted. - [Get product stock by bin](https://docs.joinluminous.com/api-reference/pickflow-warehouse/get-product-stock-by-bin.md): Every bin × lot row holding a product, optionally limited to one warehouse. Rows with zero on-hand **and** zero reserved quantity are omitted; an unknown product returns an empty `items` array. - [Search bins in a warehouse](https://docs.joinluminous.com/api-reference/pickflow-warehouse/search-bins-in-a-warehouse.md): Look up non-inactive bins within one warehouse, ordered by name. Use `name` for an exact match or `search` for a substring match (`name` wins if both are sent). With neither, returns the first `limit` bins. - [List open PO lines to receive a product against](https://docs.joinluminous.com/api-reference/pickflow-warehouse/list-open-po-lines-to-receive-a-product-against.md): Open purchase-order lines for one product that still have quantity left to receive, oldest expected arrival first (up to 25). When `warehouse_id` is given, POs for that warehouse **and** POs with no warehouse set are included. Receive against a line with `POST /receiving-reports`. If the API user is… ### PickFlow Shipping - [List shipping carriers](https://docs.joinluminous.com/api-reference/pickflow-shipping/list-shipping-carriers.md): Return the provider-agnostic list of shipping carriers available to PickFlow's packing flow. Success bodies are wrapped in a top-level "data" key. - [List shipping services for a carrier](https://docs.joinluminous.com/api-reference/pickflow-shipping/list-shipping-services-for-a-carrier.md): Return the provider-agnostic list of shipping services offered by the given carrier. Success bodies are wrapped in a top-level "data" key; errors return { "error": "" }. - [List package types for a carrier](https://docs.joinluminous.com/api-reference/pickflow-shipping/list-package-types-for-a-carrier.md): Return the provider-agnostic list of package types supported by the given carrier. Success bodies are wrapped in a top-level "data" key; errors return { "error": "" }. - [Buy a shipping label for a fulfillment order](https://docs.joinluminous.com/api-reference/pickflow-shipping/buy-a-shipping-label-for-a-fulfillment-order.md): Buy a shipping label for the given fulfillment order, register the shipment in Luminous, and return the base64 label bytes plus tracking. This operation is idempotent per fulfillment order — retries return the already-purchased label instead of buying postage twice. Success bodies are wrapped in a t… ### Picklists - [List picklists](https://docs.joinluminous.com/api-reference/picklists/list-picklists.md): Get a paginated list of picklists with optional filtering. A picklist matches a filter if **any** linked fulfillment order or sales order matches. - [Get a picklist](https://docs.joinluminous.com/api-reference/picklists/get-a-picklist.md): Retrieve a single picklist by ID, including its line items. Each item names the lot it is assigned to — `lot_id`, `lot_number`, `production_date` and `expiry_date` are always present, with `null` for non-lot stock (CS-10083). Each `sales_orders[].items[].product` with `type = KIT` also includes its… - [List lots staged in a picklist's WIP bin](https://docs.joinluminous.com/api-reference/picklists/list-lots-staged-in-a-picklists-wip-bin.md): Between pick-complete and pack, picked units sit in the picklist's WIP (work-in-progress) bin and their lot is recorded only on that bin's stock rows. This endpoint is the read for that bin, so a packer can name the lot it is putting in a package instead of inferring one (CS-10083). - [Complete picking for a picklist](https://docs.joinluminous.com/api-reference/picklists/complete-picking-for-a-picklist.md): Mark a picklist's lines as picked and move the picked stock into the picklist's WIP bin. ### Cycle Counts - [Create a cycle count batch](https://docs.joinluminous.com/api-reference/cycle-counts/create-a-cycle-count-batch.md): Creates a cycle count batch, which fans out into one session per warehouse in scope. - [List active sessions for a warehouse](https://docs.joinluminous.com/api-reference/cycle-counts/list-active-sessions-for-a-warehouse.md): Lists `draft` and `in_progress` sessions for the given warehouse — the pickflow mobile-app use case. This endpoint pre-dates CS-8871 and returns a legacy session shape (not the `CycleCountSession` resource returned by the lifecycle endpoints). - [SKU-mode item-count estimate per warehouse](https://docs.joinluminous.com/api-reference/cycle-counts/sku-mode-item-count-estimate-per-warehouse.md): Preview the item count a create-batch call would produce, before committing. Takes the same selection shape as the create body (minus `name`, `remarks`, and `is_blind_count`). `scope_type=item` requires the `CS_8871_CYCLE_COUNT_LOCATION_SCOPE` feature flag. - [Bin-location-mode item-count estimate per warehouse](https://docs.joinluminous.com/api-reference/cycle-counts/bin-location-mode-item-count-estimate-per-warehouse.md): Same as the SKU-mode estimate but for `count_mode: bin_location`; also accepts `location_ids`. Bin-location mode is available to every tenant; only `scope_type=item` requires the `CS_8871_CYCLE_COUNT_LOCATION_SCOPE` feature flag. - [Search locations (bins) within a warehouse](https://docs.joinluminous.com/api-reference/cycle-counts/search-locations-bins-within-a-warehouse.md): Search bins within a warehouse — backs building a Scope Type A payload. Requires the `CS_8871_CYCLE_COUNT_LOCATION_SCOPE` feature flag. - [Search products](https://docs.joinluminous.com/api-reference/cycle-counts/search-products.md): Search products — backs building a Scope Type B "Products" payload. Global, not warehouse-scoped. Requires the `CS_8871_CYCLE_COUNT_LOCATION_SCOPE` feature flag. - [Search lots](https://docs.joinluminous.com/api-reference/cycle-counts/search-lots.md): Search lots — backs building a Scope Type B "Lots" payload. Global, not warehouse-scoped. Requires the `CS_8871_CYCLE_COUNT_LOCATION_SCOPE` feature flag. - [List cycle count batches](https://docs.joinluminous.com/api-reference/cycle-counts/list-cycle-count-batches.md): Paginated, filterable batch list — the same dashboard list the internal UI shows, exposed externally. Each batch includes its per-warehouse sessions with summary stats only; items are never embedded here (use the per-session items endpoint). - [Get a cycle count batch](https://docs.joinluminous.com/api-reference/cycle-counts/get-a-cycle-count-batch.md): Returns a batch with its per-warehouse sessions. - [Delete a batch and all its sessions](https://docs.joinluminous.com/api-reference/cycle-counts/delete-a-batch-and-all-its-sessions.md): **Destructive and irreversible from an external caller's point of view** — there is no undelete endpoint. Refused (`422`) when any session in the batch is already `posted`. Requires an explicit `{"confirm": true}` body, the same external-only safety gate as `post`. The posted-status check runs again… - [Start every draft session in the batch](https://docs.joinluminous.com/api-reference/cycle-counts/start-every-draft-session-in-the-batch.md): Transitions every `draft` session in the batch to `in_progress`. - [Export the batch-level variance report as CSV](https://docs.joinluminous.com/api-reference/cycle-counts/export-the-batch-level-variance-report-as-csv.md): Returns the batch-level variance report (all warehouses) directly as a CSV file download (`Content-Disposition: attachment`), not a JSON-wrapped URL — the same contract as the other External API file-download endpoints. - [Get a cycle count session](https://docs.joinluminous.com/api-reference/cycle-counts/get-a-cycle-count-session.md): Returns session detail. The session must belong to the given `warehouse_id`. This endpoint pre-dates CS-8871 and returns a legacy session shape. - [Delete a cycle count session](https://docs.joinluminous.com/api-reference/cycle-counts/delete-a-cycle-count-session.md): **Destructive and irreversible from an external caller's point of view** — there is no undelete endpoint. Refused (`422`) when the session is already `posted`. Requires an explicit `{"confirm": true}` body, the same external-only safety gate as `post`. Row-locks the session before checking status (t… - [List session items](https://docs.joinluminous.com/api-reference/cycle-counts/list-session-items.md): Paginated, filterable list of the items in a session. This endpoint pre-dates CS-8871 and returns a legacy item shape. - [Record a count for one item](https://docs.joinluminous.com/api-reference/cycle-counts/record-a-count-for-one-item.md): Records a counted quantity for a single item. The session must be `in_progress`. This endpoint pre-dates CS-8871. - [Scan a barcode and record a count](https://docs.joinluminous.com/api-reference/cycle-counts/scan-a-barcode-and-record-a-count.md): Records a count by barcode rather than item id — the scanner use case. This endpoint pre-dates CS-8871. When the scanned product sits in several bins or lots within the session, pass `location_id` (and `lot_id`) to count the right row; omitted, the first session item for the product is counted. A ba… - [Session counting-progress summary](https://docs.joinluminous.com/api-reference/cycle-counts/session-counting-progress-summary.md): Returns a live counting-progress summary for a session. This endpoint pre-dates CS-8871. - [Start counting](https://docs.joinluminous.com/api-reference/cycle-counts/start-counting.md): Transitions a session from `draft` to `in_progress`. - [Submit for review](https://docs.joinluminous.com/api-reference/cycle-counts/submit-for-review.md): Transitions a session from `in_progress` to `pending_review`. The variance fields (`totalVarianceQty`, `totalVarianceValue`, `accuracyPercentage`) are populated on the returned session. - [Reopen for counting](https://docs.joinluminous.com/api-reference/cycle-counts/reopen-for-counting.md): Transitions a session from `pending_review` back to `in_progress`. - [Post a cycle count session](https://docs.joinluminous.com/api-reference/cycle-counts/post-a-cycle-count-session.md): Transitions a session from `pending_review` to `posted`. - [Cancel a cycle count session](https://docs.joinluminous.com/api-reference/cycle-counts/cancel-a-cycle-count-session.md): Transitions a session from any non-posted status to `cancelled`. Posted sessions cannot be cancelled. - [Reset all counted quantities](https://docs.joinluminous.com/api-reference/cycle-counts/reset-all-counted-quantities.md): Clears all counted quantities back to null, resetting `countedSkuCount` to 0. The session must be `in_progress`. - [Export the session-level variance report as CSV](https://docs.joinluminous.com/api-reference/cycle-counts/export-the-session-level-variance-report-as-csv.md): Returns the session-level (single-warehouse) variance report directly as a CSV file download (`Content-Disposition: attachment`). - [Download the CSV count-sheet template](https://docs.joinluminous.com/api-reference/cycle-counts/download-the-csv-count-sheet-template.md): Downloads a CSV count-sheet template for the session, pre-filled with the items to count. The session must be `in_progress`. Returned directly as a file download (`Content-Disposition: attachment`). - [Validate an uploaded counting-sheet CSV](https://docs.joinluminous.com/api-reference/cycle-counts/validate-an-uploaded-counting-sheet-csv.md): Step 1 of the two-step CSV import flow. Takes a real multipart CSV upload and returns which rows matched, which didn't, and which were invalid — **without writing anything**. The session must be `in_progress`. - [Apply a validated import](https://docs.joinluminous.com/api-reference/cycle-counts/apply-a-validated-import.md): Step 2 of the two-step CSV import flow. `matched_items` is the `matchedItems` object returned by `validate-import`, round-tripped back as-is (item_id => counted_qty). The session must be `in_progress`. ### Print Stations - [List print stations](https://docs.joinluminous.com/api-reference/print-stations/list-print-stations.md): List the tenant's paired print stations, most recently paired first. Any external client (including PickFlow) can list stations and enqueue jobs directly. This endpoint is also exposed at `GET /pickflow/print-stations` as a PickFlow-specific alias. The station's `token_hash` is never exposed. - [Enqueue a print job](https://docs.joinluminous.com/api-reference/print-stations/enqueue-a-print-job.md): Enqueue a print job to a paired, non-revoked print station. The station's agent picks it up on its next long-poll. Provide the payload as `payload_base64` (binary/PDF bytes) or `payload_text` (raw ZPL command stream) — exactly one is required. If `printer_name` is supplied it must match a printer av… - [List print stations (PickFlow alias)](https://docs.joinluminous.com/api-reference/print-stations/list-print-stations-pickflow-alias.md): PickFlow-specific alias of `GET /print-stations`. Returns the tenant's paired print stations, most recently paired first. Behaves identically to the canonical endpoint; provided so PickFlow can use the same `/pickflow/*` credential and base path it uses for every other PickFlow call. - [Mint a print station pairing code (PickFlow)](https://docs.joinluminous.com/api-reference/print-stations/mint-a-print-station-pairing-code-pickflow.md): Mint a single-use pairing code, valid for 5 minutes, that a new print station agent enters to pair with this tenant. The code is attributed to the API token's user. - [List recent print jobs (PickFlow)](https://docs.joinluminous.com/api-reference/print-stations/list-recent-print-jobs-pickflow.md): Tenant-wide, payload-free summaries of the most recent print jobs across all stations, newest first. Note the response is a bare array with camelCase keys. - [Revoke a print station (PickFlow)](https://docs.joinluminous.com/api-reference/print-stations/revoke-a-print-station-pickflow.md): Revoke a station's credentials. The station record is kept, but its next agent call is rejected with 401. Use `DELETE /pickflow/print-stations/{id}` to remove it entirely. - [Send a test print (PickFlow)](https://docs.joinluminous.com/api-reference/print-stations/send-a-test-print-pickflow.md): Queue a test page to a station. Target printer: the `printer` parameter (must exist on the station), else the station's default printer, else the first printer flagged default, else the first printer. A ZPL test label is sent when the chosen printer's driver is ZPL; otherwise a one-page PDF. - [Delete a print station (PickFlow)](https://docs.joinluminous.com/api-reference/print-stations/delete-a-print-station-pickflow.md): Permanently delete a print station. Its print jobs are deleted with it. ### Purgatory - [List non-posted (purgatory) sales orders](https://docs.joinluminous.com/api-reference/purgatory/list-non-posted-purgatory-sales-orders.md): Returns a paginated list of sales orders currently in purgatory — orders that have been ingested from a sales channel but **not yet posted** into Luminous inventory and accounting (`is_posted = false`). - [Get a single non-posted order](https://docs.joinluminous.com/api-reference/purgatory/get-a-single-non-posted-order.md): Returns a single sales order that is currently in purgatory, including its line items, tags, custom fields, and fulfillment orders. - [Map a line item to a product / toggle flags](https://docs.joinluminous.com/api-reference/purgatory/map-a-line-item-to-a-product-toggle-flags.md): Maps a non-posted sales order line item to a Luminous product, and/or toggles the `ignore_item` / `non_physical_item` flags so unmappable lines can clear purgatory. - [Dispatch auto-mapping job](https://docs.joinluminous.com/api-reference/purgatory/dispatch-auto-mapping-job.md): Dispatches the `OrderAutoMappingJob` to attempt to map line items in every non-posted order using existing SKU and alternate-SKU rules. Equivalent to the admin **"Auto Map SKUs and Reprocess Orders"** button. - [Dispatch reprocess-purgatory job](https://docs.joinluminous.com/api-reference/purgatory/dispatch-reprocess-purgatory-job.md): Dispatches the `ReprocessOrdersThroughPurgatoryJob`, which re-evaluates every non-posted order against the **current** purgatory settings. - [Get purgatory automation settings](https://docs.joinluminous.com/api-reference/purgatory/get-purgatory-automation-settings.md): Returns all purgatory automation settings for the tenant, keyed by their external (snake_case) names. Includes a `schema_url` pointing at `GET /purgatory/settings/schema` for field-level documentation. - [Partially update purgatory settings](https://docs.joinluminous.com/api-reference/purgatory/partially-update-purgatory-settings.md): **Partial update** — only fields present in the body are written. Omitted fields keep their stored values. Unknown field names are rejected with a pointer to `GET /purgatory/settings/schema`. - [Get purgatory settings schema](https://docs.joinluminous.com/api-reference/purgatory/get-purgatory-settings-schema.md): Returns the self-describing schema for the purgatory settings endpoint: every field's `type`, `default`, and human-readable `description`. ### Activity Logs - [List activity log entries for a subject](https://docs.joinluminous.com/api-reference/activity-logs/list-activity-log-entries-for-a-subject.md): Returns paginated activity-log entries for a single subject record — a sales order, fulfillment order, shipment, product, or supplier purchase order. Each entry captures a change (status update, field edit, system action, etc.) along with the actor that caused it. - [Ask an AI about a record's history](https://docs.joinluminous.com/api-reference/activity-logs/ask-an-ai-about-a-records-history.md): Sends the complete (unpaginated) activity history for a sales order, fulfillment order, shipment, product, or supplier purchase order to an LLM along with a free-text question, and returns the model's answer. ### Invoices - [Invoices](https://docs.joinluminous.com/api-reference/invoices/invoices.md): Get a paginated list of invoices with optional filtering. - [Create invoice](https://docs.joinluminous.com/api-reference/invoices/create-invoice.md): Create a new invoice (client purchase order). At least one line item is required. Each item must supply either `product_id` or `sku`. - [Bulk void or delete invoices](https://docs.joinluminous.com/api-reference/invoices/bulk-void-or-delete-invoices.md): Void or delete up to 50 invoices in one call. Each invoice follows the same rules as the single-invoice endpoints (`POST /invoices/{invoiceId}/void` and `DELETE /invoices/{id}`). Invoices are handled one at a time, so one refusal or failure does not stop the rest. - [Single invoice](https://docs.joinluminous.com/api-reference/invoices/single-invoice.md): Get details of a specific invoice by ID - [Update invoice](https://docs.joinluminous.com/api-reference/invoices/update-invoice.md): Partially update an existing invoice. Only the fields you supply are changed; any field you omit is left untouched. - [Delete invoice](https://docs.joinluminous.com/api-reference/invoices/delete-invoice.md): Delete a `draft` or `estimate` invoice that has no sales order. An invoice with a sales order cannot be deleted; void it instead with `POST /invoices/{invoiceId}/void`. - [Void invoice](https://docs.joinluminous.com/api-reference/invoices/void-invoice.md): Void an `active` or `completed` invoice. This has the same effects as the admin Void action: applied credit-memo discounts are rolled back, the sales order's invoiced quantities are rolled back, and a QuickBooks or Xero invoice is voided on the next accounting sync. - [Approve invoice](https://docs.joinluminous.com/api-reference/invoices/approve-invoice.md): Approve an invoice that is pending approval. Mirrors the admin approve action: on success the invoice's `approval_status` becomes `APPROVED`, its `status` becomes `active`, and the approval is recorded in the invoice's approval log. - [Reject invoice](https://docs.joinluminous.com/api-reference/invoices/reject-invoice.md): Reject an invoice that is pending approval. Mirrors the admin reject action: on success the invoice's `approval_status` becomes `DECLINED`, its `status` reverts to `draft`, and the rejection is recorded in the invoice's approval log. Rejection fails with a `400` if an **active** sales order entry al… - [Email a Draft invoice](https://docs.joinluminous.com/api-reference/invoices/email-a-draft-invoice.md): Email a **Draft** invoice to the contact(s) on file for its account. Mirrors the admin "send invoice" action: the invoice PDF is rendered from the tenant's default template and the email is **queued** for delivery. The account's sales reps are CC'd, exactly as the UI action does. - [Estimates](https://docs.joinluminous.com/api-reference/invoices/estimates.md): Get a paginated list of estimates. An estimate is an invoice whose status is `ESTIMATE` (create one with `POST /invoices` and `status: ESTIMATE`), so each row has the same shape as `GET /invoices` and the same filters apply. Invoice endpoints are unchanged and still return estimates alongside other… - [Single estimate](https://docs.joinluminous.com/api-reference/invoices/single-estimate.md): Get one estimate by ID. Same shape as `GET /invoices/{id}`. Returns a 404 when the ID belongs to an invoice that is not an estimate. ### Customer Returns - [List customer returns](https://docs.joinluminous.com/api-reference/customer-returns/list-customer-returns.md): Paginated list of customer return orders, newest first (`id` descending). - [Create customer return](https://docs.joinluminous.com/api-reference/customer-returns/create-customer-return.md): Create a new customer return against an existing sales order. Use `transaction_type` to control whether a refund order is generated alongside the return: - [Single customer return](https://docs.joinluminous.com/api-reference/customer-returns/single-customer-return.md): Retrieve a customer return by ID. - [Mark return received](https://docs.joinluminous.com/api-reference/customer-returns/mark-return-received.md): Transition a return from `Pending` to `Received`. If `restock` is true on the return, inventory is put back into stock at this point (using each line's `location_id`/`lot_id`, falling back to the originating fulfillment line's warehouse). If `restock` is false, no inventory adjustment is made. - [Update return restock flag](https://docs.joinluminous.com/api-reference/customer-returns/update-return-restock-flag.md): Toggle whether receiving this return will restock inventory. `restock=true` means stock is put back on receive; `restock=false` means it is not (`skip_inventory` internally). - [Delete customer return](https://docs.joinluminous.com/api-reference/customer-returns/delete-customer-return.md): Delete a return order. Reverses any inventory effect from a previously received return when applicable. Deleting a return that is already deleted returns `422`. - [List refunds](https://docs.joinluminous.com/api-reference/customer-returns/list-refunds.md): Paginated list of refund orders, newest first (`id` descending). A refund order is the money side of a channel (e.g. Shopify) or manual refund under a sales order: total refunded, tax, shipping, the refund date and the refunded lines. Refunds that have no customer return (for example a shipping-only… - [Single refund](https://docs.joinluminous.com/api-reference/customer-returns/single-refund.md): Retrieve a refund order by ID, with its money fields and refunded lines. Superseded copies of a refund are not returned (`404`); list `GET /refunds` for the current row, or match on `external_refund_id`. ### Deals (CRM) - [List deals](https://docs.joinluminous.com/api-reference/deals/list-deals.md): List CRM deals with optional filters and pagination. - [Single deal](https://docs.joinluminous.com/api-reference/deals/single-deal.md): Get details of a specific deal by ID. Includes aggregate counts of linked sales orders, invoices, bills, supplier purchase orders, and work orders. - [List bills linked to a deal](https://docs.joinluminous.com/api-reference/deals/list-bills-linked-to-a-deal.md): List AP bills linked to the given CRM deal. - [Link a bill to a deal](https://docs.joinluminous.com/api-reference/deals/link-a-bill-to-a-deal.md): Link an existing AP bill to a CRM deal. Idempotent — linking the same bill twice has no additional effect. An entry is added to the deal's activity log. - [Unlink a bill from a deal](https://docs.joinluminous.com/api-reference/deals/unlink-a-bill-from-a-deal.md): Remove the link between a deal and a bill. The bill itself is not deleted. - [List supplier POs linked to a deal](https://docs.joinluminous.com/api-reference/deals/list-supplier-pos-linked-to-a-deal.md): List supplier purchase orders linked to the given CRM deal. - [Link a supplier PO to a deal](https://docs.joinluminous.com/api-reference/deals/link-a-supplier-po-to-a-deal.md): Link an existing supplier purchase order to a CRM deal. Idempotent. An entry is added to the deal's activity log. - [Unlink a supplier PO from a deal](https://docs.joinluminous.com/api-reference/deals/unlink-a-supplier-po-from-a-deal.md): Remove the link between a deal and a supplier purchase order. The PO itself is not deleted. - [List work orders linked to a deal](https://docs.joinluminous.com/api-reference/deals/list-work-orders-linked-to-a-deal.md): List work orders linked to the given CRM deal. - [Link a work order to a deal](https://docs.joinluminous.com/api-reference/deals/link-a-work-order-to-a-deal.md): Link an existing work order to a CRM deal. Idempotent. An entry is added to the deal's activity log. - [Unlink a work order from a deal](https://docs.joinluminous.com/api-reference/deals/unlink-a-work-order-from-a-deal.md): Remove the link between a deal and a work order. The work order itself is not deleted. ## OpenAPI Specs - [build](/api-reference/build.yaml)