Affiliates

List affiliates

Changed on

Lists the affiliates of an account.

Required permissions:

  • affiliate:basic:read
get/affiliates

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Query parameters

after, string

Returns the elements in the list that come after the specified cursor.

before, string

Returns the elements in the list that come before the specified cursor.

first, integer

Returns the first n elements from the list.

Example:42
last, integer

Returns the last n elements from the list.

Example:42
direction, 'asc' | 'desc'

The sort direction for results. Defaults to descending.

order, 'id' | 'created_at' | 'cached_total_referrals' | 'cached_total_rewards'

The field to sort results by.

query, string

Search affiliates by username.

status, 'active' | 'archived' | 'deleted'

Filter by affiliate status (active or archived).

account_id, string required

The unique identifier of the company to list affiliates for.

Example:biz_xxxxxxxxxxxxxx

Response

A successful response

object required

The connection type for Affiliate.

data, AffiliateListItem[] required

A list of nodes.

page_info, PageInfo required

Information to aid in pagination.

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": "Dana Whitfield",
        "username": "danawhitfield"
      }
    }
  ]
}

Changes

    • breaking

      added the new required query request parameter account_id

    • warning

      deleted the query request parameter company_id

    • breaking

      the query request parameter direction was restricted to a list of enum values

    14 more changes in this revision