This article will cover the following:
Overview
The Affiliates API lets you programmatically manage your affiliate partner network — retrieve affiliate records, create new accounts, update existing profiles, and control which offers each affiliate can access. All endpoints require your api_key.
Tip:
See Managing Affiliates in CAKE for a full guide to the approval workflow, statuses, tiers, and payout overrides via the UI.
See Managing Affiliates in CAKE for a full guide to the approval workflow, statuses, tiers, and payout overrides via the UI.
List Affiliates
GET /api/2/affiliates.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| affiliate_id | integer | No | Filter to a single affiliate by ID. |
| affiliate_name | string | No | Partial or full name match. |
| affiliate_status | string | No | Filter by status: active, inactive, or pending. |
| account_manager_id | integer | No | Return only affiliates assigned to this account manager. |
| start_at_row | integer | No | Row offset. Default: 0. |
| row_limit | integer | No | Max records. Default: 25. |
Sample request
GET https://yourdomain.cake.com/api/2/affiliates.json
?api_key=YOUR_API_KEY
&affiliate_status=active
&start_at_row=0
&row_limit=25Sample response
{
"request_status": "Success",
"affiliates": [{
"affiliate_id": 67890,
"affiliate_name": "MediaBridge Partners",
"affiliate_status": "active",
"account_manager_id": 4,
"website": "https://mediabridgepartners.com",
"billing_cycle_id": 1,
"date_created": "2023-08-15T10:22:00Z"
}],
"total_rows": 1
}Create Affiliate
POST /api/2/affiliate.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| affiliate_name | string | Yes | Display name for the new affiliate account. |
| account_manager_id | integer | Yes | CAKE user ID of the assigned account manager. |
| affiliate_status | string | Yes | Initial status: active, inactive, or pending. |
| website | string | No | Affiliate's primary website URL. |
| payment_type_id | integer | No | Payment method type ID (e.g. check, wire, PayPal). |
| billing_cycle_id | integer | No | Billing cycle ID (e.g. net-30, bi-weekly). |
| minimum_payment_threshold | decimal | No | Minimum earnings required before payment is issued. |
Sample request
POST https://yourdomain.cake.com/api/2/affiliate.json
{
"api_key": "YOUR_API_KEY",
"affiliate_name": "MediaBridge Partners",
"account_manager_id": 4,
"affiliate_status": "active",
"website": "https://mediabridgepartners.com",
"payment_type_id": 2,
"billing_cycle_id": 1,
"minimum_payment_threshold": 50.00
}Sample response
{
"request_status": "Success",
"affiliate_id": 67890,
"affiliate_name": "MediaBridge Partners",
"affiliate_status": "active"
}Update Affiliate
POST /api/2/update_affiliate.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| affiliate_id | integer | Yes | ID of the affiliate to update. |
| affiliate_name | string | No | New display name. |
| affiliate_status | string | No | Updated status: active, inactive, or pending. |
| account_manager_id | integer | No | Reassign to a different account manager. |
Sample request
POST https://yourdomain.cake.com/api/2/update_affiliate.json
{
"api_key": "YOUR_API_KEY",
"affiliate_id": 67890,
"affiliate_status": "inactive",
"account_manager_id": 7
}Sample response
{
"request_status": "Success",
"affiliate_id": 67890,
"affiliate_status": "inactive"
}Affiliate-Offer Relationships
Affiliate-offer relationships are managed separately from the affiliate account. This lets you fine-tune payout rates and access status on a per-affiliate, per-offer basis.
GET /api/2/affiliate_offer.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| affiliate_id | integer | Yes | ID of the affiliate. |
| offer_id | integer | Yes | ID of the offer. |
Sample request
GET https://yourdomain.cake.com/api/2/affiliate_offer.json
?api_key=YOUR_API_KEY
&affiliate_id=67890
&offer_id=12345Sample response
{
"request_status": "Success",
"affiliate_offer": {
"affiliate_id": 67890,
"offer_id": 12345,
"payout": 40.00,
"payout_type": "CPA",
"status": "active"
}
}POST /api/2/update_affiliate_offer.json
| Parameter | Type | Required | Description |
|---|---|---|---|
| affiliate_id | integer | Yes | ID of the affiliate. |
| offer_id | integer | Yes | ID of the offer. |
| payout | decimal | No | Custom payout amount for this affiliate on this offer. |
| payout_type | string | No | Payout model: CPA, CPC, or CPM. |
| status | string | No | Access status: active or inactive. |
Sample request
POST https://yourdomain.cake.com/api/2/update_affiliate_offer.json
{
"api_key": "YOUR_API_KEY",
"affiliate_id": 67890,
"offer_id": 12345,
"payout": 50.00,
"status": "active"
}Sample response
{
"request_status": "Success",
"affiliate_offer": {
"affiliate_id": 67890,
"offer_id": 12345,
"payout": 50.00,
"status": "active"
}
}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.