The signed-in ambassador's commission ledger
const url = 'http://localhost:8000/api/partner/ledger/';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:8000/api/partner/ledger/ \ --header 'Authorization: Bearer <token>'Every money event on the ambassador’s ledger, newest first — the rows the partner tab’s table draws: a commission or a reversal from Stripe, an adjustment or a fixed fee entered by the programme’s operator. The customer appears as a stable code (Customer 3F2A1B), never a name — the same code the payout sheet shows. Paged with limit / offset; count is the whole ledger. 404 without an ambassador record; 401 without a session; 403 for a partner API key; 400 on a bad page. A platform admin passes ?ambassador=<slug> to read any ambassador’s page (#2517).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”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.
Rows per page, 1–500 (default 200).
Rows to skip (default 0).
Responses
Section titled “Responses”GET /api/partner/ledger/ — the ambassador’s ledger, newest first.
object
One money event on the ambassador’s ledger, as the partner tab lists it.
object
The day the customer paid (UTC) — or, for a hand entry, the day it applies to.
YYYY-MM — the statement month the row belongs to (UTC calendar).
A stable code in place of the customer’s name — Customer 3F2A1B, the same code the Metabase view and the payout sheet show. Null on a programme-level row (a fee not tied to one customer).
commission and reversal come from Stripe; adjustment and the one-off payouts fixed_fee, institutional_referral and conversion_bonus are entered by the programme’s operator.
commission- Commissionreversal- Reversaladjustment- Adjustmentfixed_fee- Fixed feeinstitutional_referral- Institutional referralconversion_bonus- Conversion bonus
The customer’s plan tier on the invoice; blank on a hand entry.
month or year; blank on a hand entry.
Months since the customer’s first paid invoice, counting from 1 — what a tiered rate keys on. Null on a hand entry.
What the customer paid, excluding tax, USD cents; 0 on a hand entry.
The rate applied, percent; 0 on a hand entry.
Signed, USD cents: a reversal or a deduction is negative.
Accrued during a pause and held: joins the first statement after the pause ends.
YYYY-MM of the statement the row is on; null until the month-end job has drafted it.
That statement’s pay-by date (net-30); null when carried or not drafted yet.
The day that statement was paid, UTC; null until then.
Rows on the whole ledger, for paging.
The page size applied.
The offset applied.
Examples
Two invoices, a refund and a fee
{ "rows": [ { "id": "5f1c9e2a-1b3d-4c7e-9a6f-2d8b0c4e7a11", "paid_on": "2026-09-14", "month": "2026-09", "customer_ref": "Customer 3F2A1B", "entry_type": "commission", "plan_role": "starter", "billing_interval": "month", "member_month": 3, "net_cents": 3900, "rate_pct": 15, "commission_cents": 585, "zero_reason": "", "held": false, "statement_period": null, "statement_status": null, "statement_due_date": null, "statement_paid_on": null }, { "id": "0c7d4b1e-8a92-4f6b-b3e1-5a2c9d7e4f20", "paid_on": "2026-08-30", "month": "2026-08", "customer_ref": "Customer 9B04CD", "entry_type": "reversal", "plan_role": "professional", "billing_interval": "month", "member_month": 2, "net_cents": 9900, "rate_pct": 15, "commission_cents": -1485, "zero_reason": "", "held": false, "statement_period": "2026-08", "statement_status": "approved", "statement_due_date": "2026-09-30", "statement_paid_on": null }, { "id": "7a3e5c9d-2f4b-4d1a-8e6c-1b9f0a2d3c44", "paid_on": "2026-08-01", "month": "2026-08", "customer_ref": null, "entry_type": "fixed_fee", "plan_role": "", "billing_interval": "", "member_month": null, "net_cents": 0, "rate_pct": 0, "commission_cents": 5000, "zero_reason": "", "held": false, "statement_period": "2026-08", "statement_status": "approved", "statement_due_date": "2026-09-30", "statement_paid_on": null } ], "count": 3, "limit": 200, "offset": 0}object
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).
Example generated
{ "detail": "example"}object
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).
Example generated
{ "detail": "example"}object
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).
Example generated
{ "detail": "example"}object
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).
Examples
No ambassador record on this account
{ "detail": "No ambassador record is linked to this account."}