Base address
https://your-store.com/wp-json/affiliate-easy/v1/
Sign in (Application Passwords)
- In WordPress go to Users → Profile (the store owner, or the affiliate’s own user).
- In Application Passwords, type a name (for example “My phone”) and click Add Application Password.
- 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=andGET /admin/affiliates/{id}POST /admin/affiliates/{id}/approve,/reject,/block,/unblockPOST /admin/affiliates/{id}/pay—payment_method(paypal, bank, check), optionaltransaction_id,notes,mark_completed. Records the payment; it never sends money.GET /admin/commissions,GET /admin/payouts,GET /admin/payouts/dueGET /admin/ai/insights(addrefresh=1for a new one) andPOST /admin/ai/askwithquestion
Affiliate routes (own data only)
GET /affiliate/dashboard— stats, links and coupon codes.GET /affiliate/commissionsGET /affiliate/payoutsandPOST /affiliate/payoutsto request a payout.GET /affiliate/payment-infoandPUT /affiliate/payment-infoGET /affiliate/ai/optionsandPOST /affiliate/ai/content(product_id,type,tone,language).
Lists and errors
- Lists take
pageandper_page(up to 100) and return the headersX-WP-TotalandX-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
codeandmessage.