> ## 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.

# Set Target

> Set or revise a monthly revenue target for one of your reports.
Replaces any existing target for the same person × category × period.



## OpenAPI

````yaml /openapi/payment.yaml post /api/v1/commissions/targets
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/targets:
    post:
      tags:
        - Commissions
      summary: Set Target
      description: |-
        Set or revise a monthly revenue target for one of your reports.
        Replaces any existing target for the same person × category × period.
      operationId: set_target_api_v1_commissions_targets_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SalesTargetCreate'
      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:
    SalesTargetCreate:
      properties:
        applicant_id:
          type: string
          format: uuid
          title: Applicant Id
          description: User ID of the person this target is for.
        applicant_role:
          $ref: '#/components/schemas/ApplicantRole'
          description: >-
            Role of the applicant — determines which commission tier schedule
            applies.
        category:
          $ref: '#/components/schemas/BusinessCategory'
          description: Business category this target covers.
        month:
          type: integer
          maximum: 12
          minimum: 1
          title: Month
          description: Commission month (1–12), e.g. 5 for May.
        year:
          type: integer
          minimum: 2020
          title: Year
          description: Commission year, e.g. 2026.
        target_amount:
          anyOf:
            - type: number
              exclusiveMinimum: 0
            - type: string
          title: Target Amount
          description: Monthly revenue target in KES.
      type: object
      required:
        - applicant_id
        - applicant_role
        - category
        - month
        - year
        - target_amount
      title: SalesTargetCreate
      description: >-
        Set a monthly revenue target for one of your reports.


        **Endpoint:** `POST /api/v1/commissions/targets`

        **Required realm role:** `business_manager`, `commercial_manager`,
        `commercial_director`


        Setting a target replaces any existing target for the same applicant ×
        category × period,

        so managers can correct mistakes before the application window opens.


        A BM covering two categories must set two separate targets — one per
        category.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ApplicantRole:
      type: string
      enum:
        - BSE
        - BM
        - CM
        - CD
        - FREELANCE
      title: ApplicantRole
      description: >-
        Sales hierarchy role — determines which commission tier schedule
        applies.
    BusinessCategory:
      type: string
      enum:
        - Direct
        - Agency
        - Digital
        - Government
      title: BusinessCategory
      description: >-
        The four commercial business categories. Mirrors lead_category.name in
        commercial-service.
    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

````