AffiliateBase Commissions API

The Commissions API from AffiliateBase — 3 operation(s) for commissions.

Operations 5

GET /api/v1/commissions List commissions #
GET /api/v1/commissions/{id} Get commission #
PATCH /api/v1/commissions/{id} Update commission due date #
DELETE /api/v1/commissions/{id} Void commission #
POST /api/v1/commissions/{id}/review Resolve fraud review status for a commission #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/affiliatebase-io:affiliatebase-io-commissions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

affiliatebase-io-commissions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AffiliateBase API v1 Commissions API
  version: 1.0.0
  description: 'Source-aligned OpenAPI contract for AffiliateBase `/api/v1` endpoints.


    Authentication: one of Bearer token, Basic API key auth, or `X-Api-Key`.

    Account context: required via `account_id` query param or `X-Account-Id` header.

    Write endpoints accept JSON request bodies and Rails-style form-encoded parameters;

    responses are JSON encoded. List endpoints use consistent `data` and

    `pagination` envelopes.


    Rate limits: 45 requests per 30 seconds per credential and 180 per 30 seconds per

    IP address, applied before authentication. A throttled request returns HTTP `429`

    with error code `TOO_MANY_REQUESTS` and `RateLimit-Limit`, `RateLimit-Remaining`,

    `RateLimit-Reset`, and `Retry-After` headers (sent on `429` responses only).


    Error codes: `MISSING_ACCOUNT_ID` (400), `INVALID_PARAMETER` (400), `UNAUTHORIZED` (401),

    `FORBIDDEN` (403), `NOT_FOUND` (404), `VALIDATION_ERROR` (422), `TOO_MANY_REQUESTS` (429).

    Payout endpoints also return operation-specific `422` codes: `PAYOUT_EXECUTION_FAILED`,

    `PAYOUT_RUN_CREATE_FAILED`, `PAYOUT_RUN_EXECUTION_FAILED`, `PAYOUT_RUN_REMEDIATION_FAILED`,

    `PAYOUT_EXPORT_CREATE_FAILED`, `PAYOUT_EXPORT_DOWNLOAD_FAILED`, `PAYOUT_EXPORT_DELETE_FAILED`,

    and `PAYOUT_EXPORT_SETTLEMENT_FAILED`.'
