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

# Cm Category Summary

> CM dashboard — per-category commission summary.

Returns each category the CM oversees with aggregated BM target, revenue
collected, attainment %, applicable CM commission rate, and commission amount.
Also returns the total commission across all categories.



## OpenAPI

````yaml /openapi/payment.yaml get /api/v1/commissions/cm-category-summary
openapi: 3.1.0
info:
  title: Cape Media - Payment Service
  description: >-
    Invoice requests, invoice uploads, payment tracking, and commission
    management.
  version: 1.0.0
servers:
  - url: https://api.capedigital.co.ke/payment
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/commissions/cm-category-summary:
    get:
      tags:
        - Commissions
      summary: Cm Category Summary
      description: >-
        CM dashboard — per-category commission summary.


        Returns each category the CM oversees with aggregated BM target, revenue

        collected, attainment %, applicable CM commission rate, and commission
        amount.

        Also returns the total commission across all categories.
      operationId: cm_category_summary_api_v1_commissions_cm_category_summary_get
      parameters:
        - name: month
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                maximum: 12
                minimum: 1
              - type: 'null'
            description: Commission month (1–12). Defaults to current month.
            title: Month
          description: Commission month (1–12). Defaults to current month.
        - name: year
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 2020
              - type: 'null'
            description: Commission year. Defaults to current year.
            title: Year
          description: Commission year. Defaults to current year.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````