Skip to content

Affiliates

SDK Reference · Resource

Affiliates

Inspect referred accounts and affiliate earnings.

method

list()

List referred customers

Returns customers attributed to the authenticated affiliate together with the referral information available to that account.

Signature

Promiseclient.affiliates.list(options: AffiliatesListOptions = {}): Promise<AffiliatesListResponse>

Parameters

NameTypeRequirementDescription
limitnumberOptionalNumber of results to return per page.
offsetnumberOptionalThe initial index from which to return the results.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.affiliates.list();

Returns

PaginatedAffiliateList

The operation completed successfully.

typePaginatedAffiliateList4fields
count
number
Required
—
next
string
Optional
—
previous
string
Optional
—
results
Affiliate[]
Required
—
typeAffiliate5fields
id
string
Optional
—
email
string
Required
—
signup_ip
string
Optional
IP address from which the user signed up. This field is optional and can be used for tracking purposes.
signup_country
string
Optional
Country from which the user signed up. This field is optional and can be used for tracking purposes.
date_joined
string
Optional
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.affiliates.listWithResponse(options): Promise<ApiResponse<AffiliatesListResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

listRewards()

List affiliate reward entries

Returns individual reward entries generated by customers attributed to the authenticated marketer.

Signature

Promiseclient.affiliates.listRewards(options: AffiliatesListRewardsOptions = {}): Promise<AffiliatesListRewardsResponse>

Parameters

NameTypeRequirementDescription
limitnumberOptionalNumber of results to return per page.
offsetnumberOptionalThe initial index from which to return the results.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.affiliates.listRewards();

Returns

PaginatedAffiliateRewardList

The operation completed successfully.

typePaginatedAffiliateRewardList4fields
count
number
Required
—
next
string
Optional
—
previous
string
Optional
—
results
AffiliateReward[]
Required
—
typeAffiliateReward8fields
id
string
Optional
—
email
string
Required
—
status
RewardStatusEnum
Optional
After changing invoice status to PAID, the invoice will be processed and user package created in case none exists. If you need to cancel the invoice, make sure to subtract data from the user package after changing the invoice status. Changing the status from PAID to any other will not affect the user package's data or proxies. * `pending` - Pending * `paid` - Paid * `review` - Review * `cancelled` - Cancelled
enumRewardStatusEnum0fields

* `pending` - Pending * `paid` - Paid * `review` - Review * `cancelled` - Cancelled

No fields.

package
PackageShort
Required
—
typePackageShort5fields
id
string
Optional
—
name
string
Required
Unique display name for this package shown to customers and in the admin. Residential Starter Business Pro
alias
string
Required
Lowercase alphanumeric identifier used internally for package resolution and proxy username routing. Cannot be changed without affecting active connections. residential01 bizpro
is_unlimited_data
boolean
Optional
When enabled, users on this package have no data cap. The proxy will not enforce any bandwidth limit.
targeting_options
TargetingOptions
Required
—
typeTargetingOptions25fields
package
string
Required
—
split_char
string
Required
—
value_char
string
Required
—
continent
string
Required
—
country
string
Required
—
region
string
Required
—
city
string
Required
—
asn
string
Required
—
isp
string
Required
—
username
string
Required
—
pool
string
Required
—
location
string
Required
—
location_format
string
Required
—
session
string
Required
—
session_mode_tag
string
Required
—
session_ttl
string
Required
—
session_ttl_format
number
Required
—
os
string
Required
—
os_combined
boolean
Required
—
os_split_char
string
Required
—
os_linux
string
Required
—
os_windows
string
Required
—
os_ios
string
Required
—
os_macos
string
Required
—
os_android
string
Required
—
price_total
number
Required
—
data
number
Optional
The amount of data in bytes.
commission_amount
number
Required
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.affiliates.listRewardsWithResponse(options): Promise<ApiResponse<AffiliatesListRewardsResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

getRewardsOverall()

Get affiliate earnings over time

Returns affiliate reward totals for the requested date range. start, end, and timezone use the same rules as analytics endpoints.

Signature

Promiseclient.affiliates.getRewardsOverall(options: AffiliatesGetRewardsOverallOptions = {}): Promise<AffiliatesGetRewardsOverallResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.affiliates.getRewardsOverall();

Returns

AffiliateStatsResponse

The operation completed successfully.

typeAffiliateStatsResponse1field
results
AffiliateStatsPoint[]
Required
—
typeAffiliateStatsPoint4fields
date
string
Optional
—
balance
number
Optional
—
data
number
Optional
—
count
number
Optional
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.affiliates.getRewardsOverallWithResponse(options): Promise<ApiResponse<AffiliatesGetRewardsOverallResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.