This article will cover the following:
Overview
The Campaigns & Creatives API gives you full programmatic control over campaign records and the creative asset library. Use it to audit affiliate campaign assignments, create new campaigns, and discover available creative IDs.
List Campaigns
| Parameter | Type | Required | Description |
|---|---|---|---|
| campaign_id | integer | No | Return a single campaign by ID. |
| offer_id | integer | No | Filter campaigns for a specific offer. |
| affiliate_id | integer | No | Filter campaigns for a specific affiliate. |
| campaign_status | string | No | Filter by status: active, inactive, or deleted. |
| start_at_row | integer | No | Row offset. Default: 1. |
| row_limit | integer | No | Max rows. Default: 100; max: 500. |
Sample request
GET https://yourdomain.cake.com/api/2/campaigns.json
?api_key=YOUR_API_KEY
&offer_id=12345
&affiliate_id=67890
&campaign_status=activeSample response
{
"request_status": "Success",
"campaigns": [{
"campaign_id": 8801,
"offer_id": 12345,
"affiliate_id": 67890,
"campaign_status": "active",
"display_link_type_id": 2,
"creative_id": 441,
"landing_page_id": 309,
"tracking_link": "https://yourdomain.cake.com/click?c=8801",
"created": "2024-01-15T10:22:00Z"
}]
}Create Campaign
| Parameter | Type | Required | Description |
|---|---|---|---|
| offer_id | integer | Yes | ID of the offer this campaign belongs to. |
| affiliate_id | integer | Yes | ID of the affiliate being assigned. |
| display_link_type_id | integer | Yes | Display link format type. Obtain valid IDs from your CAKE admin. |
| creative_id | integer | No | ID of the creative asset to assign. |
| landing_page_id | integer | No | ID of the landing page to assign. |
Sample request
POST https://yourdomain.cake.com/api/2/campaign.json?api_key=YOUR_API_KEY
{
"offer_id": 12345,
"affiliate_id": 67890,
"display_link_type_id": 2,
"creative_id": 441,
"landing_page_id": 309
}Sample response
{
"request_status": "Success",
"campaign": {
"campaign_id": 8802,
"offer_id": 12345,
"affiliate_id": 67890,
"campaign_status": "active",
"tracking_link": "https://yourdomain.cake.com/click?c=8802"
}
}List Creatives
Returns creative assets registered in CAKE. Use this endpoint to discover available creative IDs before creating or updating a campaign.
| Parameter | Type | Required | Description |
|---|---|---|---|
| creative_id | integer | No | Return a single creative by ID. |
| offer_id | integer | No | Filter creatives for a specific offer. |
| creative_type_id | integer | No | Filter by type (e.g. banner, email, text link). |
| creative_status | string | No | Filter by status: active or inactive. |
Sample request
GET https://yourdomain.cake.com/api/2/creatives.json
?api_key=YOUR_API_KEY
&offer_id=12345
&creative_status=activeSample response
{
"request_status": "Success",
"creatives": [{
"creative_id": 441,
"creative_name": "300x250 Banner",
"creative_type": "banner",
"width": 300,
"height": 250,
"status": "active"
}]
}List Landing Pages
Returns landing pages registered under an offer. Use this endpoint to discover available landing page IDs before creating or updating a campaign.
| Parameter | Type | Required | Description |
|---|---|---|---|
| offer_id | integer | Yes | ID of the offer whose landing pages you want to retrieve. |
| landing_page_status | string | No | Filter by status: active or inactive. |
Sample request
GET https://yourdomain.cake.com/api/2/offer_landing_pages.json
?api_key=YOUR_API_KEY
&offer_id=12345Sample response
{
"request_status": "Success",
"landing_pages": [
{"landing_page_id": 309, "landing_page_name": "Main LP", "url": "https://acmefinancial.com/apply", "status": "active"},
{"landing_page_id": 310, "landing_page_name": "Mobile LP", "url": "https://acmefinancial.com/m/apply", "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.