List leaderboard

Answers 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/leaderboard

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

Answers the top affiliates by lifetime accrued commission, shown by OPT-IN HANDLE with aggregate figures only, plus the caller's own exact rank.

It never discloses an org identity and never a referred org's usage. An affiliate that has set no handle still OCCUPIES its rank but is not listed — so opting out hides the name, not the position, and the visible board must not be read as a complete roster.

The caller's own row carries its exact GLOBAL rank, computed over the whole approved set rather than over the page, so it is right well outside the top of the board. Only an approved affiliate has a rank. Requires a validated principal; a signed-in non-affiliate may read the board but gets no personal row.

Request

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

Response

StatusBodyMeaning
200affiliate.affiliateBoardok
defaultproblem-detailsrefused

200 body — 13 fields.

FieldInTypeAlwaysDescription
leadersbodyaffiliate.leaderboardRow[]—Leaders are the top opt-in affiliates, by handle and aggregate figures only.
leaders[].accruedCentsbodyinteger (int64)—AccruedCents is that affiliate's lifetime commission accrued, in cents, and what the board is ordered by.
leaders[].handlebodystring—Handle is the affiliate's self-chosen display name — the only identity the board ever carries.
leaders[].isYoubodyboolean—IsYou marks the caller's own row, so a client can highlight it without matching on a handle.
leaders[].rankbodyinteger (int64)—Rank is the position in the GLOBAL approved set ordered by lifetime accrued commission, 1-based.
leaders[].referredCountbodyinteger (int64)—ReferredCount is how many orgs that affiliate directly referred — a count only, never which orgs.
totalbodyinteger (int64)—Total is the approved population where it is known; omitted where the top page truncated and the caller has no rank to derive it from.
youbodyaffiliate.leaderboardRow—
you.accruedCentsbodyinteger (int64)—AccruedCents is that affiliate's lifetime commission accrued, in cents, and what the board is ordered by.
you.handlebodystring—Handle is the affiliate's self-chosen display name — the only identity the board ever carries.
you.isYoubodyboolean—IsYou marks the caller's own row, so a client can highlight it without matching on a handle.
you.rankbodyinteger (int64)—Rank is the position in the GLOBAL approved set ordered by lifetime accrued commission, 1-based.
you.referredCountbodyinteger (int64)—ReferredCount is how many orgs that affiliate directly referred — a count only, never which orgs.

Failure carries the platform error shape — see Errors.

Examples

hanzo affiliate leaderboard
import { Configuration, AffiliateApi } from 'hanzoai';

const api = new AffiliateApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getAffiliateLeaderboard();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AffiliateApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AffiliateApi(client).get_affiliate_leaderboard()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.AffiliateAPI.GetAffiliateLeaderboard(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, affiliate_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = affiliate_api::get_affiliate_leaderboard(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AffiliateApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new AffiliateApi(client).getAffiliateLeaderboard();
curl https://api.hanzo.ai/v1/affiliate/leaderboard \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool affiliate, op get_affiliate_leaderboard — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "affiliate",
         "arguments": {
           "op": "get_affiliate_leaderboard",
           "input": {}
         }
       }
     }'

Affiliate API · All Hanzo APIs · Interactive reference

Was this page useful?