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

# Purchase orders

> Get a paginated list of purchase orders with optional filtering.

For detailed information about the filtering system and available operators, 
refer to the [Filter System Documentation](/filters).

## Available Filters

### String Filters
- `order_numbers`: Purchase order numbers (alternate IDs) - searches across all order numbers
- `public_note`: Public notes content
- `private_note`: Private notes content
- `tag`: Order tags

### Date Filters
- `order_date`: Date the order was placed
- `invoice_date`: Date the order was invoiced
- `requested_ship_date`: Requested shipping date
- `arrival_due_date`: Expected arrival date

### DateTime Filters
- `created_at`: When the order was created
- `updated_at`: When the order was last updated

### Numeric Filters
- `order_quantity`: Total number of items ordered
- `order_cost`: Base cost before tax and shipping (calculated from line items)
- `total_cost`: Total cost including tax and shipping
- `total_tax`: Tax amount
- `total_shipping_cost`: Shipping cost
- `total_paid`: Amount paid
- `total_qty_ordered`: Total quantity of line items ordered (sum of `ordered_qty` from all items)
- `total_qty_received`: Total quantity of line items received (sum of `received_qty` from all items)
- `total_qty_remaining`: Total quantity of line items remaining to be received (ordered - received)

### Boolean Filters
- `starred`: Whether the order is starred

### ID Filters
- `supplier_id`: Filter by supplier
- `warehouse_id`: Filter by warehouse
- `location_id`: Filter by location

### Enum Filters
- `order_status`: Milestone status token or numeric id (active, production_started, production_completed, in_transit, completed, deleted; `inactive` deprecated alias for completed)

## Examples
```
# Find active orders with total cost over $1000
?order_status=active&total_cost[gt]=1000.00

# Find starred orders from a specific supplier
?starred=1&supplier_id=123

# Find orders by order number
?order_numbers=PO-2024-001

# Find orders with remaining quantity greater than 0
?total_qty_remaining[gt]=0

# Find recent orders with specific shipping costs
?total_shipping_cost=50.00&created_at[gte]=2024-10-25 00:00:00
```




## OpenAPI

