> ## 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.

# Update a sales order

> Partially update an existing sales order. All body fields are optional — only send fields you want to change.

## Order Status Values
Valid order statuses include: `pending`, `shipped`, `fulfilled`, `cancelled`,
`awaiting_shipment`, `partially_shipped`, `on_hold`, `backorder`

Status changes are applied through the canonical sales-order update flow, so moving an
order to `shipped` creates a shipment and fires the related downstream events. Include
`tracking_number` and `carrier_code` in the same request to stamp them onto that shipment.
A status that cannot be applied returns `400`.




## OpenAPI

````yaml /api-reference/build.yaml patch /sales-orders/{id}
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: Purchase Orders
    description: Get and modify purchase orders
  - 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 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: Integration Mappings
    description: Manage integration mappings for external systems
  - name: Integration Field Mappings
    description: Manage field-level mappings between Luminous and external systems
paths:
  /sales-orders/{id}:
    patch:
      tags:
        - Sales Orders
      summary: Update a sales order
      description: >
        Partially update an existing sales order. All body fields are optional —
        only send fields you want to change.


        ## Order Status Values

        Valid order statuses include: `pending`, `shipped`, `fulfilled`,
        `cancelled`,

        `awaiting_shipment`, `partially_shipped`, `on_hold`, `backorder`


        Status changes are applied through the canonical sales-order update
        flow, so moving an

        order to `shipped` creates a shipment and fires the related downstream
        events. Include

        `tracking_number` and `carrier_code` in the same request to stamp them
        onto that shipment.

        A status that cannot be applied returns `400`.
      operationId: updateSalesOrder
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
          description: ID of the sales order to update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              description: >-
                Sales order partial update. All fields are optional — only send
                fields to change.
              properties:
                order_status:
                  type: string
                  nullable: true
                  description: >-
                    Order status. Valid values: pending, shipped, fulfilled,
                    cancelled, awaiting_shipment, partially_shipped, on_hold,
                    backorder. Status changes are routed through the canonical
                    sales-order update flow, so transitioning to `shipped`
                    creates a shipment (and fires the associated downstream
                    events). Provide `tracking_number` and `carrier_code` in the
                    same request to stamp them onto that shipment. A status that
                    cannot be applied returns `400`.
                customer_email:
                  type: string
                  format: email
                  nullable: true
                  description: Customer email address
                customer_username:
                  type: string
                  nullable: true
                  description: Customer username
                customer_po_number:
                  type: string
                  nullable: true
                  description: Customer purchase order number
                bill_to:
                  type: object
                  nullable: true
                  description: Billing address. If provided, `name` is required.
                  required:
                    - name
                  properties:
                    name:
                      type: string
                      description: Recipient name (required)
                    company:
                      type: string
                      description: Company name
                    street1:
                      type: string
                      description: Address line 1
                    street2:
                      type: string
                      description: Address line 2
                    street3:
                      type: string
                      description: Address line 3
                    city:
                      type: string
                      description: City
                    state:
                      type: string
                      description: State or province
                    postal_code:
                      type: string
                      description: Postal / ZIP code
                    country:
                      type: string
                      maxLength: 2
                      description: Country code (2-character ISO)
                    phone:
                      type: string
                      description: Phone number
                ship_to:
                  type: object
                  nullable: true
                  description: Shipping address. If provided, `name` is required.
                  required:
                    - name
                  properties:
                    name:
                      type: string
                      description: Recipient name (required)
                    company:
                      type: string
                      description: Company name
                    street1:
                      type: string
                      description: Address line 1
                    street2:
                      type: string
                      description: Address line 2
                    street3:
                      type: string
                      description: Address line 3
                    city:
                      type: string
                      description: City
                    state:
                      type: string
                      description: State or province
                    postal_code:
                      type: string
                      description: Postal / ZIP code
                    country:
                      type: string
                      maxLength: 2
                      description: Country code (2-character ISO)
                    phone:
                      type: string
                      description: Phone number
                ship_date:
                  type: string
                  format: date
                  nullable: true
                  description: Ship date
                hold_until_date:
                  type: string
                  format: date
                  nullable: true
                  description: Hold until date
                ship_by_date:
                  type: string
                  format: date
                  nullable: true
                  description: Ship by date
                earliest_ship_date:
                  type: string
                  format: date
                  nullable: true
                  description: Earliest ship date
                requested_shipping_service:
                  type: string
                  nullable: true
                  description: Requested shipping service
                carrier_code:
                  type: string
                  nullable: true
                  description: >-
                    Carrier code. When `order_status` is set to `shipped`, this
                    carrier is applied to the shipment created by the status
                    change.
                tracking_number:
                  type: string
                  nullable: true
                  maxLength: 255
                  description: >-
                    Tracking number. When `order_status` is set to `shipped`,
                    this tracking number is applied to the shipment created by
                    the status change.
                service_code:
                  type: string
                  nullable: true
                  description: Service code
                customer_notes:
                  type: string
                  nullable: true
                  description: Customer-facing notes
                internal_notes:
                  type: string
                  nullable: true
                  description: Internal notes
                gift_message:
                  type: string
                  nullable: true
                  description: Gift message
                gift:
                  type: boolean
                  description: Whether the order is a gift
                international_options:
                  type: array
                  nullable: true
                  description: International shipping options
                  items:
                    type: object
                custom_fields:
                  type: array
                  nullable: true
                  description: Custom field values
                  items:
                    nullable: true
                tags:
                  type: array
                  nullable: true
                  description: Array of tag strings
                  items:
                    type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: Unique identifier for the sales order
                      created_at:
                        type: string
                        format: date-time
                        description: Timestamp when the order was created
                      updated_at:
                        type: string
                        format: date-time
                        description: Timestamp when the order was last updated
                      status:
                        type: string
                        description: Current status of the order
                      order_id:
                        type: string
                        description: External order identifier
                      order_number:
                        type: string
                        description: Order number
                      order_date:
                        type: string
                        format: date
                        description: Date when the order was placed
                      payment_date:
                        type: string
                        format: date
                        description: Date when payment was received
                      ship_by_date:
                        type: string
                        format: date
                        description: Required ship by date
                      age:
                        type: integer
                        description: Age of the order in days
                      order_status:
                        type: string
                        description: Status of the order
                      customer_id:
                        type: string
                        description: Customer identifier
                      customer_username:
                        type: string
                        description: Customer's username
                      customer_email:
                        type: string
                        description: Customer's email address
                      bill_to:
                        type: object
                        description: Billing information
                      ship_to:
                        type: object
                        description: Shipping information
                      requested_shipping_service:
                        type: string
                        nullable: true
                        description: What shipping service to use when shipping this order
                      total:
                        type: number
                        format: float
                        description: Total order amount
                      total_paid:
                        type: number
                        format: float
                        description: Amount paid
                      total_tax:
                        type: number
                        format: float
                        description: Total tax amount
                      total_shipping:
                        type: number
                        format: float
                        description: Total shipping amount
                      customer_notes:
                        type: string
                        description: Notes from the customer
                      internal_notes:
                        type: string
                        description: Internal notes
                      ship_date:
                        type: string
                        format: date
                        description: Date when order was shipped
                      hold_until_date:
                        type: string
                        format: date
                        description: Hold until date
                      earliest_ship_date:
                        type: string
                        format: date
                        nullable: true
                        description: Earliest date the order can be shipped
                      user_id:
                        type: integer
                        description: User ID associated with the order
                      externally_fulfilled:
                        type: boolean
                        description: Whether the order is fulfilled externally
                      externally_fulfilled_by:
                        type: string
                        description: Entity fulfilling the order externally
                      is_posted:
                        type: boolean
                        description: Whether the order is posted
                      posted_by:
                        type: string
                        description: User who posted the order
                      not_sync:
                        type: boolean
                        description: Sync status
                      sales_posted:
                        type: boolean
                        description: Sales posting status
                      split_order:
                        type: boolean
                        description: Whether the order is split
                      skip_inventory:
                        type: boolean
                        description: Whether to skip inventory
                      skip_sales_report:
                        type: boolean
                        description: Whether to skip sales report
                      channel_id:
                        type: integer
                        description: Channel identifier
                      total_order_cost:
                        type: number
                        format: float
                        description: Total cost of order
                      total_order_quantity:
                        type: number
                        format: float
                        description: Total quantity of items
                      order_cost_details:
                        type: object
                        description: Detailed order cost information
                      source:
                        type: string
                        description: Order source
                      shipstation_order_id:
                        type: string
                        description: ShipStation order identifier
                      type:
                        type: string
                        description: Order type
                      parent_id:
                        type: integer
                        description: Parent order ID if applicable
                      shipping_revenue:
                        type: number
                        format: float
                        description: Revenue from shipping
                      product_total:
                        type: number
                        format: float
                        description: Total product amount
                      total_discount:
                        type: number
                        format: float
                        description: Total discount amount
                      picking_status:
                        type: string
                        description: Status of picking process
                      starred_description:
                        type: string
                        description: Description for starred orders
                      customer_po_number:
                        type: string
                        description: Customer PO number
                      company_id:
                        type: integer
                        nullable: true
                        description: >-
                          ID of the company (business account) associated with
                          this sales order. Only present when a company is
                          associated with the order.
                        example: 123
                      company:
                        nullable: true
                        description: >-
                          Full company (business account) details associated
                          with this sales order. Only present when a company is
                          associated with the order.
                        type: object
                        properties:
                          id:
                            type: integer
                            description: Unique identifier for the company
                            example: 123456
                          created_at:
                            type: string
                            format: date-time
                            description: When the company was created
                            example: '2023-03-15T14:30:00Z'
                          updated_at:
                            type: string
                            format: date-time
                            description: When the company was last updated
                            example: '2023-03-15T14:30:00Z'
                          status:
                            type: string
                            description: Status of the company
                            enum:
                              - active
                              - inactive
                            example: active
                          name:
                            type: string
                            description: Company name
                            example: Acme Corporation
                          type:
                            type: string
                            nullable: true
                            description: Type of business
                            example: Retail
                          phone:
                            type: string
                            nullable: true
                            description: Primary phone number for the company
                            example: 555-123-4567
                          address:
                            type: string
                            nullable: true
                            description: Street address for the company
                            example: 123 Main St
                          address_line_2:
                            type: string
                            nullable: true
                            description: Additional address information
                            example: Suite 500
                          city:
                            type: string
                            nullable: true
                            description: City
                            example: Austin
                          state:
                            type: string
                            nullable: true
                            description: State/province
                            example: TX
                          postal_code:
                            type: string
                            nullable: true
                            description: Postal/ZIP code
                            example: '78701'
                          country:
                            type: string
                            nullable: true
                            description: Country
                            example: USA
                          full_address:
                            type: string
                            nullable: true
                            description: Complete formatted address
                            example: 123 Main St, Suite 500, Austin, TX 78701, USA
                          shipping_first_name:
                            type: string
                            nullable: true
                            description: First name for shipping contact (legacy field)
                            example: John
                          shipping_last_name:
                            type: string
                            nullable: true
                            description: Last name for shipping contact (legacy field)
                            example: Doe
                          shipping_email:
                            type: string
                            format: email
                            nullable: true
                            description: Email for shipping contact (legacy field)
                            example: shipping@acmecorp.com
                          shipping_phone:
                            type: string
                            nullable: true
                            description: Phone number for shipping contact (legacy field)
                            example: 555-987-6543
                          shipping_address:
                            type: string
                            nullable: true
                            description: Shipping street address (legacy field)
                            example: 456 Warehouse Blvd
                          shipping_city:
                            type: string
                            nullable: true
                            description: Shipping city (legacy field)
                            example: Austin
                          shipping_state:
                            type: string
                            nullable: true
                            description: Shipping state/province (legacy field)
                            example: TX
                          shipping_postal_code:
                            type: string
                            nullable: true
                            description: Shipping postal/ZIP code (legacy field)
                            example: '78745'
                          shipping_country:
                            type: string
                            nullable: true
                            description: Shipping country (legacy field)
                            example: USA
                          shipping_full_address:
                            type: string
                            nullable: true
                            description: Complete formatted shipping address (legacy field)
                            example: 456 Warehouse Blvd, Austin, TX 78745, USA
                          payment_term:
                            type: string
                            nullable: true
                            description: Payment terms for the company
                            example: Net 30
                          tax_exempt:
                            type: boolean
                            nullable: true
                            description: Whether the company is exempt from taxes
                            example: false
                          tax_rate:
                            type: number
                            format: float
                            nullable: true
                            description: Tax rate applied to the company's orders
                            example: 8.25
                          due_date_days:
                            type: integer
                            nullable: true
                            description: Number of days until payment is due
                            example: 30
                          header_discount_enabled:
                            type: boolean
                            description: >-
                              Whether an order-header trade discount is applied
                              by default for this company
                            example: false
                          header_discount_type:
                            type: string
                            nullable: true
                            enum:
                              - PERCENT
                              - FIXED_AMOUNT
                            description: >-
                              How the header discount is calculated — a
                              percentage of the order or a fixed amount
                            example: PERCENT
                          header_discount_value:
                            type: number
                            format: float
                            nullable: true
                            description: >-
                              The header discount amount — a percentage when
                              `header_discount_type` is `PERCENT`, otherwise a
                              fixed currency amount
                            example: 5
                          header_discount_effective_from:
                            type: string
                            format: date
                            nullable: true
                            description: >-
                              Date from which the header discount takes effect
                              (YYYY-MM-DD)
                            example: '2026-01-01'
                          price_level:
                            nullable: true
                            description: Price level associated with this company
                            type: object
                            properties:
                              id:
                                type: number
                                description: Unique identifier for the price level
                                example: 123
                              created_at:
                                type: string
                                format: date-time
                                description: When the price level was created
                                example: '2023-03-15T14:30:00Z'
                              updated_at:
                                type: string
                                format: date-time
                                description: When the price level was last updated
                                example: '2023-03-15T14:30:00Z'
                              status:
                                type: string
                                description: Status of the price level
                                enum:
                                  - active
                                  - inactive
                                example: active
                              name:
                                type: string
                                description: Name of the price level
                                example: Wholesale
                              type:
                                type: string
                                description: Type of the price level
                                example: percentage
                              percent_increase:
                                type: number
                                format: float
                                description: >-
                                  Percentage increase (or decrease) for this
                                  price level
                                example: 15.5
                          notes:
                            type: string
                            nullable: true
                            description: Additional notes about the company
                            example: Key account, requires special handling
                          fein:
                            type: string
                            nullable: true
                            description: Federal Employer Identification Number
                            example: 12-3456789
                          tags:
                            type: array
                            nullable: true
                            description: List of tags associated with the company
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  description: Unique identifier for the tag
                                name:
                                  type: string
                                  description: Name of the tag
                                description:
                                  type: string
                                  nullable: true
                                  description: Description of the tag
                                icon:
                                  type: string
                                  nullable: true
                                  description: Icon identifier or URL for the tag
                                color:
                                  type: string
                                  nullable: true
                                  description: Color code for the tag
                              required:
                                - id
                                - name
                          default_shipping:
                            nullable: true
                            description: Default shipping address
                            type: object
                            properties:
                              id:
                                type: integer
                                description: Unique identifier for the shipping address
                                example: 789
                              created_at:
                                type: string
                                format: date-time
                                description: When the shipping address was created
                                example: '2023-03-15T14:30:00Z'
                              updated_at:
                                type: string
                                format: date-time
                                description: When the shipping address was last updated
                                example: '2023-03-15T14:30:00Z'
                              company_id:
                                type: integer
                                description: >-
                                  ID of the company this shipping address
                                  belongs to
                                example: 123456
                              company_name:
                                type: string
                                nullable: true
                                description: Name of the company
                                example: Acme Corporation
                              address:
                                type: string
                                description: Street address
                                example: 456 Warehouse Blvd
                              address_line_2:
                                type: string
                                nullable: true
                                description: Additional address information
                                example: Building 2
                              city:
                                type: string
                                description: City
                                example: Austin
                              state:
                                type: string
                                description: State/province
                                example: TX
                              postal_code:
                                type: string
                                description: Postal/ZIP code
                                example: '78745'
                              country:
                                type: string
                                description: Country
                                example: USA
                              full_address:
                                type: string
                                description: Complete formatted address
                                example: >-
                                  456 Warehouse Blvd, Building 2, Austin, TX
                                  78745, USA
                              full_name:
                                type: string
                                description: Full name of the contact person
                                example: John Doe
                              first_name:
                                type: string
                                nullable: true
                                description: First name of the contact person
                                example: John
                              last_name:
                                type: string
                                nullable: true
                                description: Last name of the contact person
                                example: Doe
                              phone:
                                type: string
                                nullable: true
                                description: Phone number
                                example: 555-987-6543
                              email:
                                type: string
                                format: email
                                nullable: true
                                description: Email address
                                example: shipping@acmecorp.com
                              is_default:
                                type: boolean
                                description: Whether this is the default shipping address
                                example: true
                            required:
                              - id
                              - company_id
                              - address
                              - city
                              - state
                              - postal_code
                              - country
                          shipping_addresses:
                            type: array
                            nullable: true
                            description: List of shipping addresses for the company
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  description: Unique identifier for the shipping address
                                  example: 789
                                created_at:
                                  type: string
                                  format: date-time
                                  description: When the shipping address was created
                                  example: '2023-03-15T14:30:00Z'
                                updated_at:
                                  type: string
                                  format: date-time
                                  description: When the shipping address was last updated
                                  example: '2023-03-15T14:30:00Z'
                                company_id:
                                  type: integer
                                  description: >-
                                    ID of the company this shipping address
                                    belongs to
                                  example: 123456
                                company_name:
                                  type: string
                                  nullable: true
                                  description: Name of the company
                                  example: Acme Corporation
                                address:
                                  type: string
                                  description: Street address
                                  example: 456 Warehouse Blvd
                                address_line_2:
                                  type: string
                                  nullable: true
                                  description: Additional address information
                                  example: Building 2
                                city:
                                  type: string
                                  description: City
                                  example: Austin
                                state:
                                  type: string
                                  description: State/province
                                  example: TX
                                postal_code:
                                  type: string
                                  description: Postal/ZIP code
                                  example: '78745'
                                country:
                                  type: string
                                  description: Country
                                  example: USA
                                full_address:
                                  type: string
                                  description: Complete formatted address
                                  example: >-
                                    456 Warehouse Blvd, Building 2, Austin, TX
                                    78745, USA
                                full_name:
                                  type: string
                                  description: Full name of the contact person
                                  example: John Doe
                                first_name:
                                  type: string
                                  nullable: true
                                  description: First name of the contact person
                                  example: John
                                last_name:
                                  type: string
                                  nullable: true
                                  description: Last name of the contact person
                                  example: Doe
                                phone:
                                  type: string
                                  nullable: true
                                  description: Phone number
                                  example: 555-987-6543
                                email:
                                  type: string
                                  format: email
                                  nullable: true
                                  description: Email address
                                  example: shipping@acmecorp.com
                                is_default:
                                  type: boolean
                                  description: Whether this is the default shipping address
                                  example: true
                              required:
                                - id
                                - company_id
                                - address
                                - city
                                - state
                                - postal_code
                                - country
                          billing_info:
                            type: object
                            nullable: true
                            description: Billing information
                            properties:
                              id:
                                type: integer
                                example: 456
                              created_at:
                                type: string
                                format: date-time
                                example: '2023-03-15T14:30:00Z'
                              updated_at:
                                type: string
                                format: date-time
                                example: '2023-03-15T14:30:00Z'
                              first_name:
                                type: string
                                nullable: true
                                example: Jane
                              last_name:
                                type: string
                                nullable: true
                                example: Smith
                              email:
                                type: string
                                format: email
                                nullable: true
                                example: accounting@acmecorp.com
                              receiving_bank_name:
                                type: string
                                nullable: true
                                example: First National Bank
                              receiving_bank_address:
                                type: string
                                nullable: true
                                example: 789 Finance Street, Austin, TX 78701
                          client_type:
                            type: object
                            nullable: true
                            description: Type of client
                            properties:
                              id:
                                type: integer
                                example: 123
                              created_at:
                                type: string
                                format: date-time
                                example: '2023-03-15T14:30:00Z'
                              updated_at:
                                type: string
                                format: date-time
                                example: '2023-03-15T14:30:00Z'
                              name:
                                type: string
                                example: Retail
                              description:
                                type: string
                                nullable: true
                                example: Retail business client
                          parent_company_id:
                            type: integer
                            nullable: true
                            description: ID of the parent company
                            example: 456
                          invoice_export_template_id:
                            type: integer
                            nullable: true
                            description: ID of the invoice export template
                            example: 789
                          custom_fields:
                            type: object
                            description: Custom fields for the company
                            example:
                              Industry: Manufacturing
                              Region: Southwest
                              Annual Revenue: $5M-$10M
                          assigned_sales_reps:
                            type: array
                            description: >
                              Sales rep users assigned to this company (Go Team
                              members). Resolved from the company's

                              `goTeamMember.user` relation. Only present when
                              the relation is loaded.
                            items:
                              type: object
                              properties:
                                id:
                                  type: integer
                                  description: User ID of the assigned sales rep
                                  example: 42
                                email:
                                  type: string
                                  description: >-
                                    Email of the assigned sales rep (PII-hashed
                                    when PII filtering is enabled)
                                  example: rep@example.com
                                first_name:
                                  type: string
                                  nullable: true
                                  example: Jane
                                last_name:
                                  type: string
                                  nullable: true
                                  example: Doe
                          sales_channel:
                            allOf:
                              - type: object
                                properties:
                                  id:
                                    type: integer
                                    description: Sales channel ID.
                                  status:
                                    type: string
                                    description: Sales channel status (e.g. active).
                                  label:
                                    type: string
                                    nullable: true
                                    description: Human-readable channel label.
                                  channel_type:
                                    type: string
                                    nullable: true
                                    description: >-
                                      Channel type (e.g. the
                                      integration/platform the channel
                                      represents).
                                  created_at:
                                    type: string
                                    format: date-time
                                  updated_at:
                                    type: string
                                    format: date-time
                            nullable: true
                            description: >-
                              The company's default sales channel. Only present
                              when the relation is loaded.
                        required:
                          - id
                          - name
                          - status
                      items:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Unique identifier for the order item
                            line_number:
                              type: integer
                              description: >-
                                Sequential line number for this item on the
                                sales order, only unique within the order,
                                starts at 1
                            created_at:
                              type: string
                              format: date-time
                              description: Creation timestamp
                            updated_at:
                              type: string
                              format: date-time
                              description: Last update timestamp
                            sku:
                              type: string
                              description: Stock keeping unit
                            name:
                              type: string
                              description: Product name
                            image_url:
                              type: string
                              description: URL of product image
                            weight:
                              type: object
                              description: Weight information
                            quantity:
                              type: number
                              format: float
                              description: Ordered quantity
                            unit_price:
                              type: number
                              format: float
                              description: Price per unit
                            tax:
                              type: number
                              format: float
                              description: Tax amount
                            shipping:
                              type: number
                              format: float
                              description: Shipping amount
                            warehouse_location:
                              type: string
                              description: Location in warehouse
                            options:
                              type: object
                              description: Additional options
                            fulfillment_sku:
                              type: string
                              description: SKU used for fulfillment
                            adjustment:
                              type: number
                              format: float
                              description: Price adjustment
                            upc:
                              type: string
                              description: Universal Product Code
                            stock_id:
                              type: integer
                              description: Stock identifier
                            kit_id:
                              type: integer
                              description: Kit identifier if part of a kit
                            non_physical_item:
                              type: boolean
                              description: Whether item is non-physical
                            ignore_item:
                              type: boolean
                              description: Whether to ignore this item
                            quantity_shipped:
                              type: number
                              format: float
                              description: Quantity shipped
                            quantity_cancelled:
                              type: number
                              format: float
                              description: Quantity cancelled
                            quantity_invoiced:
                              type: number
                              format: float
                              description: Quantity invoiced
                            quantity_ordered:
                              type: number
                              format: float
                              description: Original quantity ordered
                            base_uom_id:
                              type: integer
                              description: Base unit of measure ID
                            ordered_uom_id:
                              type: integer
                              description: Ordered unit of measure ID
                            product_id:
                              type: integer
                              description: Product identifier
                            total_returned_base_quantity:
                              type: number
                              format: float
                              description: Total quantity returned
                            parent_id:
                              type: integer
                              description: Parent item ID
                            status:
                              type: string
                              description: Item status
                            discount:
                              type: number
                              format: float
                              description: Discount amount
                            estimated_ship_date:
                              type: string
                              format: date
                              description: Estimated shipping date
                            custom_fields:
                              type: object
                              description: Dynamic custom fields with key-value pairs
                              additionalProperties:
                                type: string
                            product:
                              type: object
                              description: Product information
                              properties:
                                id:
                                  type: integer
                                  description: Unique identifier for the product
                                name:
                                  type: string
                                  description: Product name
                                description:
                                  type: string
                                  nullable: true
                                  description: Product description
                                retail_price:
                                  type: number
                                  format: float
                                  description: Retail price
                                wholesale_price:
                                  type: number
                                  format: float
                                  description: Wholesale price
                                unit_cost:
                                  type: number
                                  format: float
                                  description: Cost per unit
                                product_weight:
                                  type: number
                                  format: float
                                  description: Weight of the product
                                product_length:
                                  type: number
                                  format: float
                                  description: Length of the product (in inches)
                                product_width:
                                  type: number
                                  format: float
                                  description: Width of the product (in inches)
                                product_height:
                                  type: number
                                  format: float
                                  description: Height of the product (in inches)
                                sellable:
                                  type: boolean
                                  description: Whether the product can be sold
                                discontinued:
                                  type: boolean
                                  description: >-
                                    Whether the product is discontinued.
                                    Discontinued products will be hidden in the
                                    Luminous UI by default.
                                image_url:
                                  type: string
                                  nullable: true
                                  description: URL to the product's main image
                                category:
                                  type: object
                                  nullable: true
                                  properties:
                                    id:
                                      type: integer
                                    name:
                                      type: string
                                  description: Product category information
                                subcategory:
                                  type: object
                                  nullable: true
                                  properties:
                                    id:
                                      type: integer
                                    name:
                                      type: string
                                  description: Product subcategory information
                                custom_fields:
                                  type: object
                                  description: Dynamic custom fields with key-value pairs
                                  additionalProperties:
                                    type: string
                                variant_attributes:
                                  type: object
                                  nullable: true
                                  description: Available variant attributes
                                sku:
                                  type: string
                                  description: Internal SKU
                                alternate_skus:
                                  type: array
                                  description: Alternate SKUs
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                      sku:
                                        type: string
                                upc:
                                  type: string
                                  description: UPC/Barcode
                                tags:
                                  type: array
                                  description: Tags associated with the product
                                  items:
                                    type: object
                                    properties:
                                      id:
                                        type: integer
                                        description: Unique identifier for the tag
                                      name:
                                        type: string
                                        description: Name of the tag
                                      description:
                                        type: string
                                        nullable: true
                                        description: Description of the tag
                                      icon:
                                        type: string
                                        nullable: true
                                        description: Icon identifier or URL for the tag
                                      color:
                                        type: string
                                        nullable: true
                                        description: Color code for the tag
                                    required:
                                      - id
                                      - name
                                supplier:
                                  type: object
                                  nullable: true
                                  description: Supplier information
                                created_at:
                                  type: string
                                  format: date-time
                                  description: Timestamp when the product was created
                                updated_at:
                                  type: string
                                  format: date-time
                                  description: Timestamp when the product was last updated
                            tags:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  description:
                                    type: string
                                  icon:
                                    type: string
                                  color:
                                    type: string
                                  discount_structure:
                                    type: object
                                  markup_structure:
                                    type: object
                              description: Tags associated with the sales order item
                        description: Line items in the order
                      tags:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            description:
                              type: string
                            icon:
                              type: string
                            color:
                              type: string
                            discount_structure:
                              type: object
                            markup_structure:
                              type: object
                        description: Tags associated with the order
                      shipments:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Unique identifier for the shipment
                            sales_order_id:
                              type: integer
                              description: ID of the associated sales order
                            ship_date:
                              type: string
                              format: date
                              description: Date when the shipment was or will be sent
                            tracking_number:
                              type: string
                              description: Tracking number for the shipment
                            bol_number:
                              type: string
                              description: Bill of Lading Number for logistics tracking
                              example: BOL-123456789
                            pro_number:
                              type: string
                              description: >-
                                Progressive Rotating Order Number (common in LTL
                                shipping)
                              example: PRO-987654321
                            partner_reference_number:
                              type: string
                              description: >-
                                General reference number from/for the shipping
                                partner
                              example: PARTNER-REF-001
                            is_return:
                              type: boolean
                              description: Whether this is a return shipment
                            carrier_code:
                              type: string
                              description: Code identifying the carrier (e.g., ups, fedex)
                            scac:
                              type: string
                              nullable: true
                              description: >-
                                Standard Carrier Alpha Code (SCAC) for the
                                shipment's carrier; included on outbound EDI
                                856/810 documents
                            service_code:
                              type: string
                              description: Code identifying the shipping service
                            package_code:
                              type: string
                              description: Code identifying the package type
                            shipment_cost:
                              type: number
                              format: float
                              description: Cost of shipping
                            insurance_cost:
                              type: number
                              format: float
                              description: Cost of insurance
                            warehouse_group_id:
                              type: integer
                              nullable: true
                              description: >-
                                ID of the warehouse group associated with this
                                shipment (from the linked fulfillment order)
                            status:
                              type: integer
                              description: Status of the shipment
                            ship_to:
                              type: object
                              properties:
                                name:
                                  type: string
                                  description: Recipient name
                                company:
                                  type: string
                                  description: Company name
                                street1:
                                  type: string
                                  description: Primary street address
                                street2:
                                  type: string
                                  description: Secondary street address
                                street3:
                                  type: string
                                  description: Additional street address
                                city:
                                  type: string
                                  description: City
                                state:
                                  type: string
                                  description: State/province
                                postalCode:
                                  type: string
                                  description: Postal/ZIP code
                                country:
                                  type: string
                                  description: Country
                                phone:
                                  type: string
                                  description: Contact phone number
                                residential:
                                  type: boolean
                                  description: Whether this is a residential address
                            weight:
                              type: object
                              required:
                                - value
                                - units
                              properties:
                                value:
                                  type: number
                                  format: float
                                  description: Weight value
                                units:
                                  type: string
                                  enum:
                                    - ounces
                                    - pounds
                                    - grams
                                    - kilograms
                                  description: Unit of weight measurement
                            dimensions:
                              type: object
                              required:
                                - units
                                - length
                                - width
                                - height
                              properties:
                                units:
                                  type: string
                                  enum:
                                    - inches
                                    - centimeters
                                  description: Unit of dimensional measurement
                                length:
                                  type: number
                                  format: float
                                  description: Length of the package
                                width:
                                  type: number
                                  format: float
                                  description: Width of the package
                                height:
                                  type: number
                                  format: float
                                  description: Height of the package
                            items:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: Unique identifier for the shipment item
                                  shipment_id:
                                    type: integer
                                    description: ID of the parent shipment
                                  product_id:
                                    type: integer
                                    description: ID of the product being shipped
                                  sales_order_item_id:
                                    type: integer
                                    description: >-
                                      Luminous sales order line-item ID (the
                                      internal item primary key) for the line
                                      being shipped. This is the value to pass
                                      back as `order_item_id` when creating a
                                      shipment for this order. For kit/bundle
                                      component lines that share a single
                                      upstream channel line, each component is
                                      still returned with its own distinct
                                      `sales_order_item_id`.
                                  quantity:
                                    type: number
                                    description: >-
                                      Quantity being shipped, expressed in the
                                      same unit of measure the associated sales
                                      order line was ordered in (the selling
                                      UoM, e.g. cartons) rather than internal
                                      base units. When the originating order
                                      line cannot be resolved, the stored
                                      quantity is returned as-is.
                                  weight:
                                    type: object
                                    required:
                                      - value
                                      - units
                                    properties:
                                      value:
                                        type: number
                                        format: float
                                        description: Weight value
                                      units:
                                        type: string
                                        enum:
                                          - ounces
                                          - pounds
                                          - grams
                                          - kilograms
                                        description: Unit of weight measurement
                                  unit_price:
                                    type: number
                                    format: float
                                    description: Price per unit
                                  created_at:
                                    type: string
                                    format: date-time
                                    description: Timestamp when the item was created
                                  updated_at:
                                    type: string
                                    format: date-time
                                    description: Timestamp when the item was last updated
                              description: Items included in this shipment
                            created_at:
                              type: string
                              format: date-time
                              description: Timestamp when the shipment was created
                            updated_at:
                              type: string
                              format: date-time
                              description: Timestamp when the shipment was last updated
                        description: Shipments associated with order
                      custom_fields:
                        type: object
                        description: Dynamic custom fields with key-value pairs
                        additionalProperties:
                          type: string
        '400':
          description: Status change could not be applied (e.g. invalid status transition)
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Sales order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  errors:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        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.

````