This article will cover the following:
Use the Sub Affiliates API to manage sub-affiliate relationships within CAKE — allowing affiliates to recruit and track their own downstream partners while preserving accurate attribution and payout hierarchies.
api_key parameter. Find yours under Setup → System Access → API Keys.Overview
Sub affiliates in CAKE represent a downstream partner layer within an affiliate's own network. When an affiliate recruits publishers or sub-partners to drive traffic on their behalf, those entities can be tracked as sub affiliates within CAKE — giving the parent affiliate visibility into sub-partner performance while preserving the network's ability to report accurately at every level.
Sub affiliate relationships are attached to a parent affiliate account. The parent affiliate earns a payout on conversions generated by their sub affiliates, while CAKE records the sub-affiliate source for reporting purposes. Sub affiliate IDs are passed through the tracking link via the sub_affiliate parameter and appear in conversion reports.
Sub affiliates are managed through the CAKE UI under Affiliates → Sub Affiliates and via the API, enabling networks that operate tiered publisher programs to automate sub-affiliate setup and reporting.
Key Concepts
- Sub Affiliate — A downstream publisher partner who drives traffic through a parent affiliate's tracking links. Sub affiliates are tracked within CAKE for attribution and payout purposes but do not have their own CAKE login accounts.
- Parent Affiliate — The primary affiliate account that recruits and manages sub affiliates. The parent affiliate receives credit for conversions generated by their sub affiliates.
- Sub Affiliate ID — A unique identifier assigned to each sub affiliate within CAKE. Passed via the
sub_affiliateparameter in tracking URLs for click and conversion attribution. - Payout Split — The revenue sharing arrangement between the parent affiliate and the network when sub affiliates generate conversions. Configured per parent affiliate account.
- Sub Affiliate Report — A report available in CAKE that breaks down clicks, conversions, and payouts by sub affiliate ID, giving parent affiliates visibility into their downstream partner performance.
Available Actions
Get Sub Affiliates
/api/2/sub_affiliates.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| affiliate_id | integer | Yes | The parent affiliate ID to retrieve sub affiliates for. |
| sub_affiliate_id | integer | No | Filter to a single sub affiliate by ID. |
| sub_affiliate_status | string | No | Filter by status: active, inactive. |
| start_at_row | integer | No | Pagination offset. Default 0. |
| row_limit | integer | No | Max records. Default 100, max 500. |
Sample request
GET https://yourdomain.cakemarketing.com/api/2/sub_affiliates.json?api_key=YOUR_API_KEY&affiliate_id=67890&sub_affiliate_status=activeSample response
{
"request_status": "Success",
"response": {
"sub_affiliates": [
{
"sub_affiliate_id": 901,
"sub_affiliate_name": "West Coast Leads LLC",
"parent_affiliate_id": 67890,
"sub_affiliate_status": "active",
"date_created": "2025-02-10T11:00:00Z"
}
],
"total_rows": 1
}
}Create Sub Affiliate
/api/2/sub_affiliate.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| affiliate_id | integer | Yes | The parent affiliate ID to register the sub affiliate under. |
| sub_affiliate_name | string | Yes | Display name for the sub affiliate. |
| sub_affiliate_status | string | No | active | inactive. Default: active. |
| website | string | No | Sub affiliate's website URL. |
Sample request
POST https://yourdomain.cakemarketing.com/api/2/sub_affiliate.json
{
"api_key": "YOUR_API_KEY",
"affiliate_id": 67890,
"sub_affiliate_name": "Pacific Leads Co",
"sub_affiliate_status": "active",
"website": "https://pacificleads.example.com"
}Sample response
{
"request_status": "Success",
"response": {
"sub_affiliate_id": 902,
"sub_affiliate_name": "Pacific Leads Co",
"parent_affiliate_id": 67890,
"sub_affiliate_status": "active",
"date_created": "2026-06-19T10:00:00Z"
}
}Sub Affiliate Report
/api/2/report/sub_affiliate.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| start_date | date | Yes | Report start date (YYYY-MM-DD). |
| end_date | date | Yes | Report end date (YYYY-MM-DD). |
| affiliate_id | integer | No | Filter to a specific parent affiliate. |
| sub_affiliate_id | integer | No | Filter to a specific sub affiliate. |
| offer_id | integer | No | Filter to a specific offer. |
| start_at_row | integer | No | Pagination offset. |
| row_limit | integer | No | Max rows. Default 100, max 10000. |
Sample request
GET https://yourdomain.cakemarketing.com/api/2/report/sub_affiliate.json?api_key=YOUR_API_KEY&start_date=2026-06-01&end_date=2026-06-19&affiliate_id=67890Sample response
{
"request_status": "Success",
"response": {
"data": {
"rows": [
{
"sub_affiliate_id": 901,
"sub_affiliate_name": "West Coast Leads LLC",
"clicks": 1240,
"conversions": 38,
"payout": 684.00,
"epc": 0.552
}
]
}
}
}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.