Manage GoAffPro affiliate programs via their Admin REST API. Use when working with GoAffPro affiliates, coupons, sales, commissions, payouts, or syncing affiliate data with WooCommerce. Triggers on any mention of "GoAffPro", "affiliate program", "affiliate sync", "affiliate coupons", "referral tracking", "commission structure", or any affiliate marketing management task for stores using GoAffPro. Also trigger when user mentions syncing affiliates to WooCommerce, checking affiliate sales, generating affiliate reports, or managing payout data.
Manage GoAffPro affiliate programs programmatically via the Admin REST API. Covers affiliate CRUD, coupon management, sales/order queries, commission configuration, payout tracking, and WooCommerce account sync.
Two tokens required (from GoAffPro dashboard → Settings → Advanced Settings → API Keys):
| Token | Header | Purpose |
|---|---|---|
| Access Token | x-goaffpro-access-token | Admin API auth (required for ALL calls) |
| Public Token | x-goaffpro-public-token | Frontend tracking only (NOT for admin API) |
// WordPress example
$response = wp_remote_get($url, [
'timeout' => 30,
'headers' => [
'x-goaffpro-access-token' => 'YOUR_ACCESS_TOKEN',
],
]);
# cURL example
curl -H "x-goaffpro-access-token: YOUR_TOKEN" \
"https://api.goaffpro.com/v1/admin/affiliates?limit=10&fields=email,name"
CRITICAL: The fields parameter is REQUIRED for the affiliates endpoint. Without it, the API returns empty objects {} for each affiliate. Always specify which fields you need.