Hanzo

Affiliate

Package affiliates is a partner program that pays commission on what your referrals spend.

Package affiliates is a partner program that pays commission on what your referrals spend.

Base URLhttps://api.hanzo.ai
Operations10
AuthAuthorization: Bearer $HANZO_API_KEY

Specification

Specification pending — no HIP in hanzoai/hips declares capability: affiliate yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.

Four surfaces

SurfaceReaches this capability asCoverage
RESTaffiliate at its own prefix10 operations
CLIhanzo affiliates …10 of 10
SDKno published client declares one yet — regenerating the clients is what adds them
MCPtool affiliates on https://api.hanzo.ai/v1/mcp17 operations, 2 under the document's own id — ask describe for the rest

Quickstart

export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys

Then the first call — a read that needs nothing but the key. GET /v1/affiliate, operation get_affiliate:

hanzo affiliates get

Answers 200 with object — ok.

Endpoints

EndpointWhat it does
POST /v1/affiliate/applyEnrolls the caller's OWN org as an affiliate at status applied, optionally requesting a vanity code, and answers the record — 201 on the first…
POST /v1/affiliate/attributeRecords the first-touch edge every later commission is computed from: the caller's org was referred by the affiliate that owns this code.
POST /v1/affiliate/clickCounts a click on a share link.
GET /v1/affiliate/leaderboardAnswers the top affiliates by lifetime accrued commission, shown by OPT-IN HANDLE with aggregate figures only, plus the caller's own exact rank.
GET /v1/affiliate/me/earningsAnswers the caller's own commission ledger: per period, the margin it earned against and the commission taken from that margin; and per referred org,…
POST /v1/affiliate/me/handleSets the caller's public leaderboard display name, or clears it.
GET /v1/affiliate/me/linksAnswers the caller's share links, each with its URL and its funnel: clicks tracked, signups — orgs attributed with that code — and conversions,…
POST /v1/affiliate/me/linksMints a new share link for the caller's own affiliate and answers it with its full URL, 201.
GET /v1/affiliate/meAnswers the richer self-view: the same lifetime accrued, pending and paid commission and payout history, plus the caller's downline broken out by…
GET /v1/affiliateAnswers the caller org's OWN affiliate standing: status, referral code and share link, commission rate, how many orgs it has referred, and its…

All Hanzo APIs · Interactive reference

How is this guide?

On this page