AffiliateRail Commission rules API

The Commission rules API from AffiliateRail — 3 operation(s) for commission rules.

Operations 6

GET /v1/rules List commission rules #
POST /v1/rules Create a commission rule #
GET /v1/rules/{id} Retrieve a commission rule #
POST /v1/rules/{id} Update a commission rule #
DELETE /v1/rules/{id} Delete a commission rule #
GET /v1/rules/{id}/revisions List a rule's revisions #

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/affiliaterail-com:affiliaterail-com-commission-rules-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

affiliaterail-com-commission-rules-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Affiliaterail Com Commission rules API
  version: '2026-08-21'
  description: 'Operations tagged Commission rules across 2 of this provider''s published API definitions: affiliaterail-com-docs-openapi.json, affiliaterail-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.affiliaterail.com
  description: Production
tags:
- name: Commission rules
paths:
  /v1/rules:
    get:
      tags:
      - Commission rules
      summary: List commission rules
      description: 'Ordered by `priority` then specificity (partner beats group beats program-wide). Each rule carries its ordered `branches`; the first matching branch wins, falling back to the rule''s own rate.


        **Scope:** `read`'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          example: prg_7uSyy9FqVLCFWrdPeZaK
          description: Required on every list
        required: true
        description: Required on every list
        name: program_id
        in: query
      - schema:
          type: string
          example: '25'
          description: 1 to 100, default 25
        required: false
        description: 1 to 100, default 25
        name: limit
        in: query
      - schema:
          type: string
          description: Object id; returns the page after it (older)
        required: false
        description: Object id; returns the page after it (older)
        name: starting_after
        in: query
      - schema:
          type: string
          description: Object id; returns the page before it (newer)
        required: false
        description: Object id; returns the page before it (newer)
        name: ending_before
        in: query
      - schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
          description: 'Relations to embed: group, partner'
        required: false
        description: 'Relations to embed: group, partner'
        name: expand[]
        in: query
      - schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
          description: Nothing to include on this resource
        required: false
        description: Nothing to include on this resource
        name: include[]
        in: query
      - schema:
          type: string
          enum:
          - active
          - inactive
        required: false
        name: status
        in: query
      - schema:
          type: string
        required: false
        name: group_id
        in: query
      - schema:
          type: string
        required: false
        name: partner_id
        in: query
      responses:
        '200':
          description: Commission rules
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleList'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getV1Rules
      x-operation-id-source: derived
    post:
      tags:
      - Commission rules
      summary: Create a commission rule
      description: 'Counts against the plan''s commission-rule quota. Scope to a group or a partner, not both.


        **Scope:** `commissions:write` (or `write`)'
      security:
      - bearerAuth: []
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleCreate'
      responses:
        '201':
          description: The new rule
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: postV1Rules
      x-operation-id-source: derived
    servers:
    - url: https://api.affiliaterail.com
      description: Production
  /v1/rules/{id}:
    get:
      tags:
      - Commission rules
      summary: Retrieve a commission rule
      description: '**Scope:** `read`'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^(sample_)?flw_
          example: flw_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flw_…`)
        required: true
        description: Prefixed id (`flw_…`)
        name: id
        in: path
      - schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
          description: 'Relations to embed: group, partner'
        required: false
        description: 'Relations to embed: group, partner'
        name: expand[]
        in: query
      - schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
          description: Nothing to include on this resource
        required: false
        description: Nothing to include on this resource
        name: include[]
        in: query
      responses:
        '200':
          description: The rule
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getV1RulesById
      x-operation-id-source: derived
    post:
      tags:
      - Commission rules
      summary: Update a commission rule
      description: 'Send the whole rule. `branches` replaces the list: branches with an `id` are kept (and the commissions citing them keep pointing at them), the rest are created, omitted ones are deleted.


        **Scope:** `commissions:write` (or `write`)'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^(sample_)?flw_
          example: flw_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flw_…`)
        required: true
        description: Prefixed id (`flw_…`)
        name: id
        in: path
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RuleUpdate'
      responses:
        '200':
          description: The updated rule
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Rule'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: postV1RulesById
      x-operation-id-source: derived
    delete:
      tags:
      - Commission rules
      summary: Delete a commission rule
      description: 'Commissions it produced keep their `rule_id` for the audit trail.


        **Scope:** `commissions:write` (or `write`)'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^(sample_)?flw_
          example: flw_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flw_…`)
        required: true
        description: Prefixed id (`flw_…`)
        name: id
        in: path
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Deleted'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: deleteV1RulesById
      x-operation-id-source: derived
    servers:
    - url: https://api.affiliaterail.com
      description: Production
  /v1/rules/{id}/revisions:
    get:
      tags:
      - Commission rules
      summary: List a rule's revisions
      description: 'Every version this rule has been in, newest first. A revision holds the rule as it stood BEFORE one edit, so the revisions plus the live rule are its whole history: `created_at` is the moment that version stopped being true, and the version before it ran until then. A rule nobody has edited has no revisions. Rate changes here are forward-only and are never grandfathered, so this is a record and not an undo.


        **Scope:** `read`'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^(sample_)?flw_
          example: flw_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flw_…`)
        required: true
        description: Prefixed id (`flw_…`)
        name: id
        in: path
      - schema:
          type: string
          example: '25'
          description: 1 to 100, default 25
        required: false
        description: 1 to 100, default 25
        name: limit
        in: query
      responses:
        '200':
          description: Revisions, newest first
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuleRevisionList'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getV1RulesByIdRevisions
      x-operation-id-source: derived
    servers:
    - url: https://api.affiliaterail.com
      description: Production
