GET
/affiliates
List affiliates
Affiliates
Description
Retrieve a paginated list of your affiliate businesses.
Returns 30 affiliates per page.
Authentication Required: User must be authenticated and have the 'affiliate' role.
Users can only see their own affiliate businesses.
Parameters
page
integer
query
Page number for pagination (defaults to page 1 for invalid values)
status
string
query
Filter affiliates by status
Responses
200
Successful response
application/jsonstatusstring
Example:
successdataarray
current_pageinteger
Example:
1total_resultsinteger
Example:
45total_pagesinteger
Example:
2Example:
{
"status": "success",
"data": [
{
"id": 1,
"organization_name": "Tech Promotions Inc",
"website_url": "https://techpromotions.com",
"commission_rate": "10.0",
"status": "active",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z",
"user": {
"id": 1,
"email": "[email protected]",
"first_name": "John",
"last_name": "Doe"
}
},
{
"id": 2,
"organization_name": "Marketing Solutions",
"website_url": "https://marketingsolutions.com",
"commission_rate": "7.5",
"status": "active",
"created_at": "2024-02-10T09:00:00Z",
"updated_at": "2024-02-15T16:30:00Z",
"user": {
"id": 2,
"email": "[email protected]",
"first_name": "Rebecca",
"last_name": "Adams"
}
}
],
"current_page": 1,
"total_results": 45,
"total_pages": 2
}
401
Authentication required
application/jsonExample:
{
"status": "error",
"message": "Not authenticated or insufficient permissions"
}
403
Insufficient permissions - user must be affiliate
application/jsonExample:
{
"status": "error",
"message": "Feature affiliate required"
}
404
Page not found
application/jsonExample:
{
"status": "error",
"message": "Page not found"
}