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

# Get product by ID

> Returns a product with its SKUs and assembly components bundled inline. Absorbs `/skus/:id`, `/products/:id/skus`, and `/products/:id/components` — callers never need a follow-up fetch.



## OpenAPI

````yaml /api-reference/openapi.json get /products/{id}
openapi: 3.1.0
info:
  title: AutoPrintFarm Public API
  version: 1.0.0
  description: >-
    Public API for AutoPrintFarm — read + write surface for printers, jobs,
    inventory, orders, SKUs, files, worklist, and assembly. Authorization uses
    three scopes: `read` (any list/get), `write` (data mutations — create,
    update, delete, uploads, fulfillment), and `control` (physical printer
    actions: start, pause, resume, stop, heaters, light, filament). Authenticate
    with an API key minted from Settings → API Keys in the AutoPrintFarm
    dashboard.
  contact:
    name: AutoPrintFarm
    url: https://autoprintfarm.com
servers:
  - url: https://api.autoprintfarm.com/public/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Printers
    description: Printer fleet status
  - name: Jobs
    description: Print job queue and history
  - name: Inventory
    description: Finished-goods stock levels
  - name: Orders
    description: Customer orders and line items
  - name: Wiki
    description: Internal documentation articles
  - name: Worklist
    description: Operational task queue
  - name: Products
    description: Product catalog, SKUs, components, and color presets
  - name: Files
    description: Print file metadata and versions
  - name: Hubs
    description: Hub fleet and connection status
  - name: Assembly
    description: Post-print assembly tasks with bundled wiki
  - name: Materials
    description: Filament, components, packaging, and printer parts inventory
  - name: Analytics
    description: >-
      Dashboard rollups and reporting (overview, production, printers, failures,
      inventory, revenue)
