How to Manage Campaigns and Creatives via the CAKE API

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

GET /api/2/campaigns.json
ParameterTypeRequiredDescription
campaign_idintegerNoReturn a single campaign by ID.
offer_idintegerNoFilter campaigns for a specific offer.
affiliate_idintegerNoFilter campaigns for a specific affiliate.
campaign_statusstringNoFilter by status: active, inactive, or deleted.
start_at_rowintegerNoRow offset. Default: 1.
row_limitintegerNoMax 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=active

Sample 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

POST /api/2/campaign.json
ParameterTypeRequiredDescription
offer_idintegerYesID of the offer this campaign belongs to.
affiliate_idintegerYesID of the affiliate being assigned.
display_link_type_idintegerYesDisplay link format type. Obtain valid IDs from your CAKE admin.
creative_idintegerNoID of the creative asset to assign.
landing_page_idintegerNoID 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.

GET /api/2/creatives.json
ParameterTypeRequiredDescription
creative_idintegerNoReturn a single creative by ID.
offer_idintegerNoFilter creatives for a specific offer.
creative_type_idintegerNoFilter by type (e.g. banner, email, text link).
creative_statusstringNoFilter 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=active

Sample 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.

GET /api/2/offer_landing_pages.json
ParameterTypeRequiredDescription
offer_idintegerYesID of the offer whose landing pages you want to retrieve.
landing_page_statusstringNoFilter 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=12345

Sample 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.


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.