Commission rules

Retrieve a commission rule

Scope: read

get/v1/rules/{id}

Request

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

Path parameters

idstring required

Prefixed id (flw_…)

Example:flw_7uSyy9FqVLCFWrdPeZaK

Query parameters

string
OR
string[]
string
OR
string[]

Response

The rule

idstring required

Prefixed id (flw_…)

object'rule' required
program_idstring required

Prefixed id (prg_…)

group_idstring nullable required

Prefixed id (grp_…)

partner_idstring nullable required

Prefixed id (part_…)

namestring required
descriptionstring nullable required
trigger'new_payment' | 'new_signup' required
action'generate_commission' | 'switch_group' required
rate_type'percent' | 'fixed' required
rate_valueinteger required

Basis points for percent, minor units for fixed. The fallback when no branch matches.

approval_mode'immediate' | 'after_days' | 'manual' required
approval_delay_daysinteger nullable required
priorityinteger required

Lower runs first

status'active' | 'inactive' required
switch_to_group_idstring nullable required

Prefixed id (grp_…)

metadataobject nullable required

Your own key/value data, stored as given

created_atstring date-time required

ISO-8601, UTC

updated_atstring date-time required

ISO-8601, UTC

Example response

{
  "id": "flw_7uSyy9FqVLCFWrdPeZaK",
  "program_id": "prg_7uSyy9FqVLCFWrdPeZaK",
  "group_id": "grp_7uSyy9FqVLCFWrdPeZaK",
  "partner_id": "part_7uSyy9FqVLCFWrdPeZaK",
  "switch_to_group_id": "grp_7uSyy9FqVLCFWrdPeZaK",
  "branches": [
    {
      "id": "flb_7uSyy9FqVLCFWrdPeZaK",
      "rule_id": "flw_7uSyy9FqVLCFWrdPeZaK",
      "created_at": "2026-08-21T10:15:30.000Z",
      "updated_at": "2026-08-21T10:15:30.000Z"
    }
  ],
  "created_at": "2026-08-21T10:15:30.000Z",
  "updated_at": "2026-08-21T10:15:30.000Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.