components:
  schemas:
    RuleRevisionList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RuleRevision'
        has_more:
          type: boolean
          description: Pass the last object's id as `starting_after` to fetch the next page
        total_count:
          type: integer
          description: Count of every object matching the filters, ignoring the cursor
      required:
      - data
      - has_more
      - total_count
    RuleList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Rule'
        has_more:
          type: boolean
          description: Pass the last object's id as `starting_after` to fetch the next page
        total_count:
          type: integer
          description: Count of every object matching the filters, ignoring the cursor
      required:
      - data
      - has_more
      - total_count
    RuleBranch:
      type: object
      properties:
        id:
          type: string
          pattern: ^(sample_)?flb_
          example: flb_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flb_…`)
        object:
          type: string
          enum:
          - rule_branch
        rule_id:
          type: string
          pattern: ^(sample_)?flw_
          example: flw_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flw_…`)
        position:
          type: integer
        label:
          type:
          - string
          - 'null'
        conditions:
          $ref: '#/components/schemas/Condition'
        rate_type:
          type: string
          enum:
          - percent
          - fixed
        rate_value:
          type: integer
        created_at:
          type: string
          format: date-time
          example: '2026-08-21T10:15:30.000Z'
          description: ISO-8601, UTC
        updated_at:
          type: string
          format: date-time
          example: '2026-08-21T10:15:30.000Z'
          description: ISO-8601, UTC
      required:
      - id
      - object
      - rule_id
      - position
      - label
      - conditions
      - rate_type
      - rate_value
      - created_at
      - updated_at
    RuleCreate:
      type: object
      properties:
        program_id:
          type: string
          pattern: ^(sample_)?prg_
          example: prg_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`prg_…`)
        name:
          type: string
          minLength: 1
        description:
          type:
          - string
          - 'null'
        group_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?grp_
          example: grp_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`grp_…`)
        partner_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?part_
          example: part_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`part_…`)
        trigger:
          type: string
          enum:
          - new_payment
          - new_signup
          default: new_payment
        action:
          type: string
          enum:
          - generate_commission
          - switch_group
          default: generate_commission
        rate_type:
          type: string
          enum:
          - percent
          - fixed
          default: percent
        rate_value:
          type: integer
          minimum: 0
          default: 2000
        approval_mode:
          type: string
          enum:
          - immediate
          - after_days
          - manual
          default: immediate
        approval_delay_days:
          type:
          - integer
          - 'null'
          minimum: 1
        priority:
          type: integer
          default: 100
        status:
          type: string
          enum:
          - active
          - inactive
          default: active
        branches:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^(sample_)?flb_
                example: flb_7uSyy9FqVLCFWrdPeZaK
                description: Prefixed id (`flb_…`)
              label:
                type:
                - string
                - 'null'
              conditions:
                $ref: '#/components/schemas/Condition'
              rate_type:
                type: string
                enum:
                - percent
                - fixed
              rate_value:
                type: integer
                minimum: 0
            required:
            - conditions
            - rate_type
            - rate_value
          default: []
      required:
      - program_id
      - name
    RuleUpdate:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        description:
          type:
          - string
          - 'null'
        group_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?grp_
          example: grp_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`grp_…`)
        partner_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?part_
          example: part_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`part_…`)
        trigger:
          type: string
          enum:
          - new_payment
          - new_signup
          default: new_payment
        action:
          type: string
          enum:
          - generate_commission
          - switch_group
          default: generate_commission
        rate_type:
          type: string
          enum:
          - percent
          - fixed
          default: percent
        rate_value:
          type: integer
          minimum: 0
          default: 2000
        approval_mode:
          type: string
          enum:
          - immediate
          - after_days
          - manual
          default: immediate
        approval_delay_days:
          type:
          - integer
          - 'null'
          minimum: 1
        priority:
          type: integer
          default: 100
        status:
          type: string
          enum:
          - active
          - inactive
          default: active
        branches:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^(sample_)?flb_
                example: flb_7uSyy9FqVLCFWrdPeZaK
                description: Prefixed id (`flb_…`)
              label:
                type:
                - string
                - 'null'
              conditions:
                $ref: '#/components/schemas/Condition'
              rate_type:
                type: string
                enum:
                - percent
                - fixed
              rate_value:
                type: integer
                minimum: 0
            required:
            - conditions
            - rate_type
            - rate_value
          default: []
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
              - authentication_error
              - permission_error
              - invalid_request_error
              - not_found_error
              - conflict_error
              - rate_limit_error
              - plan_error
              - not_implemented_error
              - api_error
            code:
              type: string
            message:
              type: string
            param:
              type: string
          required:
          - type
          - code
          - message
      required:
      - error
    Condition:
      anyOf:
      - type: object
        properties:
          field:
            type: string
          op:
            type: string
            enum:
            - eq
            - neq
            - gt
            - gte
            - lt
            - lte
            - between
            - in
            - not_in
            - contains
            - starts_with
            - is_true
            - is_false
          value: {}
        required:
        - field
        - op
      - type: object
        properties:
          all:
            type: array
            items:
              $ref: '#/components/schemas/Condition'
        required:
        - all
      - type: object
        properties:
          any:
            type: array
            items:
              $ref: '#/components/schemas/Condition'
        required:
        - any
      - type: object
        properties:
          not:
            $ref: '#/components/schemas/Condition'
        required:
        - not
      description: 'A comparison `{ field, op, value }` or a group `{ all: [...] }`, `{ any: [...] }`, `{ not: ... }`. Numeric ranges are inclusive.'
    RuleRevision:
      type: object
      properties:
        id:
          type: string
          pattern: ^(sample_)?flr_
          example: flr_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flr_…`)
        object:
          type: string
          enum:
          - rule_revision
        rule_id:
          type: string
          pattern: ^(sample_)?flw_
          example: flw_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flw_…`)
        program_id:
          type: string
          pattern: ^(sample_)?prg_
          example: prg_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`prg_…`)
        snapshot:
          $ref: '#/components/schemas/RuleSnapshot'
        changed_by:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?usr_
          example: usr_7uSyy9FqVLCFWrdPeZaK
          description: The signed-in merchant who saved the edit, or null when it came from the API, an import or a job
        created_at:
          type: string
          format: date-time
          example: '2026-08-21T10:15:30.000Z'
          description: When this version stopped being true, which is when the edit that replaced it was saved
      required:
      - id
      - object
      - rule_id
      - program_id
      - snapshot
      - changed_by
      - created_at
    RuleSnapshot:
      type: object
      properties:
        id:
          type: string
          pattern: ^(sample_)?flw_
          example: flw_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flw_…`)
        name:
          type: string
        group_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?grp_
          example: grp_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`grp_…`)
        partner_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?part_
          example: part_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`part_…`)
        trigger:
          type: string
          enum:
          - new_payment
          - new_signup
        action:
          type: string
          enum:
          - generate_commission
          - switch_group
        rate_type:
          type: string
          enum:
          - percent
          - fixed
        rate_value:
          type: integer
          description: Basis points for percent, minor units for fixed. The fallback when no branch matches.
        approval_mode:
          type: string
          enum:
          - immediate
          - after_days
          - manual
        approval_delay_days:
          type:
          - integer
          - 'null'
        priority:
          type: integer
          description: Lower runs first
        status:
          type: string
          enum:
          - active
          - inactive
        branches:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                pattern: ^(sample_)?flb_
                example: flb_7uSyy9FqVLCFWrdPeZaK
                description: Prefixed id (`flb_…`)
              position:
                type: integer
              label:
                type:
                - string
                - 'null'
              conditions:
                $ref: '#/components/schemas/Condition'
              rate_type:
                type: string
                enum:
                - percent
                - fixed
              rate_value:
                type: integer
            required:
            - id
            - position
            - label
            - conditions
            - rate_type
            - rate_value
      required:
      - id
      - name
      - group_id
      - partner_id
      - trigger
      - action
      - rate_type
      - rate_value
      - approval_mode
      - approval_delay_days
      - priority
      - status
      - branches
      description: The rule as it was BEFORE this edit
    Rule:
      type: object
      properties:
        id:
          type: string
          pattern: ^(sample_)?flw_
          example: flw_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`flw_…`)
        object:
          type: string
          enum:
          - rule
        program_id:
          type: string
          pattern: ^(sample_)?prg_
          example: prg_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`prg_…`)
        group_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?grp_
          example: grp_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`grp_…`)
        partner_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?part_
          example: part_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`part_…`)
        name:
          type: string
        description:
          type:
          - string
          - 'null'
        trigger:
          type: string
          enum:
          - new_payment
          - new_signup
        action:
          type: string
          enum:
          - generate_commission
          - switch_group
        rate_type:
          type: string
          enum:
          - percent
          - fixed
        rate_value:
          type: integer
          description: Basis points for percent, minor units for fixed. The fallback when no branch matches.
        approval_mode:
          type: string
          enum:
          - immediate
          - after_days
          - manual
        approval_delay_days:
          type:
          - integer
          - 'null'
        priority:
          type: integer
          description: Lower runs first
        status:
          type: string
          enum:
          - active
          - inactive
        switch_to_group_id:
          type:
          - string
          - 'null'
          pattern: ^(sample_)?grp_
          example: grp_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`grp_…`)
        metadata:
          type:
          - object
          - 'null'
          additionalProperties: {}
          description: Your own key/value data, stored as given
        branches:
          type: array
          items:
            $ref: '#/components/schemas/RuleBranch'
        created_at:
          type: string
          format: date-time
          example: '2026-08-21T10:15:30.000Z'
          description: ISO-8601, UTC
        updated_at:
          type: string
          format: date-time
          example: '2026-08-21T10:15:30.000Z'
          description: ISO-8601, UTC
      required:
      - id
      - object
      - program_id
      - group_id
      - partner_id
      - name
      - description
      - trigger
      - action
      - rate_type
      - rate_value
      - approval_mode
      - approval_delay_days
      - priority
      - status
      - switch_to_group_id
      - metadata
      - branches
      - created_at
      - updated_at
    Deleted:
      type: object
      properties:
        id:
          type: string
          pattern: ^(sample_)?part_
          example: part_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`part_…`)
        object:
          type: string
        deleted:
          type: boolean
          enum:
          - true
      required:
      - id
      - object
      - deleted
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: rail_live_… or rail_test_…
      description: Create keys in Settings → API keys. Each key carries scopes; the docs name the scope every route needs.
x-refined-from:
- affiliaterail-com-docs-openapi.json
- affiliaterail-com-openapi.json