````yaml /api-reference/build.yaml get /purchase-orders
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:
  /purchase-orders:
    get:
      tags:
        - Purchase Orders
      summary: Purchase orders
      description: >
        Get a paginated list of purchase orders with optional filtering.


        For detailed information about the filtering system and available
        operators, 

        refer to the [Filter System Documentation](/filters).


        ## Available Filters


        ### String Filters

        - `order_numbers`: Purchase order numbers (alternate IDs) - searches
        across all order numbers

        - `public_note`: Public notes content

        - `private_note`: Private notes content

        - `tag`: Order tags


        ### Date Filters

        - `order_date`: Date the order was placed

        - `invoice_date`: Date the order was invoiced

        - `requested_ship_date`: Requested shipping date

        - `arrival_due_date`: Expected arrival date


        ### DateTime Filters

        - `created_at`: When the order was created

        - `updated_at`: When the order was last updated


        ### Numeric Filters

        - `order_quantity`: Total number of items ordered

        - `order_cost`: Base cost before tax and shipping (calculated from line
        items)

        - `total_cost`: Total cost including tax and shipping

        - `total_tax`: Tax amount

        - `total_shipping_cost`: Shipping cost

        - `total_paid`: Amount paid

        - `total_qty_ordered`: Total quantity of line items ordered (sum of
        `ordered_qty` from all items)

        - `total_qty_received`: Total quantity of line items received (sum of
        `received_qty` from all items)

        - `total_qty_remaining`: Total quantity of line items remaining to be
        received (ordered - received)


        ### Boolean Filters

        - `starred`: Whether the order is starred


        ### ID Filters

        - `supplier_id`: Filter by supplier

        - `warehouse_id`: Filter by warehouse

        - `location_id`: Filter by location


        ### Enum Filters

        - `order_status`: Milestone status token or numeric id (active,
        production_started, production_completed, in_transit, completed,
        deleted; `inactive` deprecated alias for completed)


        ## Examples

        ```

        # Find active orders with total cost over $1000

        ?order_status=active&total_cost[gt]=1000.00


        # Find starred orders from a specific supplier

        ?starred=1&supplier_id=123


        # Find orders by order number

        ?order_numbers=PO-2024-001


        # Find orders with remaining quantity greater than 0

        ?total_qty_remaining[gt]=0


        # Find recent orders with specific shipping costs

        ?total_shipping_cost=50.00&created_at[gte]=2024-10-25 00:00:00

        ```
      operationId: getPurchaseOrders
      parameters:
        - in: query
          name: page
          schema:
            type: integer
            default: 1
          description: Page number for pagination
        - in: query
          name: per_page
          schema:
            type: integer
            default: 10
            maximum: 100
          description: Number of items per page (max 100)
        - in: query
          name: order_numbers
          schema:
            type: string
          description: >-
            Filter by purchase order numbers (alternate IDs). Searches across
            all order numbers associated with the purchase order.
        - in: query
          name: public_note
          schema:
            type: string
          description: Filter by public note content
        - in: query
          name: private_note
          schema:
            type: string
          description: Filter by private note content
        - in: query
          name: tag
          schema:
            type: string
          description: Filter by tags
        - in: query
          name: order_date
          schema:
            type: string
            format: date
          description: Filter by order date (YYYY-MM-DD)
        - in: query
          name: invoice_date
          schema:
            type: string
            format: date
          description: Filter by invoice date (YYYY-MM-DD)
        - in: query
          name: requested_ship_date
          schema:
            type: string
            format: date
          description: Filter by requested ship date (YYYY-MM-DD)
        - in: query
          name: arrival_due_date
          schema:
            type: string
            format: date
          description: Filter by arrival due date (YYYY-MM-DD)
        - in: query
          name: created_at
          schema:
            type: string
            format: date-time
          description: Filter by creation date (YYYY-MM-DD HH:mm:ss)
        - in: query
          name: updated_at
          schema:
            type: string
            format: date-time
          description: Filter by last update date (YYYY-MM-DD HH:mm:ss)
        - in: query
          name: order_quantity
          schema:
            type: number
          description: Filter by total number of items ordered
        - in: query
          name: total_qty_ordered
          schema:
            type: number
          description: >-
            Filter by total quantity of line items ordered (sum of `ordered_qty`
            from all items)
        - in: query
          name: total_qty_received
          schema:
            type: number
          description: Filter by total quantity of line items received
        - in: query
          name: total_qty_remaining
          schema:
            type: number
          description: >-
            Filter by total quantity of line items remaining to be received
            (ordered - received)
        - in: query
          name: order_cost
          schema:
            type: number
          description: Filter by order cost
        - in: query
          name: total_cost
          schema:
            type: number
          description: Filter by total cost (including tax and shipping)
        - in: query
          name: total_tax
          schema:
            type: number
          description: Filter by tax amount
        - in: query
          name: total_shipping_cost
          schema:
            type: number
          description: Filter by shipping cost
        - in: query
          name: total_paid
          schema:
            type: number
          description: Filter by amount paid
        - in: query
          name: starred
          schema:
            type: boolean
          description: Filter by starred status
        - in: query
          name: supplier_id
          schema:
            type: integer
          description: Filter by supplier ID
        - in: query
          name: warehouse_id
          schema:
            type: integer
          description: Filter by warehouse ID
        - in: query
          name: location_id
          schema:
            type: integer
          description: Filter by location ID
        - in: query
          name: order_status
          schema:
            type: string
            enum:
              - active
              - inactive
              - deleted
          description: Filter by order status
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: Unique identifier for the purchase order
                        order_numbers:
                          type: array
                          description: List of purchase order numbers
                          items:
                            type: string
                        created_at:
                          type: string
                          format: date-time
                          description: Timestamp when the purchase order was created
                        updated_at:
                          type: string
                          format: date-time
                          description: Timestamp when the purchase order was last updated
                        order_status:
                          type: string
                          nullable: true
                          description: >-
                            Current milestone status token (active,
                            production_started, production_completed,
                            in_transit, completed, deleted)
                        order_status_id:
                          type: integer
                          description: Current milestone status id
                        order_status_date:
                          type: string
                          format: date-time
                          nullable: true
                          description: Date of the current milestone on the PO header
                        statuses:
                          type: array
                          description: >-
                            Read-only milestone timeline from
                            mt_purchase_order_status
                          items:
                            type: object
                            properties:
                              status:
                                type: string
                                nullable: true
                              status_id:
                                type: integer
                              date:
                                type: string
                                format: date-time
                                nullable: true
                              remarks:
                                type: string
                                nullable: true
                        order_date:
                          type: string
                          format: date
                          description: Date when the purchase order was created
                        invoice_date:
                          type: string
                          format: date
                          description: Date when the purchase order was invoiced
                        arrival_due_date:
                          type: string
                          format: date
                          nullable: true
                          description: Expected arrival date for the order
                        requested_ship_date:
                          type: string
                          format: date
                          nullable: true
                          description: Requested shipping date
                        order_type:
                          type: integer
                          description: Type of the order
                        incoterm:
                          type: string
                          description: International Commercial Terms for the order
                        tracking_info:
                          type: string
                          nullable: true
                          description: Tracking information for the order
                        payment_terms:
                          type: string
                          description: Payment terms for the order
                        supplier_id:
                          type: integer
                          description: ID of the supplier
                        item_count:
                          type: integer
                          description: Number of unique items in the order
                        total_qty_ordered:
                          type: number
                          format: float
                          description: Total quantity of line items ordered
                        total_qty_received:
                          type: number
                          format: float
                          description: Total quantity of line items received
                        total_qty_remaining:
                          type: number
                          format: float
                          description: >-
                            Total quantity of line items remaining to be
                            received (ordered - received)
                        order_cost:
                          type: number
                          format: float
                          description: Cost of the order before tax and shipping
                        total_tax:
                          type: number
                          format: float
                          description: Total tax amount
                        total_shipping_cost:
                          type: number
                          format: float
                          description: Total shipping cost
                        total_cost:
                          type: number
                          format: float
                          description: Total cost including tax and shipping
                        total_paid:
                          type: number
                          format: float
                          description: Total amount paid
                        total_due:
                          type: number
                          format: float
                          description: Total amount due
                        down_payment:
                          type: number
                          format: float
                          description: Down payment amount
                        public_note:
                          type: string
                          nullable: true
                          description: Public notes
                        private_note:
                          type: string
                          nullable: true
                          description: Private notes
                        starred:
                          type: boolean
                          description: Whether the order is starred
                        items:
                          type: array
                          description: Line items in the purchase order
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                description: Line item ID
                              purchase_order_id:
                                type: integer
                                description: ID of the parent purchase order
                              created_at:
                                type: string
                                format: date-time
                                description: Creation timestamp
                              updated_at:
                                type: string
                                format: date-time
                                description: Last update timestamp
                              quantity:
                                type: integer
                                description: Quantity ordered
                              unit_price:
                                type: number
                                format: float
                                description: Price per unit
                              unit:
                                type: string
                                description: Unit of measure
                              tax:
                                type: number
                                format: float
                                description: Tax amount
                              discount_amount:
                                type: number
                                format: float
                                description: Discount amount
                              line_total:
                                type: number
                                format: float
                                description: Total for this line item
                              received_quantity:
                                type: integer
                                description: Quantity received
                              source_sku:
                                type: string
                                nullable: true
                                description: Source SKU
                              product:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                  name:
                                    type: string
                                  description:
                                    type: string
                                    nullable: true
                                  retail_price:
                                    type: number
                                    format: float
                                  wholesale_price:
                                    type: number
                                    format: float
                                  variant_attributes:
                                    type: object
                                    nullable: true
                                  sku:
                                    type: string
                                  upc:
                                    type: string
                                  created_at:
                                    type: string
                                    format: date-time
                                  updated_at:
                                    type: string
                                    format: date-time
                        supplier:
                          type: object
                          properties:
                            id:
                              type: integer
                            status:
                              type: integer
                            name:
                              type: string
                            description:
                              type: string
                            street_address:
                              type: string
                            city:
                              type: string
                            state:
                              type: string
                            zip:
                              type: string
                            country:
                              type: string
                            contact_name:
                              type: string
                            contact_email:
                              type: string
                            contact_phone:
                              type: string
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                        payments:
                          type: array
                          description: Array of payments for this purchase order
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                                description: Unique identifier for the payment
                              payment_date:
                                type: string
                                format: date
                                description: Date of the payment
                              payment_type:
                                type: string
                                enum:
                                  - cash
                                  - credit_card
                                  - debit_card
                                  - check
                                  - bank_transfer
                                description: Type of payment
                              paid_amount:
                                type: number
                                format: float
                                description: Amount paid
                              remarks:
                                type: string
                                nullable: true
                                description: Payment remarks or notes
                              external_id:
                                type: string
                                nullable: true
                                description: External payment reference ID
                              created_by:
                                type: object
                                description: User who created the payment
                                properties:
                                  id:
                                    type: integer
                                    description: User ID
                                  name:
                                    type: string
                                    nullable: true
                                    description: User full name
                              created_at:
                                type: string
                                format: date-time
                                description: Timestamp when the payment was created
                              updated_at:
                                type: string
                                format: date-time
                                description: Timestamp when the payment was last updated
                        ship_to:
                          type: object
                          nullable: true
                          description: Shipping address information
                          properties:
                            address_1:
                              type: string
                              nullable: true
                              description: Primary street address
                            address_2:
                              type: string
                              nullable: true
                              description: Secondary address line
                            city:
                              type: string
                              nullable: true
                              description: City name
                            state:
                              type: string
                              nullable: true
                              description: State or province
                            zip:
                              type: string
                              nullable: true
                              description: ZIP or postal code
                            country:
                              type: string
                              nullable: true
                              description: Country name
                            default_ship_to_address:
                              type: string
                              enum:
                                - ship_to_address
                                - warehouse
                              nullable: true
                              description: Default shipping address preference
                        warehouse:
                          type: object
                          nullable: true
                          description: Warehouse information
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                        location:
                          type: object
                          nullable: true
                          description: Location information
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                        tags:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              name:
                                type: string
                              description:
                                type: string
                                nullable: true
                              icon:
                                type: string
                                nullable: true
                              color:
                                type: string
                                nullable: true
                        fulfillment_orders:
                          type: array
                          description: >-
                            Linked fulfillment orders. Present when the relation
                            is loaded; deduplicated by ID.
                          items:
                            type: object
                            properties:
                              id:
                                type: integer
                              order_number:
                                type: string
                                nullable: true
                              order_status:
                                type: string
                                nullable: true
                  meta:
                    type: object
                    properties:
                      current_page:
                        type: integer
                        description: The current page number
                        example: 1
                      from:
                        type: integer
                        description: The starting index of the paginated results
                        example: 1
                      last_page:
                        type: integer
                        description: The last page number
                        example: 5
                      per_page:
                        type: integer
                        description: Number of items per page
                        example: 10
                      to:
                        type: integer
                        description: The ending index of the paginated results
                        example: 10
                      total:
                        type: integer
                        description: Total number of items across all pages
                        example: 50
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Authenticate using a bearer token. To create a token, navigate to
        /settings/api-tokens and click Create API Token.

````