---
title: "List a rule's revisions"
method: GET
path: "/v1/rules/{id}/revisions"
tags: ["Commission rules"]
---

# List a rule's revisions

`GET /v1/rules/{id}/revisions`

## Request

- Base URL: `https://api.affiliaterail.com`
- URL: `https://api.affiliaterail.com/v1/rules/{id}/revisions`
- Auth: HTTP bearer

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`

## Path parameters

- `id` string, required: Prefixed id (`flw_…`)

## Query parameters

- `limit` string: 1 to 100, default 25

## Response `200`

Revisions, newest first

- RuleRevisionList
  - `data` RuleRevision[], required
    - `id` string, required: Prefixed id (`flr_…`)
    - `object` 'rule_revision', required
    - `rule_id` string, required: Prefixed id (`flw_…`)
    - `program_id` string, required: Prefixed id (`prg_…`)
    - `snapshot` RuleSnapshot, required: The rule as it was BEFORE this edit
      - `id` string, required: Prefixed id (`flw_…`)
      - `name` string, required
      - `group_id` string, nullable, required: Prefixed id (`grp_…`)
      - `partner_id` string, nullable, required: Prefixed id (`part_…`)
      - `trigger` 'new_payment' | 'new_signup', required
      - `action` 'generate_commission' | 'switch_group', required
      - `rate_type` 'percent' | 'fixed', required
      - `rate_value` integer, required: Basis points for percent, minor units for fixed. The fallback when no branch matches.
      - `approval_mode` 'immediate' | 'after_days' | 'manual', required
      - `approval_delay_days` integer, nullable, required
      - `priority` integer, required: Lower runs first
      - `status` 'active' | 'inactive', required
      - `branches` object[], required
        - `id` string, required: Prefixed id (`flb_…`)
        - `position` integer, required
        - `label` string, nullable, required
        - `conditions` union, required: A comparison `{ field, op, value }` or a group `{ all: [...] }`, `{ any: [...] }`, `{ not: ... }`. Numeric ranges are inclusive.
          - object
            - `field` string, required
            - `op` 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'between' | 'in' | 'not_in' | 'contains' | 'starts_with' | 'is_true' | 'is_false', required
            - `value` unknown
          - object
            - `all` Condition[], required
          - object
            - `any` Condition[], required
          - object
            - `not` Condition, required (recursive)
        - `rate_type` 'percent' | 'fixed', required
        - `rate_value` integer, required
    - `changed_by` string, nullable, required: The signed-in merchant who saved the edit, or null when it came from the API, an import or a job
    - `created_at` string, date-time, required: When this version stopped being true, which is when the edit that replaced it was saved
  - `has_more` boolean, required: Pass the last object's id as `starting_after` to fetch the next page
  - `total_count` integer, required: Count of every object matching the filters, ignoring the cursor

## Other responses

- `400`: Invalid request
- `401`: Missing or unknown API key
- `403`: Key lacks the required scope
- `404`: No such object in your organization
- `422`: The request was understood and refused
- `429`: Rate limited: see Retry-After

---

[API](https://skmtc.dev/affiliaterail/apis/affiliaterail-api.md) · [All operations](https://skmtc.dev/affiliaterail/apis/affiliaterail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/affiliaterail/apis/affiliaterail-api/revisions/ea41f345c092?raw)
