> ## Documentation Index
> Fetch the complete documentation index at: https://docs.joinluminous.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set sales order lines' fulfillment priority list

> 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 the plan without writing anything.

- **Targets:** each item gives `fulfillment_priority_list_id` **or**
  `fulfillment_priority_list_name` (case-insensitive), not both. Send
  `"fulfillment_priority_list_id": null` to clear the line's list; the line then falls back
  to the order's list, then the product's, then the default list. Up to 500 items.
- **Scope:** the order-level list and other lines are not changed, except a line merged with
  a named line on the same fulfillment order line (identical SKU). That line moves with the
  named line and is returned with `merged: true`.
- **Skipped lines:** a line whose fulfillment order is on an active picklist, has shipped
  (or partly shipped), has been cancelled, or could not be deleted keeps its list and is
  returned as `skipped` (`will_skip` in a dry run) with a `reason`. Unlike the Re-route
  tool, this endpoint never deletes a shipped or cancelled fulfillment order.
- **Synchronous:** runs in the request for the one sales order. The sales order history
  entry is attributed to the API token and lists each changed line with its old and new
  list ids.
- **Retries:** after a timeout, don't retry blindly. A retry sees the lines already on the
  new list and does nothing. Read the sales order instead; if it has no fulfillment orders,
  call `POST /sales-orders/{salesOrderId}/auto-generate-fulfillment-orders`.

Requires the `salesOrders.update` permission.




## OpenAPI

````yaml /api-reference/build.yaml post /sales-orders/{salesOrderId}/items/fulfillment-priority-list
openapi: 3.0.0
info:
  title: Luminous API
  version: 1.0.0
  description: API documentation for Luminous
servers:
  - url: https://{companyName}.api.joinluminous.com/external/api/v1
    variables:
      companyName:
        default: companyName
        description: Your company-specific subdomain
