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

# Single product with company pricing

> Retrieve a single product by ID with pricing calculated for all active companies 
or filtered by specific company IDs. This provides comprehensive pricing information 
for the product across multiple companies in a single request.

The product will include a `company_prices` array containing pricing for each company 
based on their assigned price levels, price groups, and applicable discounts or markups.

This endpoint returns complete product information including variants, substitutions, 
custom fields, and tags, with company pricing calculated for both the main product 
and any variants.

## Pricing Calculation
The pricing system considers multiple factors for each company:
- **Price Levels**: Standard, Premium, VIP, Wholesale, etc.
- **Price Groups**: Customer segments like "Electronics Retailers", "Bulk Distributors"
- **Category Rules**: Different pricing rules can apply to different product categories
- **Markups/Discounts**: Percentage increases or decreases based on customer type

## Company Filtering
Use the `company_id` parameter to filter pricing to specific companies:
- Single company: `?company_id=1`
- Multiple companies: `?company_id=1,2,3`

## Example Response
The response includes all standard product fields plus the `company_prices` array:
```json
{
  "data": {
    "id": 1,
    "name": "Test Product 1",
    "sku": "SKU-001",
    "retail_price": 99.99,
    "wholesale_price": 79.99,
    "company_prices": [
      {
        "company_id": 1,
        "company_name": "Electronics Retailer Pro",
        "price": 91.99
      },
      {
        "company_id": 2,
        "company_name": "Bulk Distribution Corp", 
        "price": 63.99
      }
    ],
    "variants": [
      {
        "id": 2,
        "name": "Test Product 1 - Large",
        "sku": "SKU-001-L",
        "company_prices": [
          {
            "company_id": 1,
            "company_name": "Electronics Retailer Pro",
            "price": 101.99
          }
        ]
      }
    ]
  }
}
```




## OpenAPI

