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

# Get a single non-posted order

> Returns a single sales order that is currently in purgatory, including its
line items, tags, custom fields, and fulfillment orders.

Returns **410 Gone** if the order has already been posted (i.e. it has left
purgatory). The 410 body includes a `redirect` field pointing at the
canonical `GET /sales-orders/{id}` endpoint for posted orders — this is
the expected healthy outcome after a successful purgatory reprocess.




## OpenAPI

````yaml /api-reference/build.yaml get /purgatory/orders/{salesOrderId}
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:
  /purgatory/orders/{salesOrderId}:
    get:
      tags:
        - Purgatory
      summary: Get a single non-posted order
      description: >
        Returns a single sales order that is currently in purgatory, including
        its

        line items, tags, custom fields, and fulfillment orders.


        Returns **410 Gone** if the order has already been posted (i.e. it has
        left

        purgatory). The 410 body includes a `redirect` field pointing at the

        canonical `GET /sales-orders/{id}` endpoint for posted orders — this is

        the expected healthy outcome after a successful purgatory reprocess.
      operationId: getPurgatoryOrder
      parameters:
        - in: path
          name: salesOrderId
          required: true
          schema:
            type: integer
          description: ID of the sales order
      responses:
        '200':
          description: Sales order details
          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
                      custom_fields:
                        type: object
                        description: Dynamic custom fields with key-value pairs
                        additionalProperties:
                          type: string
                      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
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '404':
          description: Order not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '410':
          description: >
            Order has already been posted and is no longer in purgatory. Follow

            the `redirect` field to fetch the posted order via
            `/sales-orders/{id}`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      Sales order is already posted; it is no longer in
                      purgatory.
                  sales_order_id:
                    type: integer
                  status:
                    type: string
                    enum:
                      - posted
                  redirect:
                    type: string
                    description: Canonical path for the posted order
                    example: /external/api/v1/sales-orders/12345
                  hint:
                    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.

````