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

# List Product Components

> Returns the product components you have registered, newest first.

Only components you have recorded nutrition for are listed: the underlying name
table is shared across accounts, so listing it would return tens of thousands of
rows that belong to nobody.

Results are paginated — the default `limit` is 10, so reading back a full menu
takes several requests. Pass the last object's `component_nutrition_id` as
`starting_after` to fetch the next page, and keep going until a page comes back
shorter than your `limit`.



## OpenAPI

````yaml /openapi.json get /v1/product_components
openapi: 3.1.0
info:
  title: Flex API
  description: >-
    The Flex API powers HSA/FSA payment processing for healthcare commerce:
    checkout sessions, payment intents, subscriptions, customers, refunds,
    disputes, and eligibility. Authenticate with your partner API key as a
    Bearer token. All endpoints are scoped to your partner account, and test
    mode is fully supported via test API keys.
  version: 0.1.0
servers:
  - url: https://api.withflex.com
security:
  - BearerAuth: []
tags:
  - name: Balance Transactions
  - name: Captures
  - name: Checkout Sessions
  - name: Coupons
  - name: Customers
  - name: Disputes
  - name: Events
  - name: Exports
  - name: Files
  - name: Invoices
  - name: Letters
  - name: Orders
  - name: Payment Intents
  - name: Payment Links
  - name: Payouts
  - name: Prices
  - name: Products
  - name: Promo Codes
  - name: Receipts
  - name: Refunds
  - name: Setup Intents
  - name: Shipping Rates
  - name: Subscriptions
paths:
  /v1/product_components:
    get:
      tags:
        - Products
      summary: List Product Components
      description: >-
        Returns the product components you have registered, newest first.


        Only components you have recorded nutrition for are listed: the
        underlying name

        table is shared across accounts, so listing it would return tens of
        thousands of

        rows that belong to nobody.


        Results are paginated — the default `limit` is 10, so reading back a
        full menu

        takes several requests. Pass the last object's `component_nutrition_id`
        as

        `starting_after` to fetch the next page, and keep going until a page
        comes back

        shorter than your `limit`.
      operationId: v1.product_components.list
      parameters:
        - in: query
          name: limit
          description: >-
            A limit on the number of objects to be returned. Limit can range
            between 1 and 100, and the default is 10.
          schema:
            description: >-
              A limit on the number of objects to be returned. Limit can range
              between 1 and 100, and the default is 10.
            type:
              - integer
              - 'null'
            format: int64
            maximum: 100
            minimum: 1
          style: form
        - in: query
          name: offset
          description: Number of objects to skip before returning results.
          schema:
            description: Number of objects to skip before returning results.
            type:
              - integer
              - 'null'
            format: int64
            minimum: 0
          style: form
        - in: query
          name: starting_after
          description: >-
            A cursor for use in pagination. `starting_after` is a
            `component_nutrition_id` that defines your place in the list — pass
            the one from the last object of the previous page to fetch the next.
          schema:
            description: >-
              A cursor for use in pagination. `starting_after` is a
              `component_nutrition_id` that defines your place in the list —
              pass the one from the last object of the previous page to fetch
              the next.
            examples:
              - fcn_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            type:
              - string
              - 'null'
          style: form
          example: fcn_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        - in: query
          name: ending_before
          description: >-
            A cursor for use in pagination. `ending_before` is a
            `component_nutrition_id` that defines your place in the list.
          schema:
            description: >-
              A cursor for use in pagination. `ending_before` is a
              `component_nutrition_id` that defines your place in the list.
            examples:
              - fcn_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            type:
              - string
              - 'null'
          style: form
          example: fcn_01J9XR8M3K7VZ8N2YB4WJ6T0RA
      responses:
        '200':
          description: An envelope wrapping a list of product component objects.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/MultipleProductComponentsBody_for_V1ProductComponent
              example:
                product_components:
                  - component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                    component_nutrition_id: fcn_01J9XR8M3K7VZ8N2YB4WJ6T0RA
                    name: string
                    shared: true
                    test_mode: true
                    category: string
                    nutrition: {}
                    vegan: true
                    gluten_free: true
                    created_at: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - loc:
                      - string
                    msg: string
                    type: string
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
              example:
                code: string
                detail: string
      security:
        - BearerAuth:
            - products:read
