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
  • URL: https://api.whop.com/api/v1/affiliates
  • Auth: HTTP bearer

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
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

account_idstring required

The unique identifier of the company to list affiliates for.

Example:biz_xxxxxxxxxxxxxx

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"
      }
    }
  ]
}

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

    • breaking

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

    • breaking

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

    • info

      added the new enum value active to the query request parameter status

    • info

      added the new enum value archived to the query request parameter status

    • info

      added the new enum value asc to the query request parameter direction

    • info

      added the new enum value cached_total_referrals to the query request parameter order

    • info

      added the new enum value cached_total_rewards to the query request parameter order

    • info

      added the new enum value created_at to the query request parameter order

    • info

      added the new enum value deleted to the query request parameter status

    • info

      added the new enum value desc to the query request parameter direction

    • info

      added the new enum value id to the query request parameter order

    • info

      for the query request parameter direction, the type was generalized from no type to string

    • info

      for the query request parameter order, the type was generalized from no type to string

    • info

      for the query request parameter status, the type was generalized from no type to string