Get the affiliate portal
GET
An affiliate's own aggregates, opened by the token in the x-affiliate-token header (minted by POST /sites/{siteId}/affiliates/{id}/share; no cookie or other credential is read). Window parameters as everywhere, the last 30 days when none is given. 401 for an unknown or revoked token; refused tokens count against the client's credential budget like share tokens (429 once spent). Money is in the site's currency. 60 requests a minute per client.
affiliateTokenheader
x-affiliate-token<token>An affiliate portal token, minted by POST /api/v1/sites/{siteId}/affiliates/{id}/share: one affiliate's own report, nothing else.
start?stringend?stringlast?stringall?"true"Value in
"true"tz?stringbucket?stringValue in
"minute""5m""15m""hour""day""week""month""year"OK
application/json- response
data*meta*curl -X GET 'https://pilotfox.app/api/v1/affiliate-portal'Example Response200
{ "data": { "affiliate": { "name": "string", "slug": "string", "commission_percent": 0 }, "site": { "name": "string", "domain": "string" }, "link": "string", "currency": "string", "totals": { "visits": 0, "visitors": 0, "payments": 0, "revenue": 0, "commission": 0, "conversion_rate": 0 }, "series": [ { "t": "string", "visits": 0, "visitors": 0, "payments": 0, "revenue": 0 } ], "landing_pages": [ { "pathname": "string", "visits": 0 } ] }, "meta": { "window": { "from": "string", "to": "string", "tz": "string", "bucket": "minute" }, "compare": { "from": "string", "to": "string" }, "totalCount": -9007199254740991, "nextCursor": "string", "truncated": true, "cache": "hit" }}