Get the affiliate dashboard

Get the affiliate dashboard

Returns the affiliate's dashboard state, grouped by subject:

  • affiliate — the affiliate's tracking identifiers and links.
  • program — the program they belong to and how it tracks referrals.
  • discount — the discount configuration their codes are created with.
  • owner — the merchant's billing plan and payout schedule, for feature gating.

An affiliate only has a referral code, referral link, and discount code once their email is verified.

Response — 200 OK

{
  "affiliate": {
    "referralCode": "JANE10",
    "discountCode": "JANE-SAVE10",
    "referralLink": "https://store.yourcompany.com/?ref=JANE10"
  },
  "program": {
    "status": "online",
    "isPermanentlyTerminated": false,
    "domain": "store.yourcompany.com",
    "trackingMethod": "referral_link_discount_code"
  },
  "discount": {
    "amount": 1000,
    "type": "percentage",
    "appliesEveryMonth": true,
    "durationMonths": 3
  },
  "owner": {
    "plan": "scale",
    "nextAutoPay": "2026-11-15T00:00:00.000Z"
  }
}

Field notes

FieldNotes
affiliate.referralLinknull until the affiliate has a referral code and the program's store domain is connected.
discount.amountBasis points (1000 = 10%). null when the program has no code discount configured.
discount.typepercentage or set_amount.
discount.appliesEveryMonthWhether codes also discount subscription renewals. When false, codes apply to the customer's first payment only.
discount.durationMonthsWith appliesEveryMonth: true: the number of monthly renewals covered, or null for forever. Always null when appliesEveryMonth is false.
owner.nextAutoPayThe owner's next automated payout time (ISO 8601); null when none is scheduled.

Errors — all { "error": "<message>" }:

Statuserror values
403The affiliate must accept the current affiliate legal terms.
404Affiliate not found