Skip to content

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

StatusCodeNotes
401NOT_AUTHENTICATEDLogin required.
404AFFILIATE_NOT_FOUNDNo affiliate account exists for the user (or feature disabled upstream).
422VALIDATION_FAILEDForbidden scope override parameters (userId, affiliateId, etc.) were provided.
500CONFIG_INVALID_AFFILIATE_TERMS_VERSIONReturned only when terms gating is active and current terms version is misconfigured.