Get affiliate portal stats

Returns statistics for an affiliate, including total earnings, referred volume (R1 only), R2 and R3 volume components, multilevel volume (R2+R3), total volume (R1+R2+R3), referred revenue, referred users, and active referral codes linked to that user for the project (if any).

The response includes current_tier (nullable). The server does not return effective_tier.

Rate limit: Standard — 100 requests/minute (see API overview).

Date Filtering Options:

  • All-time stats (default): Omit all date parameters to get aggregated totals across all time
  • Date range: Use from and to parameters together to filter stats for a specific date range
  • Current month: Use this_month=true to get stats for the current month only
  • Note: You cannot use this_month together with from/to parameters

Conversion Filtering (Optional):

  • All conversions (default): Omit conversion parameters to get aggregated totals across all conversions
  • By conversion external ID: Use conversion_external_id (non-negative integer, the external_id of the conversion in the project) to filter stats for a specific conversion — same grain as analytics conversion_external_id
  • By conversion name: Use conversion_name to filter stats for a specific conversion by name (exact match)
  • Note: You cannot use both conversion_external_id and conversion_name at the same time

Examples:

  • All-time, all conversions: GET /v1/affiliate-portal/stats?user_identifier=0x...
  • All-time, specific conversion: GET /v1/affiliate-portal/stats?user_identifier=0x...&conversion_external_id=1
  • Date range, all conversions: GET /v1/affiliate-portal/stats?user_identifier=0x...&from=2024-01-01&to=2024-01-31
  • Current month, specific conversion: GET /v1/affiliate-portal/stats?user_identifier=0x...&this_month=true&conversion_name=Spot Trading

Required API Key Scope: service_role

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required

The identifier of the affiliate

date

Start date for filtering stats (ISO 8601 date format: YYYY-MM-DD).
Must be used together with to parameter to define a date range.
Cannot be used together with this_month parameter.
If omitted, returns all-time stats.

date

End date for filtering stats (ISO 8601 date format: YYYY-MM-DD).
Must be used together with from parameter to define a date range.
Cannot be used together with this_month parameter.
If omitted, returns all-time stats.

string
enum

Filter stats for the current month only.
Set to 'true' to get stats for the current calendar month.
Cannot be used together with from/to date parameters.
If omitted, returns all-time stats (unless from/to are provided).

Allowed:
integer
≥ 0

Optional. Filter stats by the conversion's external_id for this project (integer, not the conversion row UUID).
When provided, returns stats only for that conversion.
When omitted, returns aggregated stats across all conversions.
Cannot be used together with conversion_name parameter.

string

Optional. Filter stats by conversion name (exact match).
When provided, returns stats only for the specified conversion.
When omitted, returns aggregated stats across all conversions.
Cannot be used together with conversion_external_id parameter.

Responses

400

Bad Request - Invalid parameters (e.g., using both conversion_external_id and conversion_name, or using this_month with from/to)

401

Unauthorized - Missing or invalid API key, or insufficient scope

404

Not Found - Affiliate not found, or conversion not found when filtering by conversion_external_id/conversion_name

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json