This article will cover the following:
Use the Affiliates API to automate affiliate onboarding, sync partner status changes from an external CRM, bulk-update account manager assignments, or retrieve affiliate lists for reporting integrations.
api_key parameter. Find yours under Setup → System Access → API Keys.
Overview
Affiliates are the publisher partners who promote your advertisers' offers and drive tracked conversions through your CAKE network. Each affiliate account stores contact details, payment settings, account manager assignments, status flags, and offer-level access rules. CAKE gives you full lifecycle control — onboard manually through the UI at Affiliates → Manage Affiliates → Add Affiliate, or automate entirely through the API.
Key Concepts
- Affiliate Status —
active,inactive,pending. Only active affiliates can generate tracked clicks. - Affiliate Offer — The intersection record granting a specific affiliate access to a specific offer, with individual payout overrides.
- Payout Type —
cpa_flat,cpa_percentage,cpm. - Account Manager — Internal CAKE user managing the affiliate relationship, referenced by
account_manager_id. - Billing Cycle — Payment frequency: weekly, biweekly, monthly. Controlled by
billing_cycle_id. - Sub ID — Custom tracking parameter affiliates append to click URLs to segment traffic. Stored as sub IDs, not UTM parameters.
- Postback — Server-to-server conversion notification from CAKE to the affiliate's tracking system when a conversion fires.
Available Actions
Get Affiliates
Retrieves a list of affiliate records. Use to search by name, status, account manager, or tag; pull paginated lists for bulk operations; or sync your affiliate roster into an external system.
GET /api/2/affiliates.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| affiliate_id | integer | No | Filter to a single affiliate by their unique numeric ID. |
| affiliate_name | string | No | Partial or full name filter. Supports partial matches. |
| affiliate_status | string | No | active | inactive | pending |
| account_manager_id | integer | No | Return only affiliates assigned to this account manager. |
| tag_id | integer | No | Filter by a specific tag ID. |
| start_at_row | integer | No | Pagination offset. Default 0. |
| row_limit | integer | No | Max records to return. Default 100, max 500. |
| sort_field | string | No | affiliate_id or affiliate_name. |
| sort_descending | boolean | No | true for descending sort. |
Sample request
GET https://yourdomain.cakemarketing.com/api/2/affiliates.json?api_key=YOUR_API_KEY&affiliate_status=active&account_manager_id=42&row_limit=50&start_at_row=0Sample response
{
"request_status": "Success",
"response": {
"affiliates": [
{
"affiliate": {
"affiliate_id": 67890,
"affiliate_name": "MediaBridge Partners",
"affiliate_status": { "id": 1, "name": "active" },
"account_manager": { "id": 42, "name": "Jordan Lee" },
"website": "https://www.mediabridgepartners.com",
"billing_cycle": { "id": 3, "name": "Monthly" },
"payment_method": { "id": 2, "name": "Wire Transfer" },
"minimum_payment_threshold": "100.00",
"date_created": "2023-06-15"
}
}
]
}
}Create Affiliate
Creates a new affiliate account. Use for automated signup-to-approval workflows or when migrating partner data from another platform.
POST /api/2/affiliate.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| affiliate_name | string | Yes | Affiliate company or display name. |
| account_manager_id | integer | Yes | Account manager to assign. |
| affiliate_status | string | No | active | inactive | pending. Default: pending. |
| website | string | No | Affiliate's primary website URL. |
| payment_type_id | integer | No | Payment method type ID. |
| billing_cycle_id | integer | No | Billing cycle ID (e.g. Net 15, Net 30). |
| minimum_payment_threshold | decimal | No | Minimum earnings before payment is issued. |
Sample request
POST https://yourdomain.cakemarketing.com/api/2/affiliate.json
{
"api_key": "YOUR_API_KEY",
"affiliate_name": "New Media Group Inc",
"account_manager_id": 42,
"affiliate_status": "active",
"website": "https://newmediagroup.example.com",
"payment_type_id": 2,
"billing_cycle_id": 3,
"minimum_payment_threshold": 100.00
}Sample response
{
"request_status": "Success",
"affiliate": {
"affiliate_id": 67891,
"affiliate_name": "New Media Group Inc",
"affiliate_status": "active",
"account_manager": { "id": 42, "name": "Jordan Lee" },
"date_created": "2026-06-19 09:30:00"
}
}Update Affiliate
Updates an affiliate's status, name, or account manager. Use when automating tier changes, suspending affiliates based on fraud signals, or reassigning accounts.
POST /api/2/update_affiliate.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| affiliate_id | integer | Yes | ID of the affiliate to update. |
| affiliate_name | string | No | Updated display name. |
| affiliate_status | string | No | active | inactive | pending | rejected | suspended |
| account_manager_id | integer | No | ID of the new account manager. |
Sample request
POST https://yourdomain.cakemarketing.com/api/2/update_affiliate.json
{
"api_key": "YOUR_API_KEY",
"affiliate_id": 67890,
"affiliate_status": "suspended",
"account_manager_id": 7
}Sample response
{
"request_status": "Success",
"affiliate": {
"affiliate_id": 67890,
"affiliate_name": "MediaBridge Partners",
"affiliate_status": "suspended",
"account_manager": { "id": 7, "name": "Mark Johnson" }
}
}Get Affiliate Offer
Retrieves the offer access configuration for a specific affiliate-offer pairing, including custom payout overrides.
GET /api/2/affiliate_offer.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| affiliate_id | integer | Yes | Affiliate ID. |
| offer_id | integer | Yes | Offer ID. |
Sample request
GET https://yourdomain.cakemarketing.com/api/2/affiliate_offer.json?api_key=YOUR_API_KEY&affiliate_id=67890&offer_id=12345Sample response
{
"request_status": "Success",
"response": {
"affiliate_offer": {
"affiliate_id": 67890,
"offer_id": 12345,
"payout": 20.00,
"payout_type": "CPA",
"affiliate_offer_status": "active"
}
}
}You may also be interested in:
If you have any questions, please reach out to your dedicated CAKE Client Success Manager/Account Manager or contact the CAKE Support Team at support@getCAKE.com.