Skip to main content
GET
/
v1
/
affiliates
curl -X GET "https://api.affonso.io/v1/affiliates?limit=10&partnership_status=approved" \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "success": true,
  "data": [
    {
      "id": "cmj8pptm10002p3010z8mk9ak",
      "name": "John Doe",
      "email": "[email protected]",
      "tracking_id": "PARTNER123",
      "source": "api",
      "partnership_status": "APPROVED",
      "onboarding_completed": true,
      "program_id": "cm7xutqbb0001yfkcrnpextmp",
      "group_id": "efbf3f29-efb1-4837-8924-7322606858f3",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 50,
    "totalPages": 5,
    "hasNextPage": true,
    "hasPrevPage": false
  }
}

Query Parameters

page
integer
default:"1"
Page number for pagination. Must be a positive integer.
limit
integer
default:"50"
Number of results per page. Maximum value is 200. Default is 50.
partnership_status
string
Filter by partnership approval status. Valid values: pending, approved, rejected.
Search by name, email, or tracking ID. Case-insensitive partial matching. Maximum 100 characters.
group_id
string
Filter by affiliate group.
program_id
string
Filter by specific program (defaults to team’s program).
sort
string
Sort field and direction in the format field:direction. Valid fields: createdAt, updatedAt, name, partnershipStatus. Valid directions: asc, desc. Example: createdAt:desc.
createdGte
string
Filter affiliates created on or after this date. ISO 8601 date-time format (e.g., 2024-01-01T00:00:00Z).
createdLte
string
Filter affiliates created on or before this date. ISO 8601 date-time format (e.g., 2024-12-31T23:59:59Z).
expand
string
Comma-separated list of related data to include in the response. Valid values: promoCodes, commissionOverrides, invoiceDetails, payoutMethod. You can combine multiple values: promoCodes,payoutMethod.

Response

The response includes a paginated list of affiliates and pagination metadata.
success
boolean
Always true for successful responses
data
array
Array of affiliate objects. Each affiliate object has the same structure as the single affiliate response (see Get Affiliate endpoint).
pagination
object
Pagination metadata object containing:
  • page (integer): Current page number
  • limit (integer): Number of results per page
  • total (integer): Total number of affiliates matching the filters
  • totalPages (integer): Total number of pages
  • hasNextPage (boolean): Whether there is a next page
  • hasPrevPage (boolean): Whether there is a previous page
curl -X GET "https://api.affonso.io/v1/affiliates?limit=10&partnership_status=approved" \
  -H "Authorization: Bearer sk_live_your_api_key"
{
  "success": true,
  "data": [
    {
      "id": "cmj8pptm10002p3010z8mk9ak",
      "name": "John Doe",
      "email": "[email protected]",
      "tracking_id": "PARTNER123",
      "source": "api",
      "partnership_status": "APPROVED",
      "onboarding_completed": true,
      "program_id": "cm7xutqbb0001yfkcrnpextmp",
      "group_id": "efbf3f29-efb1-4837-8924-7322606858f3",
      "created_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 50,
    "totalPages": 5,
    "hasNextPage": true,
    "hasPrevPage": false
  }
}