paths:
  /products/{id}:
    get:
      tags:
        - Products
      summary: Get product by ID
      description: >-
        Returns a product with its SKUs and assembly components bundled inline.
        Absorbs `/skus/:id`, `/products/:id/skus`, and
        `/products/:id/components` — callers never need a follow-up fetch.
      parameters:
        - schema:
            type: string
            description: Product ID
          required: true
          description: Product ID
          name: id
          in: path
      responses:
        '200':
          description: Product detail
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    $ref: '#/components/schemas/ProductDetail'
                required:
                  - success
                  - data
        '401':
          description: Missing, invalid, revoked, or expired API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: API key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Product not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded (120 req/min/key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth:
            - read
components:
  schemas:
    ProductDetail:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        requires_assembly:
          type:
            - boolean
            - 'null'
        requires_post_processing:
          type:
            - boolean
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        images:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              sort_order:
                type: integer
              url:
                type: string
              thumb_url:
                type: string
            required:
              - id
              - sort_order
              - url
        is_active:
          type:
            - boolean
            - 'null'
        created_at:
          type:
            - string
            - 'null'
        updated_at:
          type:
            - string
            - 'null'
        skus:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              sku:
                type: string
              color:
                type: string
              filament_type:
                type:
                  - string
                  - 'null'
              hex_code:
                type:
                  - string
                  - 'null'
              quantity:
                type:
                  - number
                  - 'null'
              stock_level:
                type:
                  - number
                  - 'null'
              low_stock_threshold:
                type:
                  - number
                  - 'null'
              is_composite:
                type:
                  - boolean
                  - 'null'
              is_active:
                type:
                  - boolean
                  - 'null'
              created_at:
                type:
                  - string
                  - 'null'
              updated_at:
                type:
                  - string
                  - 'null'
            required:
              - id
              - sku
              - color
              - filament_type
              - hex_code
              - quantity
              - stock_level
              - low_stock_threshold
              - is_composite
              - is_active
              - created_at
              - updated_at
        components:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              component_name:
                type: string
              component_type:
                type:
                  - string
                  - 'null'
              quantity_required:
                type: number
              notes:
                type:
                  - string
                  - 'null'
            required:
              - id
              - component_name
              - component_type
              - quantity_required
              - notes
        kit:
          type:
            - object
            - 'null'
          properties:
            parts:
              type: array
              items:
                type: object
                properties:
                  part_id:
                    type: string
                  name:
                    type: string
                  print_file_id:
                    type:
                      - string
                      - 'null'
                  file_name:
                    type:
                      - string
                      - 'null'
                  quantity_per_kit:
                    type: number
                  color_mode:
                    type: string
                    enum:
                      - match_kit
                      - fixed
                  fixed_color:
                    type:
                      - string
                      - 'null'
                  requires_assembly:
                    type:
                      - boolean
                      - 'null'
                  components:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        component_name:
                          type: string
                        component_type:
                          type:
                            - string
                            - 'null'
                        quantity_required:
                          type: number
                        notes:
                          type:
                            - string
                            - 'null'
                      required:
                        - id
                        - component_name
                        - component_type
                        - quantity_required
                        - notes
                  variants:
                    type: array
                    items:
                      type: object
                      properties:
                        kit_sku_id:
                          type: string
                        kit_color:
                          type: string
                        child_sku_id:
                          type: string
                        child_sku:
                          type: string
                        child_color:
                          type: string
                        child_on_hand:
                          type: number
                      required:
                        - kit_sku_id
                        - kit_color
                        - child_sku_id
                        - child_sku
                        - child_color
                        - child_on_hand
                required:
                  - part_id
                  - name
                  - print_file_id
                  - file_name
                  - quantity_per_kit
                  - color_mode
                  - fixed_color
                  - requires_assembly
                  - components
                  - variants
            bundle_extras:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                  sku_id:
                    type: string
                  inventory_type:
                    type: string
                    enum:
                      - filament
                      - packaging
                      - accessory
                      - printer_part
                  inventory_item_id:
                    type: string
                  quantity_required:
                    type: number
                  created_at:
                    type:
                      - string
                      - 'null'
                  item_name:
                    type:
                      - string
                      - 'null'
                  remaining:
                    type: number
                  unit:
                    type: string
                    enum:
                      - grams
                      - units
                required:
                  - id
                  - sku_id
                  - inventory_type
                  - inventory_item_id
                  - quantity_required
                  - created_at
                  - item_name
                  - remaining
                  - unit
            bundle_extras_by_variant:
              type: object
              additionalProperties:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    sku_id:
                      type: string
                    inventory_type:
                      type: string
                      enum:
                        - filament
                        - packaging
                        - accessory
                        - printer_part
                    inventory_item_id:
                      type: string
                    quantity_required:
                      type: number
                    created_at:
                      type:
                        - string
                        - 'null'
                    item_name:
                      type:
                        - string
                        - 'null'
                    remaining:
                      type: number
                    unit:
                      type: string
                      enum:
                        - grams
                        - units
                  required:
                    - id
                    - sku_id
                    - inventory_type
                    - inventory_item_id
                    - quantity_required
                    - created_at
                    - item_name
                    - remaining
                    - unit
          required:
            - parts
            - bundle_extras
            - bundle_extras_by_variant
      required:
        - id
        - name
        - description
        - requires_assembly
        - requires_post_processing
        - image_url
        - images
        - is_active
        - created_at
        - updated_at
        - skus
        - components
        - kit
    Error:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
              description: >-
                Machine-readable error code (e.g. NOT_FOUND, VALIDATION_ERROR,
                FORBIDDEN, HUB_OFFLINE). Stable across releases — use this for
                branching.
              example: NOT_FOUND
            message:
              type: string
              description: >-
                Human-readable error message. May vary across releases — do not
                branch on this.
              example: Resource not found
            details:
              description: >-
                Optional structured detail. For VALIDATION_ERROR this is `{
                field: [messages] }`.
          required:
            - code
            - message
          description: Error detail object
      required:
        - success
        - error
      description: Standard error response envelope
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: apf_live_<64 hex>
      description: >-
        API keys are minted in the AutoPrintFarm web app under Settings → API
        Keys. Send as `Authorization: Bearer apf_live_...`. Keys are shown
        exactly once at creation and can be revoked at any time.

````