Skip to content

The signed-in ambassador's programme page

GET
/api/partner/me/
curl --request GET \
--url http://localhost:8000/api/partner/me/ \
--header 'Authorization: Bearer <token>'

Everything the partner tab of Settings shows (#2253): the terms in force, the referral link and its QR, the promo code, the payout reference masked, and the headline numbers off the commission ledger. 404 when no ambassador record points at this account — the shell only offers the page when GET /api/me/ says is_ambassador. 401 without a session; 403 for a partner API key (a human-shaped endpoint). A platform admin passes ?ambassador=<slug> to read any ambassador’s page (#2517).

ambassador
string

A platform admin (the support account) reads THIS ambassador’s page, exactly as the ambassador sees it, and the read is written to the admin_action trail. Anyone else may pass only their own slug; any other value is the same 404 as having no record.

Media typeapplication/json

GET /api/partner/me/ — the ambassador behind the signed-in account.

object
slug
required

Referral slug, amb-<name>; the utm_source the link carries.

string
display_name
required
string
organization
required
string
status
required

Set by hand in the admin; paused / ended earn nothing.

  • active - Active
  • paused - Paused
  • ended - Ended
string
Allowed values: active paused ended
joined_at
required

When the ambassador’s record was entered in the admin — bookkeeping, not a programme date; the page shows partner_since.

string format: date-time
partner_since
required

The start date of the ambassador’s first agreement — “Partner since”. Null before an agreement is filed.

string format: date
nullable
referral_url
required

The link to hand out — utm_source=<slug>&utm_medium=champion; the app captures the slug into its own attribution slot.

string
qr_data_url
required

referral_url as an <img>-ready data:image/svg+xml;base64,… QR — the same encoder every report draws with.

string
promo_code
required

The Stripe promotion code customers may enter at checkout; blank when none was issued.

string
payout_method
required
  • wire - Wire
  • zelle - Zelle
  • paypal - PayPal
string
Allowed values: wire zelle paypal
payout_reference_masked
required

Where payouts go, masked (k***i@paypal.com). The full value lives in the admin only.

string
tax_form_received
required

Whether the ambassador’s tax form is on file. Until it is, commission accrues but nothing is paid out.

boolean
agreement
required

The agreement the page shows: the latest one begun by today (still shown, with its end date, once it has ended), or — before the first one starts — that first one. Null before one is filed.

object
start_date
required

First day the agreement earns.

string format: date
end_date
required

Last day, or null for an open-ended agreement.

string format: date
nullable
rate_initial_pct
required

Commission on a referred customer’s net payment, in percent, during the initial period (or throughout, when there is no tier).

number format: double
initial_months
required

Months the initial rate applies per customer; null = one flat rate.

integer
nullable
rate_after_pct
required

Rate after the initial period, percent; null when there is no tier.

number format: double
nullable
cap_pct
required

Combined ceiling: promo discount plus commission may not exceed this share of the list price.

number format: double
min_payout_cents
required

A month under this carries into the next statement (USD cents).

integer
tail_months
required

Months a referred customer keeps earning after they first paid.

integer
trailing_days
required

Days after the agreement ends during which a customer referred before the end still earns — unless the company ended or did not renew it, when they earn to the end of their period.

integer
pause_policy
required

forfeit — nothing accrues during a pause; accrue_and_hold — commission accrues during a pause and is paid in full with the first statement after it.

  • forfeit - Forfeit — nothing accrues while paused
  • accrue_and_hold - Accrue and hold — paid in full on resumption
string
Allowed values: forfeit accrue_and_hold
clawback_days
required

A refund or chargeback reverses commission only within this many days of the customer’s payment; null = always.

integer
nullable
description_md
required

The terms in the ambassador’s own words, Markdown.

string
document_url
required

Link to the signed agreement, if one was filed.

string
totals
required
object
referred_teams
required

Teams whose founding owner arrived on this ambassador’s link.

integer
commissioned_teams
required

Distinct teams that earned at least one commission (a $0 row does not count).

integer
commission_cents_total
required

Signed sum of every ledger row, USD cents: commission net of refunds and disputes, plus one-off payouts and adjustments, held rows included — the admin’s all-time commission, the same number.

integer
commission_cents_12m
required

Same, since midnight UTC on the same day a year ago — the roster view’s window.

integer
outstanding_cents
required

Awaiting payout: statements drafted or approved and not yet paid, USD cents. A carried statement is not counted — its total opens the next month’s.

integer
paid_cents
required

Statements paid out, USD cents.

integer
last_commission_at
required

When the latest invoice earned a commission.

string format: date-time
nullable
funnel
required

Clicks, sign-ups, activations and first payments through the referral link.

object
last_30_days
required

The referral link’s funnel over one window of UTC calendar days.

object
clicks
required

Times the referral link was opened. A count only — nothing about who opened it is kept.

integer
signups
required

Teams whose founding owner signed up through the link (house accounts left out), by the day they arrived.

integer
activated
required

Of those teams, the ones whose first completed session falls in the window.

integer
paying
required

Credited teams whose first paid invoice falls in the window — a promo-code customer counts here too.

integer
last_90_days
required

The referral link’s funnel over one window of UTC calendar days.

object
clicks
required

Times the referral link was opened. A count only — nothing about who opened it is kept.

integer
signups
required

Teams whose founding owner signed up through the link (house accounts left out), by the day they arrived.

integer
activated
required

Of those teams, the ones whose first completed session falls in the window.

integer
paying
required

Credited teams whose first paid invoice falls in the window — a promo-code customer counts here too.

integer
all_time
required

The referral link’s funnel over one window of UTC calendar days.

object
clicks
required

Times the referral link was opened. A count only — nothing about who opened it is kept.

integer
signups
required

Teams whose founding owner signed up through the link (house accounts left out), by the day they arrived.

integer
activated
required

Of those teams, the ones whose first completed session falls in the window.

integer
paying
required

Credited teams whose first paid invoice falls in the window — a promo-code customer counts here too.

integer
paying_now
required

Credited teams Stripe bills today — the Metabase «paying» state.

integer
embed_available
required

Whether GET /api/partner/embed/ can sign a dashboard URL on this deployment (Metabase embedding configured).

boolean

Examples

ExampleAnAmbassadorOnAFlat15%Agreement

An ambassador on a flat 15 % agreement

{
"slug": "amb-kartiki",
"display_name": "Kartiki Sharma",
"organization": "Run Club Pune",
"status": "active",
"joined_at": "2026-05-28T09:00:00Z",
"partner_since": "2026-06-01",
"referral_url": "https://ai.aikynetix.app/?utm_source=amb-kartiki&utm_medium=champion&utm_campaign=ambassador",
"qr_data_url": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0i…",
"promo_code": "KARTIKI15",
"payout_method": "paypal",
"payout_reference_masked": "k***a@paypal.com",
"tax_form_received": true,
"agreement": {
"start_date": "2026-06-01",
"end_date": null,
"rate_initial_pct": 15,
"initial_months": null,
"rate_after_pct": null,
"cap_pct": 30,
"min_payout_cents": 5000,
"tail_months": 36,
"trailing_days": 90,
"pause_policy": "accrue_and_hold",
"clawback_days": 120,
"description_md": "15 % flat, 30 % combined cap, 36-month tail.",
"document_url": "https://example.com/agreements/kartiki.pdf"
},
"totals": {
"referred_teams": 7,
"commissioned_teams": 4,
"commission_cents_total": 21340,
"commission_cents_12m": 21340,
"outstanding_cents": 3805,
"paid_cents": 17535,
"last_commission_at": "2026-09-05T10:00:00Z"
},
"funnel": {
"last_30_days": {
"clicks": 214,
"signups": 3,
"activated": 2,
"paying": 1
},
"last_90_days": {
"clicks": 538,
"signups": 6,
"activated": 4,
"paying": 3
},
"all_time": {
"clicks": 538,
"signups": 7,
"activated": 5,
"paying": 4
},
"paying_now": 3
},
"embed_available": true
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string

Example generated

{
"detail": "example"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string

Example generated

{
"detail": "example"
}
Media typeapplication/json
object
detail
required

Human-readable message, or a stable machine code for the cases a client branches on. The standard envelope for 400 (validation — a field-keyed object may appear instead), 401 (missing / invalid credentials), 403 (authenticated but not permitted), and 404 (absent — cross-team records are collapsed to 404 so the API never leaks the existence of another team’s data).

string

Examples

No ambassador record on this account

{
"detail": "No ambassador record is linked to this account."
}