Skip to content

Base address

https://your-store.com/wp-json/affiliate-easy/v1/

Sign in (Application Passwords)

  1. In WordPress go to Users → Profile (the store owner, or the affiliate’s own user).
  2. In Application Passwords, type a name (for example “My phone”) and click Add Application Password.
  3. Copy the password. Send it with every request as HTTP Basic auth: the username and this password.

Application Passwords work only over HTTPS. Revoke one any time on the same screen.

Start here

GET /me — who is signed in: roles.admin (store owner), roles.affiliate, the affiliate status, store currency and which features are on.

Store owner routes

  • GET /admin/overview?days=30 — totals for the period and the one before, a daily series, and what needs attention.
  • GET /admin/affiliates?status=&search=&page=&per_page= and GET /admin/affiliates/{id}
  • POST /admin/affiliates/{id}/approve, /reject, /block, /unblock
  • POST /admin/affiliates/{id}/pay — payment_method (paypal, bank, check), optional transaction_id, notes, mark_completed. Records the payment; it never sends money.
  • GET /admin/commissions, GET /admin/payouts, GET /admin/payouts/due
  • GET /admin/ai/insights (add refresh=1 for a new one) and POST /admin/ai/ask with question

Affiliate routes (own data only)

  • GET /affiliate/dashboard — stats, links and coupon codes.
  • GET /affiliate/commissions
  • GET /affiliate/payouts and POST /affiliate/payouts to request a payout.
  • GET /affiliate/payment-info and PUT /affiliate/payment-info
  • GET /affiliate/ai/options and POST /affiliate/ai/content (product_id, type, tone, language).

Lists and errors

  • Lists take page and per_page (up to 100) and return the headers X-WP-Total and X-WP-TotalPages.
  • 401 = not signed in. 403 = not allowed (for example an affiliate on a store-owner route, or a pending account requesting a payout). 404 = unknown affiliate. 400 = wrong input. 429 = daily AI limit reached. 503 = AI not connected.
  • Every error is JSON with code and message.

Was this article helpful?