````yaml /api-reference/build.yaml get /products/{productId}/company-pricing
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:
  /products/{productId}/company-pricing:
    get:
      tags:
        - Products
      summary: Single product with company pricing
      description: >
        Retrieve a single product by ID with pricing calculated for all active
        companies 

        or filtered by specific company IDs. This provides comprehensive pricing
        information 

        for the product across multiple companies in a single request.


        The product will include a `company_prices` array containing pricing for
        each company 

        based on their assigned price levels, price groups, and applicable
        discounts or markups.


        This endpoint returns complete product information including variants,
        substitutions, 

        custom fields, and tags, with company pricing calculated for both the
        main product 

        and any variants.


        ## Pricing Calculation

        The pricing system considers multiple factors for each company:

        - **Price Levels**: Standard, Premium, VIP, Wholesale, etc.

        - **Price Groups**: Customer segments like "Electronics Retailers",
        "Bulk Distributors"

        - **Category Rules**: Different pricing rules can apply to different
        product categories

        - **Markups/Discounts**: Percentage increases or decreases based on
        customer type


        ## Company Filtering

        Use the `company_id` parameter to filter pricing to specific companies:

        - Single company: `?company_id=1`

        - Multiple companies: `?company_id=1,2,3`


        ## Example Response

        The response includes all standard product fields plus the
        `company_prices` array:

        ```json

        {
          "data": {
            "id": 1,
            "name": "Test Product 1",
            "sku": "SKU-001",
            "retail_price": 99.99,
            "wholesale_price": 79.99,
            "company_prices": [
              {
                "company_id": 1,
                "company_name": "Electronics Retailer Pro",
                "price": 91.99
              },
              {
                "company_id": 2,
                "company_name": "Bulk Distribution Corp", 
                "price": 63.99
              }
            ],
            "variants": [
              {
                "id": 2,
                "name": "Test Product 1 - Large",
                "sku": "SKU-001-L",
                "company_prices": [
                  {
                    "company_id": 1,
                    "company_name": "Electronics Retailer Pro",
                    "price": 101.99
                  }
                ]
              }
            ]
          }
        }

        ```
      operationId: getSingleProductWithCompanyPricing
      parameters:
        - in: path
          name: productId
          required: true
          schema:
            type: integer
          description: The ID of the product to retrieve
        - in: query
          name: company_id
          schema:
            type: string
          description: >
            Filter pricing to specific company IDs. Can be a single ID or
            comma-separated list.

            If not provided, pricing for all active companies will be included.
          example: 1,2,3
      responses:
        '200':
          description: Product with company pricing information
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    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
                      landed_cost:
                        type: number
                        format: float
                        nullable: true
                        description: Landed cost per unit
                      manufacturing_fee:
                        type: number
                        format: float
                        nullable: true
                        description: Manufacturing fee per unit
                      company_prices:
                        type: array
                        description: >
                          Array of company-specific pricing for this product.
                          Each object contains pricing 

                          calculated based on the company's price level, price
                          group assignments, and any 

                          applicable discounts or markups based on product
                          category.
                        items:
                          type: object
                          description: Company-specific pricing information
                          properties:
                            company_id:
                              type: integer
                              description: The unique identifier of the company
                              example: 1
                            company_name:
                              type: string
                              description: The name of the company
                              example: Electronics Retailer Pro
                            price:
                              type: number
                              format: float
                              description: >
                                The calculated price for this company based on
                                their price level, price group assignments,

                                and any applicable discounts or markups based on
                                product category.
                              example: 91.99
                      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)
                      qty_low_alert:
                        type: integer
                        description: Low stock alert threshold
                      qty_reorder_threshold:
                        type: integer
                        description: Reorder threshold quantity
                      qty_minimum:
                        type: integer
                        description: Minimum stock quantity
                      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
                      attachments:
                        type: array
                        description: Product attachments
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Unique identifier for the attachment
                            name:
                              type: string
                              description: Filename of the attachment
                            type:
                              type: string
                              description: MIME type of the attachment
                            size:
                              type: integer
                              description: File size in bytes
                            full_url:
                              type: string
                              description: Full resolution URL of the attachment
                            thumb_url:
                              type: string
                              description: Thumbnail URL of the attachment (if applicable)
                          required:
                            - id
                            - name
                            - type
                            - size
                            - full_url
                      variants:
                        type: array
                        description: Product variants with company-specific pricing
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                            name:
                              type: string
                            description:
                              type: string
                              nullable: true
                            attachments:
                              type: array
                              description: Variant-specific attachments
                              items:
                                type: object
                                properties:
                                  id:
                                    type: integer
                                    description: Unique identifier for the attachment
                                  name:
                                    type: string
                                    description: Filename of the attachment
                                  type:
                                    type: string
                                    description: MIME type of the attachment
                                  size:
                                    type: integer
                                    description: File size in bytes
                                  full_url:
                                    type: string
                                    description: Full resolution URL of the attachment
                                  thumb_url:
                                    type: string
                                    description: >-
                                      Thumbnail URL of the attachment (if
                                      applicable)
                                required:
                                  - id
                                  - name
                                  - type
                                  - size
                                  - full_url
                            retail_price:
                              type: number
                              format: float
                            wholesale_price:
                              type: number
                              format: float
                            company_prices:
                              type: array
                              description: >
                                Array of company-specific pricing for this
                                variant. Each object contains pricing 

                                calculated using the same pricing logic as the
                                main product but applied to the variant.
                              items:
                                type: object
                                description: Company-specific pricing information
                                properties:
                                  company_id:
                                    type: integer
                                    description: The unique identifier of the company
                                    example: 1
                                  company_name:
                                    type: string
                                    description: The name of the company
                                    example: Electronics Retailer Pro
                                  price:
                                    type: number
                                    format: float
                                    description: >
                                      The calculated price for this company
                                      based on their price level, price group
                                      assignments,

                                      and any applicable discounts or markups
                                      based on product category.
                                    example: 91.99
                            custom_fields:
                              type: array
                              items:
                                type: object
                            variant_attributes:
                              type: object
                              additionalProperties:
                                type: string
                            sku:
                              type: string
                            upc:
                              type: string
                            sellable:
                              type: boolean
                              description: Whether the variant can be sold
                            discontinued:
                              type: boolean
                              description: Whether the variant is discontinued
                            created_at:
                              type: string
                              format: date-time
                            updated_at:
                              type: string
                              format: date-time
                      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
                      substitutions:
                        type: array
                        description: >-
                          Product substitutions, these products may be
                          substituted if the main product is out of stock
                        items:
                          type: object
                          properties:
                            id:
                              type: integer
                              description: Substitution record ID
                            priority:
                              type: integer
                              description: >-
                                Substitution priority (lower number = higher
                                priority)
                            product:
                              type: object
                              description: The substitute product
                              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
                                image_url:
                                  type: string
                                  nullable: true
                                  description: URL to the product's main image
                                sku:
                                  type: string
                                  description: Internal SKU
                                upc:
                                  type: string
                                  description: UPC/Barcode
                                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
                      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
        '401':
          description: Authentication credentials were missing or invalid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Unauthorized
                  message:
                    type: string
                    example: Authentication credentials are missing or invalid
                  status_code:
                    type: integer
                    example: 401
        '403':
          description: You do not have permission to perform this action
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Forbidden
                  message:
                    type: string
                    example: You do not have permission to access this resource
                  status_code:
                    type: integer
                    example: 403
        '404':
          description: Product not found
          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.

````