servers:
- url: https://app.affiliatebase.io
security:
- bearerAuth: []
- basicAuth: []
- apiKeyAuth: []
tags:
- name: Commissions
paths:
  /api/v1/commissions:
    get:
      tags:
      - Commissions
      operationId: listCommissions
      summary: List commissions
      parameters:
      - $ref: '#/components/parameters/AccountIdQuery'
      - $ref: '#/components/parameters/AccountIdHeader'
      - $ref: '#/components/parameters/Page'
      - $ref: '#/components/parameters/Limit'
      - name: state
        in: query
        schema:
          type: string
      - name: state[]
        in: query
        schema:
          type: array
          items:
            type: string
      - name: affiliate_id
        in: query
        schema:
          type: string
          format: uuid
      - name: campaign_id
        in: query
        schema:
          type: string
          format: uuid
      - name: updated_since
        in: query
        schema:
          type: string
          format: date-time
      - name: updated_until
        in: query
        schema:
          type: string
          format: date-time
      - $ref: '#/components/parameters/Expand'
      - $ref: '#/components/parameters/ExpandBracket'
      responses:
        '200':
          description: Paginated commission list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedCommissions'
        '400':
          $ref: '#/components/responses/MissingAccountId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationError'
  /api/v1/commissions/{id}:
    get:
      tags:
      - Commissions
      operationId: getCommission
      summary: Get commission
      parameters:
      - $ref: '#/components/parameters/AccountIdQuery'
      - $ref: '#/components/parameters/AccountIdHeader'
      - $ref: '#/components/parameters/Id'
      responses:
        '200':
          description: Commission payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Commission'
        '400':
          $ref: '#/components/responses/MissingAccountId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
      - Commissions
      operationId: updateCommission
      summary: Update commission due date
      description: 'Changing `due_at` recalculates `pending` or `due`, unless the commission is `paid`,

        `processing`, or `voided`. `paid_at` is rejected with `422 VALIDATION_ERROR`; commissions

        become paid through payout settlement (`POST /api/v1/payouts/{id}/pay` or a payout export

        payment). A commission held for fraud review cannot have `due_at` changed (`422`); resolve

        it with `POST /api/v1/commissions/{id}/review`.'
      parameters:
      - $ref: '#/components/parameters/AccountIdQuery'
      - $ref: '#/components/parameters/AccountIdHeader'
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                due_at:
                  oneOf:
                  - type: 'null'
                  - type: string
                    format: date-time
      responses:
        '200':
          description: Updated commission payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Commission'
        '400':
          $ref: '#/components/responses/MissingAccountId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
    delete:
      tags:
      - Commissions
      operationId: voidCommission
      summary: Void commission
      description: 'Voids the commission. If its payout was already exported, paid, or sent for payment, the

        commission is left as is and a negative adjustment commission is created to net against

        the affiliate''s next payout; `adjustment_commission_id` identifies it and

        `post_submission_adjustment` is `true`.'
      parameters:
      - $ref: '#/components/parameters/AccountIdQuery'
      - $ref: '#/components/parameters/AccountIdHeader'
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                void_reason:
                  type: string
      responses:
        '200':
          description: Commission voided response
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                  id:
                    type: string
                  deleted:
                    type: boolean
                  state:
                    type: string
                  adjustment_commission_id:
                    type:
                    - string
                    - 'null'
                    format: uuid
                  post_submission_adjustment:
                    type: boolean
        '400':
          $ref: '#/components/responses/MissingAccountId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
  /api/v1/commissions/{id}/review:
    post:
      tags:
      - Commissions
      operationId: reviewCommissionFraud
      summary: Resolve fraud review status for a commission
      parameters:
      - $ref: '#/components/parameters/AccountIdQuery'
      - $ref: '#/components/parameters/AccountIdHeader'
      - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - review_action
              properties:
                review_action:
                  type: string
                  enum:
                  - approve
                  - suspicious
                  - deactivate
                  description: '`approve` releases the hold and returns the commission to `pending` or `due`; `suspicious` keeps it held and suspends the affiliate; `deactivate` voids the commission and suspends the affiliate.'
      responses:
        '200':
          description: Reviewed commission payload
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Commission'
                - type: object
                  properties:
                    fraud_review_result:
                      $ref: '#/components/schemas/JsonObject'
        '400':
          $ref: '#/components/responses/MissingAccountId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    Error:
      type: object
      required:
      - error
      - code
      properties:
        error:
          type: string
        code:
          type: string
        details:
          oneOf:
          - type: 'null'
          - type: object
            additionalProperties: true
          - type: array
            items:
              type: string
    Pagination:
      type: object
      required:
      - previous_page
      - current_page
      - next_page
      - count
      - limit
      - total_pages
      - total_count
      properties:
        previous_page:
          oneOf:
          - type: integer
          - type: 'null'
        current_page:
          type: integer
        next_page:
          oneOf:
          - type: integer
          - type: 'null'
        count:
          type: integer
        limit:
          type: integer
        total_pages:
          type: integer
        total_count:
          type: integer
    Commission:
      type: object
      properties:
        id:
          type: string
          format: uuid
        amount:
          type: integer
        currency:
          type: string
        state:
          type: string
        due_at:
          oneOf:
          - type: 'null'
          - type: string
            format: date-time
        paid_at:
          oneOf:
          - type: 'null'
          - type: string
            format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    PaginatedCommissions:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Commission'
        pagination:
          $ref: '#/components/schemas/Pagination'
    JsonObject:
      type: object
      additionalProperties: true
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
    Expand:
      name: expand
      in: query
      schema:
        type: string
      description: Comma-delimited expand list.
    AccountIdHeader:
      name: X-Account-Id
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: Account context header. Required unless `account_id` query param is supplied.
    AccountIdQuery:
      name: account_id
      in: query
      required: false
      schema:
        type: string
        format: uuid
      description: Account context. Required unless `X-Account-Id` is supplied.
    ExpandBracket:
      name: expand[]
      in: query
      schema:
        type: array
        items:
          type: string
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 100
  responses:
    Forbidden:
      description: Authenticated but not authorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
            code: FORBIDDEN
    MissingAccountId:
      description: Missing account context
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Account ID is required
            code: MISSING_ACCOUNT_ID
    ValidationError:
      description: Validation or state-transition error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Validation failed
            code: VALIDATION_ERROR
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
            code: NOT_FOUND
    TooManyRequests:
      description: API rate limit exceeded
      headers:
        RateLimit-Limit:
          schema:
            type: integer
          description: Maximum requests allowed in the current window.
        RateLimit-Remaining:
          schema:
            type: integer
          description: Requests remaining in the current window.
        RateLimit-Reset:
          schema:
            type: integer
          description: Seconds until the current rate limit window resets.
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Too many API requests. Please retry shortly.
            code: TOO_MANY_REQUESTS
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Invalid API Secret.
            code: UNAUTHORIZED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
    basicAuth:
      type: http
      scheme: basic
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key