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

# List Categories

> List a project's product categories. Each row carries its full `path` and its `parent_id`, so the flat list reconstructs the category tree. Use the returned `id` as a `category_id` when creating, updating, or assigning products.



## OpenAPI

````yaml https://api.peec.ai/customer/v1/openapi/json get /categories
openapi: 3.0.3
info:
  title: Peec AI Customer API
  description: Development documentation
  version: 1.0.0
  contact:
    name: Peec AI Team
    email: support@peec.ai
servers:
  - url: https://api.peec.ai/customer/v1
security: []
paths:
  /categories:
    get:
      tags:
        - Products
      summary: List Categories
      description: >-
        List a project's product categories. Each row carries its full `path`
        and its `parent_id`, so the flat list reconstructs the category tree.
        Use the returned `id` as a `category_id` when creating, updating, or
        assigning products.
      operationId: getCategories
      parameters:
        - name: project_id
          in: query
          required: false
          schema:
            description: Required if using a company api key
            example: or_f45b94ba-5e35-4982-93ed-285e72ee14eb
            type: string
      responses:
        '200':
          description: The project's categories as a flat tree
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          example: 0190f9a1-1d8c-7e3a-9c2b-1f0a2b3c4d5e
                        name:
                          type: string
                          example: Running Shoes
                        path:
                          type: string
                          example: Footwear > Shoes > Running Shoes
                        parent_id:
                          nullable: true
                          description: The parent category id, or null at the top level.
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      required:
                        - id
                        - name
                        - path
                        - parent_id
                  total_count:
                    type: number
                required:
                  - data
                  - total_count
                description: The project's categories as a flat tree
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
        - BearerAuth: []
components:
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````