AffiLink API
{role} is client, influencer, or creator. 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/{role}/me | Each role | Product, role, account id, sub-account id, and display name. |
| GET | /api/v1/affilink/{role}/products | Each role | The client path sees that brand. Influencer and creator paths see active brands. |
| GET | /api/v1/affilink/{role}/campaigns | Each role | The client path includes drafts. Other paths see live campaigns, with commission rows and no discount codes. |
| POST | /api/v1/affilink/client/campaigns/{id}/launch | Client | Draft to live. Empty body. |
| POST | /api/v1/affilink/client/campaigns/{id}/pause | Client | Live to paused. A default campaign cannot be paused. |
| GET | /api/v1/affilink/{role}/contents | Each role | Client path sees the brand. Creator path sees their own. Influencer path sees active content they can link. |
| POST | /api/v1/affilink/creator/contents/{id}/submit | Creator | Draft with uploaded media becomes approval pending. New files are uploaded in the app. |
| GET | /api/v1/affilink/client/content_destinations | Client | Optional status pending, active, or rejected. |
| POST | /api/v1/affilink/client/content_destinations/{id}/approve | Client | Approves one product-page destination. It does not publish the content. |
| POST | /api/v1/affilink/client/content_destinations/{id}/reject | Client | Rejects a pending destination. |
| GET | /api/v1/affilink/influencer/affilinks | Influencer | That influencer’s links, including code, public URL, and earnings. |
| POST | /api/v1/affilink/influencer/affilinks | Influencer | Body content_id and optional campaign_ids. Each call creates a new link. |
| GET | /api/v1/affilink/{role}/wallet | Each role | INR account balance and this role’s other holdings, such as XP. |
| GET | /api/v1/affilink/client/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.