Hanzo
OpenapiAffiliate

Enrolls the caller's OWN org as an affiliate at status `applied`, optionally…

Enrolls the caller's OWN org as an affiliate at status `applied`, optionally requesting a vanity code, and answers the record — 201 on the first apply,…

POST /v1/affiliate/apply

Addresshttps://api.hanzo.ai/v1/affiliate/apply
MethodPOST
Operationpost_affiliate_apply
AuthAuthorization: Bearer $HANZO_API_KEY

Enrolls the caller's OWN org as an affiliate at status applied, optionally requesting a vanity code, and answers the record — 201 on the first apply, 200 with created:false afterwards.

IDEMPOTENT, first apply wins: one affiliate per org, so re-applying never creates a second row and never resets an existing approval. Applying is not joining — no code is minted and nothing accrues until staff approve, which is where both the code and the commission rate come from.

The org is the validated caller's, never a field. A malformed vanity code is refused up front; the code is only REQUESTED here, and approval may mint a different one if the requested code is taken.

Request

1 field, body application/json (required).

FieldInTypeRequiredDescription
requestedCodebodystringRequestedCode is the vanity code the applicant asks for; approval may mint a different one if it is taken.

Response

StatusBodyMeaning
200applicationok
201applicationcreated

200 body — 6 fields.

FieldInTypeAlwaysDescription
codebodystringCode is the minted referral code.
createdbodybooleanCreated says whether THIS call made the row. false means the org had already applied and nothing changed — no second row, no reset of an existing approval.
idbodystringID is the affiliate's server-minted handle, "aff_"-prefixed — the id staff approve, suspend, re-rate and pay against.
rateBpsbodyintegerRateBps is the direct (level 1) commission rate the row carries, in basis points OF Hanzo's margin (2000 = 20% of margin, never of the customer's bill).
requestedCodebodystringRequestedCode echoes the vanity code asked for, normalized to lower case.
statusbodystringStatus is "applied" for a row this call created.

Failure carries the platform error shape — see Errors.

Examples

hanzo affiliates apply

Affiliate API · All Hanzo APIs · Interactive reference

How is this guide?

On this page