AffiliateLinkDto
Represents a detailed view of an affiliate link, including configuration and audit information.
apply_for_subscriptionsbooleanRequired
Whether the affiliate earns commission on subscription renewals.
Must be enabled for 'commission_amount_steps' past the first cycle to apply - when disabled, only the initial purchase earns commission.
codestringRequired
The unique code associated with the affiliate link.
commission_amountintegerRequired
The commission amount, in tenths of a percent (e.g., 125 = 12.5%) for percentage commissions.
commission_amount_stepsAffiliateLinkCommissionAmountStepDto[]RequiredPer-cycle commission overrides. Requires 'apply_for_subscriptions' to be enabled for billing cycles past 1.
When empty, the base commission amount applies to every renewal. When steps are defined, each renewal cycle pays its matching steps amount.
Cycles without a matching step earn no commission, except cycles past the last step when 'last_commission_amount_step_repeats' is true.
billing_cycle_sequenceintegerRequired
The billing cycle number this commission step applies to. Starts at 1 for the initial purchase.
commission_amountintegerRequired
The commission percentage for this cycle, in tenths of a percent (e.g., 125 = 12.5%).
commission_typeenumRequired
Specifies the type of commission an affiliate earns from referred purchases.
Possible enum values
noneNo commission is earned.
fixedA fixed amount commission (e.g., $5 per purchase). Not yet supported by the affiliate service.
percentageA percentage-based commission (e.g., 10% of the purchase).
created_atstringRequired
The date and time when the affiliate link was created.
created_byActorDtoRequired
typeenumRequired
Possible enum values
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
idFlakeIdOptional
discount_amountintegerRequired
The discount amount, in the smallest currency unit (e.g., cents) for fixed discounts, or tenths of a percent (e.g., 125 = 12.5%) for percentage discounts.
discount_typeenumRequired
Specifies the type of discount offered to customers referred through an affiliate link.
Possible enum values
noneNo discount is offered.
fixedA fixed amount discount (e.g., $5 off).
percentageA percentage-based discount (e.g., 10% off).
enabledbooleanRequired
Indicates whether the affiliate link is enabled.
idFlakeIdRequired
last_commission_amount_step_repeatsbooleanRequired
Whether the last commission amount steps rate continues to apply to all billing cycles past the last step.
When false, cycles past the last step earn no commission.
referer_typeenumRequired
Specifies which affiliate link is credited when a customer follows multiple links before purchasing.
Possible enum values
invalidNo referer type specified. This value is typically used as a default or uninitialized state.
first_refererThe first affiliate link the customer followed is credited.
last_refererThe most recent affiliate link the customer followed is credited.
store_idFlakeIdRequired
tracking_length_daysintegerRequired
The number of days a customer's referral is tracked after following the affiliate link.
wallet_idstringRequired
The identifier of the wallet that receives the affiliate commission payouts.
updated_atstringOptional
The date and time when the affiliate link was last updated.
updated_byActorDtoOptional
typeenumRequired
Possible enum values
anonymoususerapi_keycustomergame_serverinternaladminplatformglobal_customer
idFlakeIdOptional
Example
{
"apply_for_subscriptions": true,
"code": "string",
"commission_amount": 0,
"commission_amount_steps": [
{
"billing_cycle_sequence": 0,
"commission_amount": 0
}
],
"commission_type": "none",
"created_at": "2024-01-01T00:00:00Z",
"created_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"discount_amount": 0,
"discount_type": "none",
"enabled": true,
"id": "411486491630370816",
"last_commission_amount_step_repeats": true,
"referer_type": "invalid",
"store_id": "411486491630370816",
"tracking_length_days": 0,
"wallet_id": "string",
"updated_by": {
"type": "anonymous",
"id": "411486491630370816"
},
"updated_at": "2024-01-01T00:00:00Z"
}