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

# List Categories

> Get all available categories for item classification. Enhanced v2 endpoint with improved filtering and search capabilities.



## OpenAPI

````yaml /openapi.json get /api/v2/categories
openapi: 3.1.0
info:
  title: Legitmark Partner API
  description: Comprehensive partner integration API for Legitmark authentication platform
  version: 2.0.0
  contact:
    name: Legitmark Support
    email: support@legitmark.com
    url: https://legitmark.com
servers:
  - url: https://api.legitmark.com
    description: Production API
security:
  - BearerAuth: []
tags:
  - name: Service Requests
    description: Create, retrieve, and manage authentication service requests.
  - name: Media Management
    description: Upload images for service request authentication.
  - name: Taxonomy
    description: Browse categories, types, brands, models, and services to build requests.
paths:
  /api/v2/categories:
    get:
      tags:
        - Taxonomy
      summary: List Categories
      description: >-
        Get all available categories for item classification. Enhanced v2
        endpoint with improved filtering and search capabilities.
      operationId: listCategories
      parameters:
        - name: page_size
          in: query
          description: Number of results per page
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 20
        - name: page_number
          in: query
          description: Page number
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: search_query
          in: query
          description: Search term for category names
          schema:
            type: string
        - name: activeOnly
          in: query
          description: Filter to only active categories
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Categories retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Categories fetched successfully
                  category:
                    type: string
                    enum:
                      - SUCCESS
                    example: SUCCESS
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Category'
                  rc_hit:
                    type: boolean
                    description: Indicates if the response was served from cache
                    example: false
                  rc_key:
                    type: string
                    description: Cache key used for this response
                    example: categories:abc123
                  metadata:
                    type: object
                    description: Pagination metadata
                    properties:
                      total_count:
                        type: integer
                        description: Total number of items
                      page_number:
                        type: integer
                        description: Current page number
                      total_pages:
                        type: integer
                        description: Total number of pages
                      page_size:
                        type: integer
                        description: Number of items per page
                required:
                  - message
                  - category
                  - data
              example:
                message: Categories fetched successfully
                category: SUCCESS
                data:
                  - uuid: 25ed7133-f230-4d64-850d-0cfc698e2931
                    name: Footwear
                    sides:
                      - f47ac10b-58cc-4372-a567-0e02b2c3d479
                      - bf98166d-7119-47f0-a4c5-88d67a28e3e6
                    media: >-
                      https://cdn.legitmark.com/categories/25ed7133-f230-4d64-850d-0cfc698e2931.png
                    feature: true
                    ordinal: 1
                    active: true
                    created_at: '2024-05-26T18:07:34.000Z'
                    updated_at: '2025-11-26T15:45:05.000Z'
                    has_brands: true
                  - uuid: cc30b104-7c47-11ef-a623-02595575faeb
                    name: Bag
                    sides:
                      - 3c14c21f-8134-11ef-9e85-02d0d7ecc26b
                      - 3c14e254-8134-11ef-9e85-02d0d7ecc26b
                    media: >-
                      https://cdn.legitmark.com/categories/cc30b104-7c47-11ef-a623-02595575faeb.png
                    feature: true
                    ordinal: 2
                    active: true
                    created_at: '2024-09-26T20:42:08.000Z'
                    updated_at: '2025-11-26T16:21:04.000Z'
                    has_brands: true
                rc_hit: true
                rc_key: categories:abc123
                metadata:
                  total_count: 8
                  page_number: 1
                  total_pages: 1
                  page_size: 20
      security: []
components:
  schemas:
    Category:
      type: object
      properties:
        uuid:
          type: string
          format: uuid
        name:
          type: string
          example: Bag
        active:
          type: boolean
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        sides:
          type: array
          items:
            type: string
            format: uuid
          description: Array of side UUIDs associated with this category
        media:
          type: string
          format: uri
          nullable: true
          description: Media URL for the category image
        feature:
          type: boolean
          description: Whether this category is featured
        ordinal:
          type: integer
          description: Display order
        has_brands:
          type: boolean
          description: Whether this category has associated brands
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token authentication. Use your API key in the format: Bearer
        leo_xxxxxxxx
      x-default: leo_your_api_key_here

````