Read API
REST API to fetch offers and affiliate stats. Requires an API key.
Authentication
Send the API key via Authorization: Bearer YOUR_API_KEY or X-API-Key: YOUR_API_KEY.
Contact an admin to obtain an API key.
GET /api/v1/offers
List active offers. Optional query: affiliateId — show only offers approved for this affiliate.
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://your-app.com/api/v1/offers?affiliateId=optional"
GET /api/v1/stats
Get affiliate stats: clicks, conversions, revenue, paid. Required query: affiliateId.
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://your-app.com/api/v1/stats?affiliateId=xxx"
Response
401 – Invalid or missing API key