curl -X GET "https://api.affonso.io/v1/affiliates?limit=10&partnership_status=approved" \
-H "Authorization: Bearer sk_live_your_api_key"
curl -X GET "https://api.affonso.io/v1/affiliates?limit=10&expand=promoCodes,commissionOverrides,invoiceDetails,payoutMethod" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"success": true,
"data": [
{
"id": "cmj8pptm10002p3010z8mk9ak",
"name": "John Doe",
"email": "john@example.com",
"tracking_id": "PARTNER123",
"source": "api",
"partnership_status": "APPROVED",
"onboarding_completed": true,
"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
}
}
{
"success": true,
"data": [
{
"id": "cmj8pptm10002p3010z8mk9ak",
"name": "John Doe",
"email": "john@example.com",
"tracking_id": "PARTNER123",
"source": "api",
"partnership_status": "APPROVED",
"onboarding_completed": true,
"group_id": "efbf3f29-efb1-4837-8924-7322606858f3",
"created_at": "2024-01-15T10:30:00Z",
"promoCodes": [
{
"code": "JOHN25",
"promo_code_id": null,
"coupon_id": "coupon_123",
"discount_type": "percentage",
"discount_value": 25,
"duration": "forever",
"created_at": "2024-01-15T10:30:00Z"
}
],
"commissionOverrides": [
{
"id": "override_123",
"incentive_id": "incentive_456",
"incentive_name": "Premium Commission",
"incentive_type": "commission",
"amount": 15,
"is_percentage": true,
"apply_to": "all_plans",
"product_ids": [],
"approval_type": "hold_period",
"hold_period_days": 30,
"incentive_length": "customer_lifetime",
"length_value": null,
"variable_commission": false,
"variable_config": null
}
],
"invoiceDetails": {
"company_name": "John LLC",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main St",
"address_line_2": null,
"city": "New York",
"postal_code": "10001",
"state": "NY",
"country": "US",
"vat_id": null,
"tax_id": null,
"vat_validated": false,
"vat_validated_at": null
},
"payoutMethod": {
"type": "paypal",
"details": {
"email": "john@example.com"
}
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 50,
"totalPages": 5,
"hasNextPage": true,
"hasPrevPage": false
}
}
Affiliates
List Affiliates
Get a paginated list of all affiliates with optional filtering and expansion
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"
curl -X GET "https://api.affonso.io/v1/affiliates?limit=10&expand=promoCodes,commissionOverrides,invoiceDetails,payoutMethod" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"success": true,
"data": [
{
"id": "cmj8pptm10002p3010z8mk9ak",
"name": "John Doe",
"email": "john@example.com",
"tracking_id": "PARTNER123",
"source": "api",
"partnership_status": "APPROVED",
"onboarding_completed": true,
"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
}
}
{
"success": true,
"data": [
{
"id": "cmj8pptm10002p3010z8mk9ak",
"name": "John Doe",
"email": "john@example.com",
"tracking_id": "PARTNER123",
"source": "api",
"partnership_status": "APPROVED",
"onboarding_completed": true,
"group_id": "efbf3f29-efb1-4837-8924-7322606858f3",
"created_at": "2024-01-15T10:30:00Z",
"promoCodes": [
{
"code": "JOHN25",
"promo_code_id": null,
"coupon_id": "coupon_123",
"discount_type": "percentage",
"discount_value": 25,
"duration": "forever",
"created_at": "2024-01-15T10:30:00Z"
}
],
"commissionOverrides": [
{
"id": "override_123",
"incentive_id": "incentive_456",
"incentive_name": "Premium Commission",
"incentive_type": "commission",
"amount": 15,
"is_percentage": true,
"apply_to": "all_plans",
"product_ids": [],
"approval_type": "hold_period",
"hold_period_days": 30,
"incentive_length": "customer_lifetime",
"length_value": null,
"variable_commission": false,
"variable_config": null
}
],
"invoiceDetails": {
"company_name": "John LLC",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main St",
"address_line_2": null,
"city": "New York",
"postal_code": "10001",
"state": "NY",
"country": "US",
"vat_id": null,
"tax_id": null,
"vat_validated": false,
"vat_validated_at": null
},
"payoutMethod": {
"type": "paypal",
"details": {
"email": "john@example.com"
}
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 50,
"totalPages": 5,
"hasNextPage": true,
"hasPrevPage": false
}
}
The API key selects the program whose affiliates are returned.
Query Parameters
integer
default:"1"
Page number for pagination. Must be a positive integer.
integer
default:"50"
Number of results per page. Maximum value is 200. Default is 50.
string
Filter by partnership approval status. Valid values:
pending, approved, rejected.string
Search by name, email, or tracking ID. Case-insensitive partial matching. Maximum 100 characters.
string
Filter by affiliate group.
string
Sort field and direction in the format
field:direction. Valid fields: createdAt, updatedAt, name, partnershipStatus. Valid directions: asc, desc. Example: createdAt:desc.string
Filter affiliates created on or after this date. ISO 8601 date-time format (e.g.,
2024-01-01T00:00:00Z).string
Filter affiliates created on or before this date. ISO 8601 date-time format (e.g.,
2024-12-31T23:59:59Z).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.boolean
Always
true for successful responsesarray
Array of affiliate objects. Each affiliate object has the same structure as the single affiliate response (see Get Affiliate endpoint).
Show Data Object Properties
Show Data Object Properties
string
Unique identifier for the affiliate
string
The affiliate’s display name
string
The affiliate’s email address
string
Unique tracking ID for the affiliate
string
Source of the affiliate creation (e.g.,
"api", "dashboard")string | null
Partnership status with the program:
"PENDING", "APPROVED", "REJECTED", or null if no partnership existsboolean
Whether the affiliate has completed their onboarding process
string | null
The affiliate group ID if assigned, otherwise
nullstring
ISO 8601 timestamp of when the affiliate was created
object
Pagination metadata object containing:
page(integer): Current page numberlimit(integer): Number of results per pagetotal(integer): Total number of affiliates matching the filterstotalPages(integer): Total number of pageshasNextPage(boolean): Whether there is a next pagehasPrevPage(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"
curl -X GET "https://api.affonso.io/v1/affiliates?limit=10&expand=promoCodes,commissionOverrides,invoiceDetails,payoutMethod" \
-H "Authorization: Bearer sk_live_your_api_key"
{
"success": true,
"data": [
{
"id": "cmj8pptm10002p3010z8mk9ak",
"name": "John Doe",
"email": "john@example.com",
"tracking_id": "PARTNER123",
"source": "api",
"partnership_status": "APPROVED",
"onboarding_completed": true,
"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
}
}
{
"success": true,
"data": [
{
"id": "cmj8pptm10002p3010z8mk9ak",
"name": "John Doe",
"email": "john@example.com",
"tracking_id": "PARTNER123",
"source": "api",
"partnership_status": "APPROVED",
"onboarding_completed": true,
"group_id": "efbf3f29-efb1-4837-8924-7322606858f3",
"created_at": "2024-01-15T10:30:00Z",
"promoCodes": [
{
"code": "JOHN25",
"promo_code_id": null,
"coupon_id": "coupon_123",
"discount_type": "percentage",
"discount_value": 25,
"duration": "forever",
"created_at": "2024-01-15T10:30:00Z"
}
],
"commissionOverrides": [
{
"id": "override_123",
"incentive_id": "incentive_456",
"incentive_name": "Premium Commission",
"incentive_type": "commission",
"amount": 15,
"is_percentage": true,
"apply_to": "all_plans",
"product_ids": [],
"approval_type": "hold_period",
"hold_period_days": 30,
"incentive_length": "customer_lifetime",
"length_value": null,
"variable_commission": false,
"variable_config": null
}
],
"invoiceDetails": {
"company_name": "John LLC",
"first_name": "John",
"last_name": "Doe",
"address_line_1": "123 Main St",
"address_line_2": null,
"city": "New York",
"postal_code": "10001",
"state": "NY",
"country": "US",
"vat_id": null,
"tax_id": null,
"vat_validated": false,
"vat_validated_at": null
},
"payoutMethod": {
"type": "paypal",
"details": {
"email": "john@example.com"
}
}
}
],
"pagination": {
"page": 1,
"limit": 10,
"total": 50,
"totalPages": 5,
"hasNextPage": true,
"hasPrevPage": false
}
}
Was this page helpful?
