Hanzo
OpenapiAffiliate

Answers the caller org's OWN affiliate standing: status, referral code and…

Answers the caller org's OWN affiliate standing: status, referral code and share link, commission rate, how many orgs it has referred, and its lifetime…

GET /v1/affiliate

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

Answers the caller org's OWN affiliate standing: status, referral code and share link, commission rate, how many orgs it has referred, and its lifetime accrued, still-pending and already-paid commission in integer cents, with its payout history.

An org that never applied gets an honest isAffiliate:false and the default rate rather than a 404 — the console renders the apply form off that answer.

The affiliate is resolved from the VALIDATED org, never from a field, so this can only ever read the caller's own row; without a principal it is refused. It is a PURE READ: nothing accrues until the sweep runs. Commission is earned on Hanzo's MARGIN, never on the referred customer's bill, so nothing here changes what that customer pays.

Request

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

Response

StatusBodyMeaning
200affiliateStandingok

200 body — 21 fields.

FieldInTypeAlwaysDescription
accruedCentsbodyintegerAccruedCents is lifetime commission accrued, in cents.
codebodystringCode is the minted referral code; empty until staff approve.
defaultRateBpsbodyintegerDefaultRateBps is the direct rate a new affiliate would get, answered only to a caller that has not applied.
handlebodystringHandle is the opt-in public leaderboard name; empty means opted out.
idbodystringID is the affiliate's server-minted handle, "aff_"-prefixed — what staff approve, suspend, re-rate and pay against.
isAffiliatebodybooleanIsAffiliate says whether the caller org has an affiliate record at all.
linkbodystringLink is the shareable ?aff URL; empty until a code is minted.
marginBpsbodyintegerMarginBps is the platform gross-margin fraction commission is a rate OF.
paidCentsbodyintegerPaidCents is lifetime commission already paid out, in cents.
payoutsbodyremittance[]Payouts is the payout history, newest rows bounded.
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 — what the platform still owes.
rateBpsbodyintegerRateBps is the affiliate's own direct commission rate, in basis points.
referredCountbodyintegerReferredCount is how many orgs this affiliate has referred.
requestedCodebodystringRequestedCode is the vanity code asked for at apply time — a request, not an allocation.
statusbodystringStatus is "applied", "approved" or "suspended".

Failure carries the platform error shape — see Errors.

Examples

hanzo affiliates get

Affiliate API · All Hanzo APIs · Interactive reference

How is this guide?

On this page