Hanzo
OpenapiAffiliate

Answers the richer self-view: the same lifetime accrued, pending and paid…

Answers the richer self-view: the same lifetime accrued, pending and paid commission and payout history, plus the caller's downline broken out by upline…

GET /v1/affiliate/me

Addresshttps://api.hanzo.ai/v1/affiliate/me
MethodGET
Operationget_affiliate_me
AuthAuthorization: Bearer $HANZO_API_KEY

Answers the richer self-view: the same lifetime accrued, pending and paid commission and payout history, plus the caller's downline broken out by upline LEVEL — direct, second, third — each with the rate paid at that level and how many orgs sit there.

Commission is MULTI-LEVEL: a referred org's spend pays up its referral chain, three levels deep and no further. The direct level is the affiliate's own negotiated rate; the second and third are platform-wide switches, read live, so the schedule shown is the one actually in force rather than one compiled in. A caller that has not applied still gets that schedule alongside isAffiliate:false, so the console can show what it would earn.

Scoped to the validated org and nothing else, and refused without a principal. A PURE READ — it reports the downline but accrues nothing.

Request

GET /v1/affiliate/me takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200affiliateSelfok

200 body — 28 fields.

FieldInTypeAlwaysDescription
accruedCentsbodyintegerAccruedCents is lifetime commission accrued, in cents.
codebodystringCode is the minted referral code, the slug the ?aff link carries.
defaultRateBpsbodyintegerDefaultRateBps is the direct rate a new affiliate starts at, in basis points of margin (2000 = 20%).
downlineTotalbodyintegerDownlineTotal counts every org in the caller's downline across the levels.
handlebodystringHandle is the opt-in public leaderboard name.
idbodystringID is the affiliate's server-minted handle, "aff_"-prefixed.
isAffiliatebodybooleanIsAffiliate says whether the caller org has an affiliate record.
levelsbodylevelView[]Levels is the caller's downline per upline level, with the rate paid there.
levels[].downlineCountbodyintegerDownlineCount is how many orgs sit exactly this many hops below the caller.
levels[].levelbodyintegerLevel is the upline distance from the org whose spend is being shared: 1 is the direct referrer, 2 and 3 the referrers above it.
levels[].rateBpsbodyintegerRateBps is the commission paid at this level, in basis points OF Hanzo's margin (2000 = 20% of margin, never of the customer's bill).
linkbodystringLink is the shareable ?aff URL built from the code.
marginBpsbodyintegerMarginBps is the platform gross-margin fraction, in basis points, that every rate here is a rate OF.
paidCentsbodyintegerPaidCents is lifetime commission already paid out, in cents — credits grants and record-only cash disbursements alike.
payoutsbodyremittance[]Payouts is the payout history, newest first, bounded to the last 100 rows.
payouts[].amountCentsbodyintegerAmountCents is the amount disbursed, in cents.
payouts[].createdAtbodyintegerCreatedAt is when the payout was recorded, Unix seconds UTC — when the balance moved, not necessarily when the cash landed.
payouts[].idbodystringID is the payout row's server-minted handle, "apo_"-prefixed.
payouts[].methodbodystringMethod is how it was settled. "credits" issued a commerce grant into the affiliate org's own wallet; any other value (wire, paypal, check, …) is a RECORD of…
payouts[].referencebodystringReference is the operator's settlement note — a bank id, a ledger ref.
payouts[].txnbodystringTxn is the commerce ledger transaction id, set ONLY where a "credits" payout actually issued the grant.
pendingCentsbodyintegerPendingCents is accrued minus paid, in cents — what the platform still owes and the ceiling on the next payout.
rateBpsbodyintegerRateBps is the caller's OWN direct (level 1) commission rate, in basis points of margin.
schedulebodylevelView[]Schedule is the rate schedule quoted to a caller that has not applied.
schedule[].downlineCountbodyintegerDownlineCount is how many orgs sit exactly this many hops below the caller.
schedule[].levelbodyintegerLevel is the upline distance from the org whose spend is being shared: 1 is the direct referrer, 2 and 3 the referrers above it.
schedule[].rateBpsbodyintegerRateBps is the commission paid at this level, in basis points OF Hanzo's margin (2000 = 20% of margin, never of the customer's bill).
statusbodystringStatus is "applied", "approved" or "suspended"; absent for a caller that never applied.

Failure carries the platform error shape — see Errors.

Examples

hanzo affiliates me get

Affiliate API · All Hanzo APIs · Interactive reference

How is this guide?

On this page