Skip to main content
GET
/
referrals
List referrals
curl --request GET \
  --url https://api.affonso.io/v1/referrals \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": [
    {
      "id": "<string>",
      "affiliate_id": "<string>",
      "program_id": "<string>",
      "email": "<string>",
      "customer_id": "<string>",
      "subscription_id": "<string>",
      "status": "lead",
      "name": "<string>",
      "metadata": {},
      "created_at": "2023-11-07T05:31:56Z",
      "converted_at": "2023-11-07T05:31:56Z"
    }
  ],
  "has_more": true
}

Authorizations

Authorization
string
header
required

API key authentication. Prefix with 'sk_live_' for production or 'sk_dev_' for development.

Query Parameters

limit
integer
default:10

Number of items to return

Required range: 1 <= x <= 100
starting_after
string

Cursor for forward pagination (referral ID)

ending_before
string

Cursor for backward pagination (referral ID)

affiliate_id
string

Filter by affiliate ID

status
enum<string>

Filter by referral status

Available options:
lead,
trialing,
customer,
active,
canceled,
rejected
order
enum<string>
default:desc

Sort order

Available options:
asc,
desc
expand
string

Expand affiliate data

Example:

"affiliate"

created_gte
string<date-time>

Filter by creation date (greater than or equal)

created_lte
string<date-time>

Filter by creation date (less than or equal)

Response

List of referrals

success
boolean
data
object[]
has_more
boolean