TriportRPC

GET /v1/referrals/me — Referral overview

GEThttps://api.triport.io/v1/referrals/me

Returns the authenticated user's referral overview: their primary code, tier, commission rate, paid-invitee count, and earnings balance.

GET /v1/referrals/me is the snapshot endpoint for the referral console. It returns everything needed to render a user's referral dashboard in a single call: their shareable primary code, an optional custom slug, the tier they have reached and its human-readable label, the commission rate in basis points, how many of their invitees have become paying customers, and their current earnings balance broken into pending / available / lifetime buckets. If the user was themselves referred by someone, the referrer's display name is included.

Call it once on page load. The endpoint requires a valid session cookie — it is part of the console surface, not the public RPC surface — and takes no query parameters. For the detailed reward, invitee, and payout lists, use the read-side endpoints (/v1/referrals/rewards, /v1/referrals/invitees, /v1/referrals/payouts).

All monetary fields are integers in micro-units (millionths of the account currency). Divide by 1,000,000 to get the display value.

Parameters

This endpoint takes no path, query, or body parameters. Authentication is carried entirely by the session cookie.

_(none)_optional
Session is resolved from the nl_session cookie.

Response

When the user has no custom slug, custom_slug is null. When the user was not referred by anyone, inviter_display is null.

primary_codestring
The user's always-available referral code (derived from their account).
custom_slugstring | null
User-chosen vanity slug, or null if none is set.
tierinteger
Numeric referral tier the user has reached.
tier_labelstring
Human-readable label for tier (e.g. "Silver").
rate_bpsinteger
Commission rate in basis points (1500 = 15%).
paid_inviteesinteger
Count of invitees who have become paying customers.
balanceobject
Earnings balance, in micro-units (see below).
balance.pending_microinteger
Earned but not yet unlocked, in micro-units.
balance.available_microinteger
Unlocked and available to spend or withdraw, in micro-units.
balance.lifetime_microinteger
Total earned across the account's lifetime, in micro-units.
inviter_displaystring | null
Display name of the user who referred this user, or null.

Errors

All errors share the standard envelope: { "error": "<tag>" }.

CodeMeaningWhen it happens
401unauthenticatedNo valid session cookie was presented (missing, expired, or invalid).
405method_not_allowedA non-GET method was used on this path.
500internalAn unexpected server-side error occurred while building the overview.

See errors.md for the full error envelope and shared conventions.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/referrals/me", {
  credentials: "include", // sends the nl_session cookie
  headers: { "Content-Type": "application/json" },
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const overview = await res.json();
console.log(overview.primary_code, overview.balance.available_micro);

TypeScript SDK (@triport/sdk)

import { TriportClient } from "@triport/sdk";


const client = new TriportClient({ baseUrl: "https://api.triport.io" });


// Console SDK uses the browser session cookie automatically.
const overview = await client.referrals.getOverview();
console.log(overview.tier_label, overview.paidInvitees);

Python (triport-sdk)

from triport import TriportClient


client = TriportClient(
    base_url="https://api.triport.io",
    session_cookie=TRIPORT_SESSION,  # nl_session value
)


overview = client.referrals.get_overview()
print(overview["primary_code"], overview["balance"]["available_micro"])

Notes

  • Micro-units: every *_micro field is an integer in millionths. Format for display as value / 1_000_000.
  • Read-only snapshot: this endpoint never mutates state. To set or remove a custom slug use POST / DELETE /v1/referrals/code.
  • Related endpoints: detailed lists live at /v1/referrals/rewards, /v1/referrals/invitees, and /v1/referrals/payouts.
  • Auth scope: this is a console (session-cookie) endpoint, not an API-key RPC endpoint. It cannot be called with a Bearer API key.