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

Changed in 2 of the 74 revisions of this API.4112

    • ▲

      added the new required query request parameter account_id

      new-required-request-parameter

    • ●

      deleted the query request parameter company_id

      request-parameter-removed

    This revision also has 9 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • f67a043e3190312See the full diff
    • ▲

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

      request-parameter-became-enum

    • ▲

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

      request-parameter-became-enum

    • ▲

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

      request-parameter-became-enum

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-enum-value-added

    • ○

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

      request-parameter-type-generalized

    • ○

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

      request-parameter-type-generalized

    • ○

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

      request-parameter-type-generalized

Of the 74 revisions, 1 has no diff computed.