Skip to main content
GET
/
v1
/
referrals
/
{id}
curl -X GET "https://api.affonso.io/v1/referrals/ref_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "success": true,
  "data": {
    "id": "ref_abc123",
    "affiliate_id": "aff_456def",
    "program_id": "prg_789ghi",
    "email": "[email protected]",
    "customer_id": "cust_123",
    "subscription_id": null,
    "status": "customer",
    "created_at": "2024-01-20T15:30:00Z",
    "converted_at": "2024-01-20T15:30:00Z"
  }
}

Path Parameters

id
string
required
The unique identifier of the referral to retrieve

Query Parameters

expand
string
Comma-separated list of related data to include. Valid values: affiliate. Example: expand=affiliate.
include
string
Comma-separated list of additional data to include. Valid values: stats. Example: include=stats. The stats include provides aggregated statistics about the referral’s transactions.

Response

The response includes the referral object with optional expanded/included data.
success
boolean
Always true for successful responses
data
object
The referral object.
curl -X GET "https://api.affonso.io/v1/referrals/ref_abc123" \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "success": true,
  "data": {
    "id": "ref_abc123",
    "affiliate_id": "aff_456def",
    "program_id": "prg_789ghi",
    "email": "[email protected]",
    "customer_id": "cust_123",
    "subscription_id": null,
    "status": "customer",
    "created_at": "2024-01-20T15:30:00Z",
    "converted_at": "2024-01-20T15:30:00Z"
  }
}