AffiLink API
Paths are on the API origin. A single resource is wrapped in data. Lists also return next_cursor when more rows exist. Detail routes use the same path with {id} for products, campaigns, contents, and conversions.
| Method | Path | Who | What it does |
|---|---|---|---|
| GET | /api/v1/affilink/me | Any key | Product, role, account id, sub-account id, and display name. |
| GET | /api/v1/affilink/products | Any key | The brand sees its products. Earners see products from active brands. |
| GET | /api/v1/affilink/campaigns | Any key | Brands see their campaigns. Earners see live campaigns, with commission rows and no discount codes. |
| POST | /api/v1/affilink/campaigns/{id}/launch | Client | Draft to live. Empty body. |
| POST | /api/v1/affilink/campaigns/{id}/pause | Client | Live to paused. A default campaign cannot be paused. |
| GET | /api/v1/affilink/contents | Any key | Brands see content on their products. Creators see their own. Influencers see active content they can link. |
| POST | /api/v1/affilink/contents/{id}/submit | Creator | Draft with uploaded media becomes approval pending. New files are uploaded in the app. |
| GET | /api/v1/affilink/content_destinations | Client | Optional status pending, active, or rejected. |
| POST | /api/v1/affilink/content_destinations/{id}/approve | Client | Approves one product-page destination. It does not publish the content. |
| POST | /api/v1/affilink/content_destinations/{id}/reject | Client | Rejects a pending destination. |
| GET | /api/v1/affilink/affilinks | Influencer | The caller’s links, including code, public URL, and earnings. |
| POST | /api/v1/affilink/affilinks | Influencer | Body content_id and optional campaign_ids. Each call creates a new link. |
| GET | /api/v1/affilink/wallet | Any key | INR account balance and this role’s other holdings, such as XP. |
| GET | /api/v1/affilink/conversions | Client | Order and event triggers for the brand. Optional status. No customer contact data. |
Earnings on an affilink or a piece of content are realised_earnings, unrealised_earnings, and lost_earnings. Campaign commissions list the active reward rows. See the workflows for the order to call them.