components:
  schemas:
    MultipleProductComponentsBody_for_V1ProductComponent:
      description: An envelope wrapping a list of product component objects.
      type: object
      required:
        - product_components
      properties:
        product_components:
          description: The list of product components.
          type: array
          items:
            $ref: '#/components/schemas/V1ProductComponent'
      example:
        product_components:
          - component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            component_nutrition_id: fcn_01J9XR8M3K7VZ8N2YB4WJ6T0RA
            name: string
            shared: true
            test_mode: true
            category: string
            nutrition: {}
            vegan: true
            gluten_free: true
            created_at: string
    HttpErrorOut:
      title: HttpError
      description: The error response returned when a request cannot be completed.
      type: object
      required:
        - code
        - detail
      properties:
        code:
          description: A short machine-readable error code identifying the type of error.
          type: string
        detail:
          description: A human-readable explanation of what went wrong.
          type: string
      example:
        code: string
        detail: string
    HTTPValidationError:
      description: The error response returned when request validation fails (HTTP 422).
      type: object
      required:
        - detail
      properties:
        detail:
          description: The list of validation errors, one entry per invalid field.
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorItem'
      example:
        detail:
          - loc:
              - string
            msg: string
            type: string
    V1ProductComponent:
      description: >-
        A component together with the nutrition this partner has recorded for
        it. Every nutrient value is per 100 g.
      type: object
      required:
        - category
        - component_id
        - component_nutrition_id
        - created_at
        - gluten_free
        - name
        - nutrition
        - shared
        - test_mode
        - vegan
      properties:
        component_id:
          description: >-
            The component's unique identifier. This is the id `component_items`
            on `PATCH /v1/products/{id}` accepts.
          type: string
          example: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        component_nutrition_id:
          description: >-
            The identifier of the nutrition record holding your figures for this
            component.
          type: string
          example: fcn_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        name:
          description: The component's name, normalized to lowercase.
          type: string
        shared:
          description: >-
            Whether the underlying name row is shared across partners rather
            than owned by you. `true` for everything registered through this
            endpoint today, which is why the name cannot be changed.
          type: boolean
        test_mode:
          description: Whether these figures belong to test mode.
          type: boolean
        category:
          description: The component's menu category.
          type: string
        serving_size_g:
          description: The standard portion, in grams. Not a per-100 g nutrient.
          type:
            - number
            - 'null'
          format: double
        nutrition:
          $ref: '#/components/schemas/ComponentNutritionValues'
          description: Nutrient values, per 100 g.
        vegan:
          description: Whether the component is vegan.
          type: boolean
        gluten_free:
          description: Whether the component is gluten-free.
          type: boolean
        canonical_food_key:
          description: >-
            The join key into Flex's national price book, or `null` if not yet
            mapped.
          type:
            - string
            - 'null'
        created_at:
          $ref: '#/components/schemas/Timestamptz'
          description: When these figures were first recorded.
        updated_at:
          description: When these figures were last changed, or `null` if never.
          anyOf:
            - $ref: '#/components/schemas/Timestamptz'
            - type: 'null'
      example:
        component_id: fcomp_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        component_nutrition_id: fcn_01J9XR8M3K7VZ8N2YB4WJ6T0RA
        name: string
        shared: true
        test_mode: true
        category: string
        nutrition: {}
        vegan: true
        gluten_free: true
        created_at: string
        updated_at: string
    ValidationErrorItem:
      description: >-
        Validation errors have their own schema to provide context for invalid
        requests eg. mismatched types and out of bounds values. There may be any
        number of these per 422 UNPROCESSABLE ENTITY error.
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          description: >-
            The location as a [`Vec`] of [`String`]s -- often in the form
            `["body", "field_name"]`, `["query", "field_name"]`, etc. They may,
            however, be arbitarily deep.
          type: array
          items:
            type: string
        msg:
          description: The message accompanying the validation error item.
          type: string
        type:
          description: >-
            The type of error, often "type_error" or "value_error", but
            sometimes with more context like as "value_error.number.not_ge"
          type: string
      example:
        loc:
          - string
        msg: string
        type: string
    ComponentNutritionValues:
      description: >-
        Nutrient values for one component. **Every value is per 100 g of the
        component**, never per serving — see `nutrition_basis` on the write
        paths for how per-serving figures are converted on the way in.


        A `null` means *not supplied*, which is distinct from `0`: the
        eligibility engine treats a missing nutrient as a reason it cannot
        produce a split, whereas a zero is a real measurement.
      type: object
      properties:
        calories:
          description: Energy, kcal per 100 g.
          type:
            - number
            - 'null'
          format: double
        total_fat_g:
          description: >-
            Total fat, g per 100 g. Informational — the eligibility gate uses
            saturated fat.
          type:
            - number
            - 'null'
          format: double
        saturated_fat_g:
          description: >-
            Saturated fat, g per 100 g. This is the fat the eligibility gate
            uses.
          type:
            - number
            - 'null'
          format: double
        trans_fat_g:
          description: Trans fat, g per 100 g.
          type:
            - number
            - 'null'
          format: double
        carbohydrate_g:
          description: Carbohydrate, g per 100 g.
          type:
            - number
            - 'null'
          format: double
        fiber_g:
          description: Fiber, g per 100 g.
          type:
            - number
            - 'null'
          format: double
        protein_g:
          description: Protein, g per 100 g.
          type:
            - number
            - 'null'
          format: double
        sodium_mg:
          description: Sodium, mg per 100 g.
          type:
            - number
            - 'null'
          format: double
        added_sugar_g:
          description: Added sugar, g per 100 g.
          type:
            - number
            - 'null'
          format: double
      example: {}
    Timestamptz:
      description: >-
        A timestamp encoded as an RFC 3339 / ISO 8601 string (e.g.
        `2026-06-15T14:30:00Z`).
      type: string
      example: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Use a Bearer token to access this API.

````