Skip to content

Get what my referral link did for one campaign​

GET
/me/referrals/campaigns/{fundraiserId}

All-time figures for the caller's own referral link on one campaign: impressions (visits not identified as a bot), clicks by traffic type, distinct human visitors, driven gifts (paid, not self-referred), distinct donors, and the value of those gifts (donation + tip) per currency in cents. The same definitions as the per-campaign rows of the ambassador analytics. Also returns the caller's referral code and link for the campaign when one exists; this read never creates one. Feeds the ambassador bar on the campaign page.

A campaign the caller may not open (draft, pending, private or deleted, and not their own) is a 404, as its page is.

Requires permission: view_own_referral_portal.

Authorizations​

BearerAuth

In the browser, authentication rides on the httpOnly session cookies set by /cognito/signin or the Google / Apple sign-in at /cognito/oauth/{provider}. For scripts and for Swagger UI testing, paste an API key (fh_live_…, created with POST /api-keys); a Cognito JWT is accepted too. Sign-in does not return a token in its body.

Type
HTTP (bearer)

Parameters​

Path Parameters

fundraiserId*

The campaign's id.

Type
string
Required
Format
"uuid"

Responses​

The caller's figures for the campaign

application/json
JSON
{
"data": {
"fundraiser_id": "string",
"impressions": 0,
"clicks_by_traffic_type": {
"human": 0,
"bot": 0,
"unknown": 0
},
"distinct_human_visitors": 0,
"driven_gifts": 0,
"distinct_donors": 0,
"funds_attributed": [
{
"currency": "string",
"amount_cents": 0
}
],
"referral_code": "string",
"referral_url": "https://fundlyhub.org/r/AbC123xYz0",
"last_click_at": "string",
"last_gift_at": "string",
"as_of": "string"
}
}

Playground​

Server
Authorization
Variables
Key
Value

Samples​

Powered by VitePress OpenAPI

Built with VitePress