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

# Get a campaign's commission rule

> The promoter-side reward (the rate affiliates earn); `data` is null when none is set.



## OpenAPI

````yaml /openapi.yaml get /v1/campaigns/{id}/commission-rule
openapi: 3.1.0
info:
  title: Affixo API
  version: 1.0.0
  description: |
    The Affixo REST API for affiliate program management and server-to-server
    conversion tracking.

    All requests authenticate with a workspace key (`sa_live_…`) as a Bearer
    token. Scopes: `read` / `write` / `track` / `*`.

    Rate limit: 600 req/min per key (enforced at the edge).
servers:
  - url: https://go.affixo.dev
    description: Production
security: []
tags:
  - name: Affiliates
    description: Manage affiliates (workspace key)
  - name: Campaigns
    description: Create and configure campaigns + commission rules (workspace key)
  - name: Links
    description: Manage referral links (workspace key)
  - name: Risk
    description: AI risk assessments for fraud triage (workspace key)
  - name: Commissions
    description: Approve, deny, and manage commissions (workspace key)
  - name: Conversions
    description: Re-attribute and manage conversions (workspace key)
  - name: Webhooks
    description: Manage webhook endpoint subscriptions (workspace key)
  - name: Reports
    description: Aggregated reporting data (workspace key)
  - name: Resources
    description: Read campaigns, commissions, conversions, payouts (workspace key)
  - name: Tracking
    description: >-
      Server-to-server click & conversion tracking (workspace key, scope
      "track")
paths:
  /v1/campaigns/{id}/commission-rule:
    get:
      tags:
        - Campaigns
      summary: Get a campaign's commission rule
      description: >-
        The promoter-side reward (the rate affiliates earn); `data` is null when
        none is set.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: The commission rule
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: commission_rule
                  campaign:
                    type: string
                    description: Campaign name.
                  data:
                    oneOf:
                      - $ref: '#/components/schemas/CommissionRule'
                      - type: 'null'
                    description: The catch-all rule (null when none is set).
                  rules:
                    type: array
                    items:
                      $ref: '#/components/schemas/CommissionRule'
                    description: >-
                      ALL of the campaign's rules — catch-all plus product- and
                      interval-scoped.
                  product_overrides:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        stripe_product_id:
                          type: string
                        name:
                          type: string
                        commissionable:
                          type: boolean
                    description: >-
                      Products redirected to this campaign's rate
                      (products.campaign_id).
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
      security:
        - WorkspaceKey: []
components:
  schemas:
    CommissionRule:
      type: object
      description: A campaign's promoter-side reward (the rate affiliates earn).
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Default commission
        kind:
          type: string
          enum:
            - monetary
            - other
            - exclude
          description: >-
            monetary = cash commission; other = a non-cash reward (credits /
            points / free months) whose value + unit ride in name; exclude = a
            dashboard-authored 'pay nothing on these products' rule (amount 0).
        amount:
          type: number
          description: >-
            Percentage (0–100) when is_flat=false, else a flat amount (or a
            count of units for a non-cash reward).
        is_flat:
          type: boolean
        length_type:
          type: string
          enum:
            - lifetime
            - first_order
            - capped
        length_months:
          type: integer
          nullable: true
          description: Only when length_type=capped.
        applies_to_interval:
          type: string
          nullable: true
          enum:
            - one_time
            - month
            - year
          description: >-
            The rule's billing-cadence scope, or null for an
            unscoped/product-scoped rule.
        product_ids:
          type: array
          items:
            type: string
          description: >-
            Stripe product ids this rule is scoped to (empty for an unscoped or
            interval-scoped rule).
    Error:
      type: object
      properties:
        error:
          type: string
        need:
          type: string
          description: Present on insufficient_scope.
        detail:
          type: string
  responses:
    Unauthorized:
      description: Missing or invalid bearer token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: unauthorized
    NotFound:
      description: Resource not found / not in workspace
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: link_not_found
  securitySchemes:
    WorkspaceKey:
      type: http
      scheme: bearer
      description: 'Workspace API key, e.g. `sa_live_…`. Scopes: read / write / track / *.'

````