security: []
tags:
  - name: Products
    description: Get and manage products
  - name: Pricing
    description: Manage price schedules, levels, and customizations
  - name: BOMs
    description: Manage Bills of Materials (BOMs)
  - name: Labels
    description: Label rendering via Labelary ZPL service
  - name: Companies
    description: Manage business accounts and their associated data
  - name: Contacts
    description: Manage contact information for individuals
  - name: Suppliers
    description: Manage suppliers (factories) — vendors used on purchase orders
  - name: Supplier SKUs
    description: Manage per-supplier SKU and unit-cost overrides for products
  - name: Locations
    description: Manage warehouses and locations
  - name: Inventory
    description: Get and adjust product stock levels
  - name: Lots
    description: Create, update, and delete product lots (batches)
  - name: Transfer Orders
    description: Manage transfer orders
  - name: Fulfillment Orders
    description: Manage fulfillment orders and picklists
  - name: Freight
    description: >-
      Freightview LTL freight — quotes, booking and documents for fulfillment
      orders
  - name: Fulfillment Priority Lists
    description: Configure fulfillment routing priority lists
  - name: Purchase Orders
    description: Get and modify purchase orders
  - name: Supplier Portal
    description: >-
      Read a supplier's response to a purchase order and control the one-click
      portal link
  - name: Receiving Reports
    description: Manage receiving reports
  - name: Payment Obligations
    description: Manage payment obligations for purchase orders
  - name: Sales Orders
    description: Manage sales orders and sales order shipments
  - name: Purgatory
    description: >-
      Inspect and resolve non-posted sales orders in the purgatory staging
      workflow
  - name: PickFlow Warehouse
    description: >-
      Warehouse-floor lookups for PickFlow — barcode resolution, bin and product
      stock, bin search, and receivables
  - name: PickFlow Shipping
    description: >-
      Provider-agnostic shipping rates, services, packages, and label purchase
      for PickFlow
  - name: Cycle Counts
    description: >-
      Create, drive, and post PickFlow cycle counts — batches, per-warehouse
      sessions, and CSV import/export
  - name: Print Stations
    description: List paired print stations and enqueue print jobs to them
  - name: Invoices
    description: Get and manage invoices
  - name: Work Orders
    description: >-
      Manage work orders — production lifecycle, steps, materials, links,
      shipments, and comments
  - name: Production Batches
    description: Group and manage work orders as production batches
  - name: Bills
    description: >-
      Accounts payable bill management, payments, attachments, allocations, and
      variance
  - name: Prepayments
    description: Manage vendor prepayments and applications
  - name: Vendor Credits
    description: Manage vendor credits and applications
  - name: Vendor Returns
    description: Manage vendor returns and credit generation
  - name: Customer Returns
    description: Manage customer returns (sales returns), receiving, and restock behavior
  - name: Stock Snapshot
    description: Point-in-time stock snapshots with export support
  - name: Consumption
    description: Consumption reports and exports
  - name: Inventory Aging
    description: Cost-layer-based inventory aging reports
  - name: Bills Reports
    description: Accounts payable bills aging reports
  - name: Forecast
    description: Materialized forecast data
  - name: Reports
    description: Close the books, inventory discrepancy, transaction COGS, and EDI reports
  - name: Tags
    description: Add/remove tags across various resources
  - name: Custom Fields
    description: Get and set custom fields across various resources
  - name: Currency
    description: Currency configuration, exchange rates, and conversion
  - name: Drive
    description: >
      Browse, upload, tag and manage files in your Luminous Drive. An API token
      sees the shared

      drive only, never My Files or restricted folders and files. Every write
      and download made

      through the API is recorded in the file's activity log (`GET
      /file-cabinet/files/{id}/activity`)

      with `actor_kind: api_token`.
  - name: Integration Mappings
    description: Manage integration mappings for external systems
  - name: Integration Field Mappings
    description: Manage field-level mappings between Luminous and external systems
  - name: Automations
    description: Create, test, and inspect automation rules and their runs
paths:
  /sales-orders/{salesOrderId}/items/fulfillment-priority-list:
    post:
      tags:
        - Sales Orders
      summary: Set sales order lines' fulfillment priority list
      description: >
        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 the plan without writing anything.


        - **Targets:** each item gives `fulfillment_priority_list_id` **or**
          `fulfillment_priority_list_name` (case-insensitive), not both. Send
          `"fulfillment_priority_list_id": null` to clear the line's list; the line then falls back
          to the order's list, then the product's, then the default list. Up to 500 items.
        - **Scope:** the order-level list and other lines are not changed,
        except a line merged with
          a named line on the same fulfillment order line (identical SKU). That line moves with the
          named line and is returned with `merged: true`.
        - **Skipped lines:** a line whose fulfillment order is on an active
        picklist, has shipped
          (or partly shipped), has been cancelled, or could not be deleted keeps its list and is
          returned as `skipped` (`will_skip` in a dry run) with a `reason`. Unlike the Re-route
          tool, this endpoint never deletes a shipped or cancelled fulfillment order.
        - **Synchronous:** runs in the request for the one sales order. The
        sales order history
          entry is attributed to the API token and lists each changed line with its old and new
          list ids.
        - **Retries:** after a timeout, don't retry blindly. A retry sees the
        lines already on the
          new list and does nothing. Read the sales order instead; if it has no fulfillment orders,
          call `POST /sales-orders/{salesOrderId}/auto-generate-fulfillment-orders`.

        Requires the `salesOrders.update` permission.
      operationId: setSalesOrderItemFulfillmentPriorityList
      parameters:
        - in: path
          name: salesOrderId
          required: true
          schema:
            type: integer
          description: Sales order ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - items
              properties:
                items:
                  type: array
                  minItems: 1
                  maxItems: 500
                  description: >-
                    Lines to update. Each `sales_order_item_id` may appear only
                    once.
                  items:
                    type: object
                    required:
                      - sales_order_item_id
                    properties:
                      sales_order_item_id:
                        type: integer
                        description: >-
                          Sales order line item ID (must belong to this sales
                          order).
                      fulfillment_priority_list_id:
                        type: integer
                        nullable: true
                        description: >
                          Target fulfillment priority list ID. Send `null`
                          explicitly to clear the

                          line's list. Do not send together with
                          `fulfillment_priority_list_name`.
                      fulfillment_priority_list_name:
                        type: string
                        maxLength: 255
                        nullable: true
                        description: >-
                          Target fulfillment priority list name
                          (case-insensitive).
                dry_run:
                  type: boolean
                  default: false
                  description: When `true`, return the plan and write nothing.
                notes:
                  type: string
                  maxLength: 2000
                  nullable: true
                  description: Optional note recorded with the change.
            example:
              items:
                - sales_order_item_id: 123
                  fulfillment_priority_list_name: Freight
                - sales_order_item_id: 124
                  fulfillment_priority_list_id: 3
                - sales_order_item_id: 125
                  fulfillment_priority_list_id: null
              dry_run: true
              notes: Freight-sized lines
      responses:
        '200':
          description: >
            Dry-run plan or apply result. A dry run returns `lines`,
            `will_unpush_fo_ids`, and

            `preview`. An apply returns `lines` and `result`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      dry_run:
                        type: boolean
                      lines:
                        type: array
                        items:
                          type: object
                          properties:
                            sales_order_item_id:
                              type: integer
                            from_fulfillment_priority_list_id:
                              type: integer
                              nullable: true
                              description: Line's list before the change (`null` = none).
                            to_fulfillment_priority_list_id:
                              type: integer
                              nullable: true
                              description: Line's target list (`null` = cleared).
                            merged:
                              type: boolean
                              description: >-
                                True when the line was not named but moves with
                                a named line merged with it on a fulfillment
                                order line.
                            status:
                              type: string
                              enum:
                                - will_change
                                - will_skip
                                - unchanged
                                - changed
                                - skipped
                              description: >
                                Dry run: `will_change`, `will_skip`, or
                                `unchanged`.

                                Apply: `changed`, `skipped`, or `unchanged`.
                            reason:
                              type: string
                              description: Present on `will_skip` / `skipped` lines.
                              example: Its fulfillment order has an active picklist.
                      will_unpush_fo_ids:
                        type: array
                        description: >-
                          Dry run only. Pushed fulfillment orders that would be
                          unpushed and deleted.
                        items:
                          type: integer
                      preview:
                        type: object
                        description: Dry run only. The Re-route preview.
                        properties:
                          as_of:
                            type: string
                            description: >-
                              Inventory snapshot timestamp the preview was
                              computed at.
                          summary:
                            type: object
                            properties:
                              fo_count:
                                type: integer
                              so_count:
                                type: integer
                              items_changed:
                                type: integer
                          per_so:
                            type: array
                            items:
                              type: object
                              properties:
                                sales_order_id:
                                  type: integer
                                would_split_into:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      warehouse_group_id:
                                        type: integer
                                        nullable: true
                                      fulfillment_priority_list_id:
                                        type: integer
                                      sales_order_item_ids:
                                        type: array
                                        items:
                                          type: integer
                                deleted_fo_ids:
                                  type: array
                                  items:
                                    type: integer
                                skipped_fo_ids:
                                  type: array
                                  description: >-
                                    Fulfillment orders on a picklist, left
                                    untouched.
                                  items:
                                    type: integer
                                unroutable_item_ids:
                                  type: array
                                  description: Lines whose target list has no stock.
                                  items:
                                    type: integer
                                blocked_reasons:
                                  type: array
                                  items:
                                    type: string
                      result:
                        type: object
                        description: Apply only. The Re-route result for this sales order.
                        properties:
                          sales_order_id:
                            type: integer
                          status:
                            type: string
                            enum:
                              - success
                              - skipped
                              - failed
                          items_updated:
                            type: integer
                          deleted_fo_ids:
                            type: array
                            items:
                              type: integer
                          regenerated_fo_ids:
                            type: array
                            items:
                              type: integer
                          skipped_fo_ids:
                            type: array
                            items:
                              type: integer
                          errors:
                            type: array
                            items:
                              type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Bulk fulfillment order re-route is not enabled for this account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      Bulk Fulfillment Order Re-route is not enabled for this
                      tenant.
        '422':
          description: >
            Validation failed (a line is not on this sales order, a list is
            unknown or deleted, an

            item names no list, or names both an id and a name), or the apply
            failed

            (`result.status` is `failed`, for example fulfillment orders were
            deleted but none were

            regenerated). A failed apply returns the same `data` body as a
            `200`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate using a bearer token. To create a token, navigate to
        /settings/api-tokens and click Create API Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.