> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Affiliate

> An affiliate tracks a user's referral performance and commission earnings for a company, including retention rates, revenue metrics, and payout configurations.

<ResponseExample>
  ```json Example theme={null}
  {
  	"active_members_count": 42,
  	"company": {
  		"id": "biz_xxxxxxxxxxxxxx",
  		"title": "<string>"
  	},
  	"created_at": "2023-12-01T05:00:00.401Z",
  	"customer_retention_rate": "<string>",
  	"customer_retention_rate_ninety_days": "<string>",
  	"id": "aff_xxxxxxxxxxxxxx",
  	"monthly_recurring_revenue_usd": "<string>",
  	"status": "active",
  	"total_overrides_count": 42,
  	"total_referral_earnings_usd": "<string>",
  	"total_referrals_count": 42,
  	"total_revenue_usd": "<string>",
  	"updated_at": "2023-12-01T05:00:00.401Z",
  	"user": {
  		"id": "user_xxxxxxxxxxxxx",
  		"name": "Jane Smith",
  		"username": "janesmith"
  	}
  }
  ```
</ResponseExample>

<ResponseField name="active_members_count" type="integer" required>
  The total active members of the affiliate

  Example: `42`
</ResponseField>

<ResponseField name="company" type="object" required>
  The company attached to this affiliate

  <Expandable title="child attributes">
    <ResponseField name="id" type="string" required>
      The unique identifier for the company.

      Example: `biz_xxxxxxxxxxxxxx`
    </ResponseField>

    <ResponseField name="title" type="string" required>
      The written name of the company.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="created_at" type="string<date-time>" required>
  The datetime the affiliate was created.

  Example: `2023-12-01T05:00:00.401Z`
</ResponseField>

<ResponseField name="customer_retention_rate" type="string" required>
  The percentage of referred customers who are still active members
</ResponseField>

<ResponseField name="customer_retention_rate_ninety_days" type="string" required>
  The percentage of referred customers who remained active over the last 90 days
</ResponseField>

<ResponseField name="id" type="string" required>
  The unique identifier for the affiliate.

  Example: `aff_xxxxxxxxxxxxxx`
</ResponseField>

<ResponseField name="monthly_recurring_revenue_usd" type="string" required>
  The monthly recurring revenue generated by this affiliate's referrals,
  formatted as a USD currency string
</ResponseField>

<ResponseField name="status" type="Status | null" required>
  The status of the affiliate

  Available options: `active`, `archived`, `deleted`
</ResponseField>

<ResponseField name="total_overrides_count" type="integer" required>
  The total count of all overrides for this affiliate

  Example: `42`
</ResponseField>

<ResponseField name="total_referral_earnings_usd" type="string" required>
  The total commission earnings paid to this affiliate, formatted as a USD
  currency string
</ResponseField>

<ResponseField name="total_referrals_count" type="integer" required>
  The total referrals of the affiliate

  Example: `42`
</ResponseField>

<ResponseField name="total_revenue_usd" type="string" required>
  The total revenue generated from this affiliate's referrals, formatted as a
  USD currency string
</ResponseField>

<ResponseField name="updated_at" type="string<date-time>" required>
  The datetime the affiliate was last updated.

  Example: `2023-12-01T05:00:00.401Z`
</ResponseField>

<ResponseField name="user" type="object" required>
  The user attached to this affiliate

  <Expandable title="child attributes">
    <ResponseField name="id" type="string" required>
      The unique identifier for the user.

      Example: `user_xxxxxxxxxxxxx`
    </ResponseField>

    <ResponseField name="name" type="string | null" required>
      The display name set on the user's Whop profile. Null if the user has not set a name.

      Example: `Jane Smith`
    </ResponseField>

    <ResponseField name="username" type="string | null" required>
      The unique username chosen by the user for their Whop profile. Null if the user has not set a username.

      Example: `janesmith`
    </ResponseField>
  </Expandable>
</ResponseField>
