How to Manage Affiliates via the CAKE API

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.

List Affiliates

GET /api/2/affiliates.json
ParameterTypeRequiredDescription
affiliate_idintegerNoFilter to a single affiliate by ID.
affiliate_namestringNoPartial or full name match.
affiliate_statusstringNoFilter by status: active, inactive, or pending.
account_manager_idintegerNoReturn only affiliates assigned to this account manager.
start_at_rowintegerNoRow offset. Default: 0.
row_limitintegerNoMax 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=25

Sample 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
ParameterTypeRequiredDescription
affiliate_namestringYesDisplay name for the new affiliate account.
account_manager_idintegerYesCAKE user ID of the assigned account manager.
affiliate_statusstringYesInitial status: active, inactive, or pending.
websitestringNoAffiliate's primary website URL.
payment_type_idintegerNoPayment method type ID (e.g. check, wire, PayPal).
billing_cycle_idintegerNoBilling cycle ID (e.g. net-30, bi-weekly).
minimum_payment_thresholddecimalNoMinimum 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
ParameterTypeRequiredDescription
affiliate_idintegerYesID of the affiliate to update.
affiliate_namestringNoNew display name.
affiliate_statusstringNoUpdated status: active, inactive, or pending.
account_manager_idintegerNoReassign 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
ParameterTypeRequiredDescription
affiliate_idintegerYesID of the affiliate.
offer_idintegerYesID 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=12345

Sample 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
ParameterTypeRequiredDescription
affiliate_idintegerYesID of the affiliate.
offer_idintegerYesID of the offer.
payoutdecimalNoCustom payout amount for this affiliate on this offer.
payout_typestringNoPayout model: CPA, CPC, or CPM.
statusstringNoAccess 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.


Did you find it helpful? Yes No

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