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

# List categories

> GET /categories on the WISEPIM Public API: the project's categories as a flat, keyset-paged list with parent_id and level. Requires categories:read.



## OpenAPI

````yaml openapi.json GET /api/public/v1/categories
openapi: 3.1.0
info:
  title: WISEPIM Public API
  version: 1.0.0
  description: >-
    Read and update your WisePIM catalogue from your own systems. Authenticate
    with `Authorization: Bearer wpk_…`; create keys under Settings → API keys.
    Each key is bound to one project and to the scopes it was created with.
  summary: >-
    Read and update a WISEPIM project's products, categories and attributes from
    your own systems.
  termsOfService: https://wisepim.com/terms
  contact:
    name: WISEPIM support
    url: https://wisepim.com/contact
    email: info@wisepim.com
  x-logo:
    url: >-
      https://docs.wisepim.com/logo/wisepim-logo-horizontal-transparant-lightmode.png
    altText: WISEPIM
servers:
  - url: https://wisepim.com
    description: Production. Every path below already starts with /api/public/v1.
security:
  - ProjectApiKeyAuth: []
tags:
  - name: Key and project
    description: Check which key you are calling with and read the project it is bound to.
  - name: Products
    description: >-
      Read, create and update products. Reads need products:read, writes need
      products:write.
  - name: Categories
    description: >-
      Read the project's categories as a flat list with parent ids. Needs
      categories:read.
  - name: Attributes
    description: Read the project's attribute definitions. Needs attributes:read.
externalDocs:
  description: WISEPIM API reference and guides
  url: https://docs.wisepim.com/en/api-reference/introduction
paths:
  /api/public/v1/categories:
    get:
      tags:
        - Categories
      summary: List categories
      description: |-
        The project's categories, keyset-paged by id, flat with `parent_id`
        and `level` so a client can rebuild the tree. `parent_id=0` selects
        the roots; `ids` is a comma-separated bulk lookup; `is_active`
        filters on the flag. Requires `categories:read`.
      operationId: public_v1_list_categories
      parameters:
        - in: query
          name: ids
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Ids
          required: false
        - in: query
          name: parent_id
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Parent Id
          required: false
        - in: query
          name: is_active
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Is Active
          required: false
        - in: query
          name: cursor
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
          required: false
        - in: query
          name: limit
          schema:
            anyOf:
              - type: integer
              - type: 'null'
            title: Limit
          required: false
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoryPageOut'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorOut'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorOut'
      security:
        - ProjectApiKeyAuth: []
components:
  schemas:
    CategoryPageOut:
      properties:
        data:
          items:
            $ref: '#/components/schemas/CategoryOut'
          title: Data
          type: array
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
        has_more:
          title: Has More
          type: boolean
      required:
        - data
        - has_more
      title: CategoryPageOut
      type: object
    ErrorOut:
      description: |-
        The shared error envelope every NinjaAPI instance renders.

        `code` is present for :class:`user_app.ninja_api.errors.ApiError`
        (`insufficient_scope`, `rate_limited`, `invalid_cursor`, …) so machine
        clients can branch without parsing `error`.
      properties:
        error:
          title: Error
          type: string
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        request_id:
          title: Request Id
          type: string
      required:
        - error
        - request_id
      title: ErrorOut
      type: object
    ValidationErrorOut:
      description: 'HTTP 422: `detail` carries Ninja''s per-field validation errors.'
      properties:
        error:
          title: Error
          type: string
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        request_id:
          title: Request Id
          type: string
        detail:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          title: Detail
      required:
        - error
        - request_id
      title: ValidationErrorOut
      type: object
    CategoryOut:
      properties:
        id:
          title: Id
          type: integer
        name:
          title: Name
          type: string
        slug:
          title: Slug
          type: string
        parent_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parent Id
        level:
          title: Level
          type: integer
        is_active:
          title: Is Active
          type: boolean
        sort_order:
          title: Sort Order
          type: integer
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        external_code:
          anyOf:
            - type: string
            - type: 'null'
          title: External Code
        hierarchy_path:
          title: Hierarchy Path
          type: string
        meta_title:
          anyOf:
            - type: string
            - type: 'null'
          title: Meta Title
        meta_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Meta Description
        meta_keywords:
          anyOf:
            - type: string
            - type: 'null'
          title: Meta Keywords
      required:
        - id
        - name
        - slug
        - level
        - is_active
        - sort_order
        - hierarchy_path
      title: CategoryOut
      type: object
  securitySchemes:
    ProjectApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: Project API key (wpk_...)
      description: >-
        Send a project API key as `Authorization: Bearer wpk_...`. Create keys
        under Settings > API Access in the WISEPIM app (project owners and
        admins). A key is bound to one project and to the scopes chosen when it
        was created; scopes cannot be widened afterwards. Scopes: `project:read`
        - Read the project's name, languages, industry and limits.;
        `products:read` - List and read products, including attribute values and
        category ids.; `products:write` - Create and update products: names,
        descriptions, identifiers, prices, SEO fields, categories and attribute
        values.; `categories:read` - List and read the project's category tree.;
        `attributes:read` - List and read the project's attribute definitions.
      x-scopes:
        project:read: Read the project's name, languages, industry and limits.
        products:read: List and read products, including attribute values and category ids.
        products:write: >-
          Create and update products: names, descriptions, identifiers, prices,
          SEO fields, categories and attribute values.
        categories:read: List and read the project's category tree.
        attributes:read: List and read the project's attribute definitions.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.