Affiliate referrals
id: affiliatewp-affiliates-referrals owner: affiliatewp method: GET path: /wp-json/headlesswp/v1/affiliates/referrals title: Affiliate referrals usedBySite: true
GET /wp-json/headlesswp/v1/affiliates/referrals
Returns cursor-paginated referral rows for the current affiliate.
Auth + CSRF
- Auth: cookie session required.
- Proxy nonce required: yes.
Request schema
- Query params:
limit(optional): integer1..100, default20.cursor(optional): opaque base64url string returned by the API.
Response schema
{
"data": {
"referrals": [
{
"id": "number",
"amountMinor": "number",
"currency": "string",
"status": "string",
"createdAtUtc": "string"
}
],
"nextCursor": "string | null"
}
}
Error codes
| Status | Code | Notes |
|---|---|---|
| 401 | NOT_AUTHENTICATED | Login required. |
| 403 | AFFILIATE_NOT_ACTIVE | Affiliate exists but is not active. |
| 403 | AFFILIATE_TERMS_REQUIRED | Terms acceptance required before referrals access. |
| 404 | AFFILIATE_NOT_FOUND | No affiliate account for current user (or feature disabled upstream). |
| 422 | VALIDATION_FAILED | Invalid limit/cursor or forbidden scope override parameters. |
| 500 | CONFIG_INVALID_AFFILIATE_TERMS_VERSION | Terms config invalid while gating active. |
| 500 | UPSTREAM_UNAVAILABLE | Dynamic passthrough fallback code from AffiliateReferralsService failures. |