latestOpenAPI 3.1.02026-08-193894215.9 MB
23dfbe1a0d1f
Affiliates
List affiliates
Returns a paginated list of affiliates for the actor in context, with optional filtering by status, search, and sorting.
Required permissions:
- affiliate:basic:read
get/affiliates
Query parameters
afterstring
Returns the elements in the list that come after the specified cursor.
beforestring
Returns the elements in the list that come before the specified cursor.
firstinteger
Returns the first n elements from the list.
Example:42
lastinteger
Returns the last n elements from the list.
Example:42
company_idstring required
The unique identifier of the company to list affiliates for.
Example:biz_xxxxxxxxxxxxxx
direction'asc' | 'desc'
The direction of the sort.
order'id' | 'created_at' | 'cached_total_referrals' | 'cached_total_rewards'
Which columns can be used to sort.
querystring
Search affiliates by username.
status'active' | 'archived' | 'deleted'
Statuses for resources
Response
A successful response
Example response
{
"data": [
{
"active_members_count": 42,
"company": {
"id": "biz_xxxxxxxxxxxxxx"
},
"created_at": "2023-12-01T05:00:00.401Z",
"id": "aff_xxxxxxxxxxxxxx",
"total_overrides_count": 42,
"total_referrals_count": 42,
"updated_at": "2023-12-01T05:00:00.401Z",
"user": {
"id": "user_xxxxxxxxxxxxx",
"name": "Jane Smith",
"username": "janesmith"
}
}
]
}