Affiliate profile
id: affiliatewp-affiliates-me owner: affiliatewp method: GET path: /wp-json/headlesswp/v1/affiliates/me title: Affiliate profile usedBySite: true
GET /wp-json/headlesswp/v1/affiliates/me
Returns affiliate account details for the current authenticated user.
Auth + CSRF
- Auth: cookie session required.
- Proxy nonce required: yes.
Request schema
- No request body.
- No query params.
Response schema
{
"data": {
"affiliate": {
"id": "number",
"status": "string",
"termsEnabled": "boolean",
"currentTermsVersion": "string | null",
"termsAcceptedVersion": "string | null",
"termsAcceptedAtUtc": "string | null",
"referralCode": "string",
"affiliateLink": "string (present only when status==active and terms allow it)"
}
}
}
Error codes
| Status | Code | Notes |
|---|---|---|
| 401 | NOT_AUTHENTICATED | Login required. |
| 404 | AFFILIATE_NOT_FOUND | No affiliate account exists for the user (or feature disabled upstream). |
| 422 | VALIDATION_FAILED | Forbidden scope override parameters (userId, affiliateId, etc.) were provided. |
| 500 | CONFIG_INVALID_AFFILIATE_TERMS_VERSION | Returned only when terms gating is active and current terms version is misconfigured. |