TriportRPC

GET /v1/referrals/rewards — List referral rewards

GEThttps://api.triport.io/v1/referrals/rewards?status=pending,available&limit=50&offset=0

Lists the calling user's referral rewards — one row per qualifying payment event — with optional status filtering and pagination.

Returns the referral rewards that belong to the authenticated user. Each reward is a snapshot of a single qualifying payment made by one of your invitees: the rate_bps and tier are frozen at the moment the reward is created and are not recalculated if your tier later changes.

Use this endpoint to render the rewards ledger in the Console — the detailed breakdown behind the aggregate balance shown by GET /v1/referrals/me. Filter by status to drive views such as "pending unlock", "available to spend", or "paid out".

This route is authenticated by the Console session cookie, not by an API key — it is a first-party Console endpoint and requests must be sent with credentials included. There is no bearer token or scope on this route.

Parameters

All parameters are query-string parameters.

statusstringoptional
Comma-separated list of reward statuses to include. Allowed values: pending, available, spent, paid_out, reversed. Unknown values are passed through and simply match nothing. Omit to return all statuses.
limitintegeroptional
Maximum number of rows to return. Valid range 1200. Defaults to 50; values outside the range (or non-numeric) are ignored and the default is used.
offsetintegeroptional
Number of rows to skip, for pagination. Must be >= 0. Defaults to 0; invalid values are ignored and the default is used.

Response

200 OK

When the user has no matching rewards, items is an empty array ([]), never null.

itemsarray
List of reward objects (see below). Empty array if none match.

Errors

CodeMeaningWhen it happens
401unauthenticatedNo valid Console session cookie was supplied.
500internalAn unexpected server-side error occurred while listing rewards.

Errors use the shared error envelope: { "error": "<code>" }. See errors.md for the full envelope and handling guidance.

Examples

JavaScript (fetch)

const params = new URLSearchParams({
  status: "pending,available",
  limit: "50",
  offset: "0",
});


const res = await fetch(
  `https://api.triport.io/v1/referrals/rewards?${params}`,
  { credentials: "include" } // send the Console session cookie
);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { items } = await res.json();
console.log(`${items.length} rewards`);

TypeScript SDK (@triport/sdk)

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


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


const { items } = await client.referrals.listRewards({
  status: ["pending", "available"],
  limit: 50,
  offset: 0,
});


for (const reward of items) {
  console.log(reward.id, reward.status, reward.amount_micro);
}

Python (triport-sdk)

from triport import TriportClient


client = TriportClient(base_url="https://api.triport.io")


rewards = client.referrals.list_rewards(
    status=["pending", "available"],
    limit=50,
    offset=0,
)


for reward in rewards["items"]:
    print(reward["id"], reward["status"], reward["amount_micro"])

Notes

  • Pagination. Page through results with limit and offset. The response contains only items (no total count) — when a page returns fewer than limit rows, you have reached the end.
  • Amounts are micro-units. Divide amount_micro by 1,000,000 to get the display value.
  • Frozen snapshot. rate_bps and tier reflect the values in effect when the reward was created and do not change retroactively.
  • Related endpoints: GET /v1/referrals/me for the aggregate balance, GET /v1/referrals/invitees for the invitee list, and GET /v1/referrals/payouts for payout history.