CAKE API — Affiliates

This article will cover the following:

Why use this API?
Use the Affiliates API to automate affiliate onboarding, sync partner status changes from an external CRM, bulk-update account manager assignments, or retrieve affiliate lists for reporting integrations.
Authentication: All CAKE API requests require your api_key parameter. Find yours under Setup → System Access → API Keys.

Overview

Affiliates are the publisher partners who promote your advertisers' offers and drive tracked conversions through your CAKE network. Each affiliate account stores contact details, payment settings, account manager assignments, status flags, and offer-level access rules. CAKE gives you full lifecycle control — onboard manually through the UI at Affiliates → Manage Affiliates → Add Affiliate, or automate entirely through the API.



Key Concepts

  • Affiliate Statusactive, inactive, pending. Only active affiliates can generate tracked clicks.
  • Affiliate Offer — The intersection record granting a specific affiliate access to a specific offer, with individual payout overrides.
  • Payout Typecpa_flat, cpa_percentage, cpm.
  • Account Manager — Internal CAKE user managing the affiliate relationship, referenced by account_manager_id.
  • Billing Cycle — Payment frequency: weekly, biweekly, monthly. Controlled by billing_cycle_id.
  • Sub ID — Custom tracking parameter affiliates append to click URLs to segment traffic. Stored as sub IDs, not UTM parameters.
  • Postback — Server-to-server conversion notification from CAKE to the affiliate's tracking system when a conversion fires.


Available Actions

Get Affiliates

Retrieves a list of affiliate records. Use to search by name, status, account manager, or tag; pull paginated lists for bulk operations; or sync your affiliate roster into an external system.

When to use: Sync affiliates into an external CRM, build management dashboards, or identify accounts by status for bulk operations.
GET /api/2/affiliates.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
affiliate_idintegerNoFilter to a single affiliate by their unique numeric ID.
affiliate_namestringNoPartial or full name filter. Supports partial matches.
affiliate_statusstringNoactive | inactive | pending
account_manager_idintegerNoReturn only affiliates assigned to this account manager.
tag_idintegerNoFilter by a specific tag ID.
start_at_rowintegerNoPagination offset. Default 0.
row_limitintegerNoMax records to return. Default 100, max 500.
sort_fieldstringNoaffiliate_id or affiliate_name.
sort_descendingbooleanNotrue for descending sort.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/affiliates.json?api_key=YOUR_API_KEY&affiliate_status=active&account_manager_id=42&row_limit=50&start_at_row=0

Sample response

{ "request_status": "Success", "response": { "affiliates": [ { "affiliate": { "affiliate_id": 67890, "affiliate_name": "MediaBridge Partners", "affiliate_status": { "id": 1, "name": "active" }, "account_manager": { "id": 42, "name": "Jordan Lee" }, "website": "https://www.mediabridgepartners.com", "billing_cycle": { "id": 3, "name": "Monthly" }, "payment_method": { "id": 2, "name": "Wire Transfer" }, "minimum_payment_threshold": "100.00", "date_created": "2023-06-15" } } ] } }


Create Affiliate

Creates a new affiliate account. Use for automated signup-to-approval workflows or when migrating partner data from another platform.

When to use: Automate affiliate onboarding when partners apply through an external portal and are approved based on predefined criteria.
POST /api/2/affiliate.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
affiliate_namestringYesAffiliate company or display name.
account_manager_idintegerYesAccount manager to assign.
affiliate_statusstringNoactive | inactive | pending. Default: pending.
websitestringNoAffiliate's primary website URL.
payment_type_idintegerNoPayment method type ID.
billing_cycle_idintegerNoBilling cycle ID (e.g. Net 15, Net 30).
minimum_payment_thresholddecimalNoMinimum earnings before payment is issued.

Sample request

POST https://yourdomain.cakemarketing.com/api/2/affiliate.json { "api_key": "YOUR_API_KEY", "affiliate_name": "New Media Group Inc", "account_manager_id": 42, "affiliate_status": "active", "website": "https://newmediagroup.example.com", "payment_type_id": 2, "billing_cycle_id": 3, "minimum_payment_threshold": 100.00 }

Sample response

{ "request_status": "Success", "affiliate": { "affiliate_id": 67891, "affiliate_name": "New Media Group Inc", "affiliate_status": "active", "account_manager": { "id": 42, "name": "Jordan Lee" }, "date_created": "2026-06-19 09:30:00" } }


Update Affiliate

Updates an affiliate's status, name, or account manager. Use when automating tier changes, suspending affiliates based on fraud signals, or reassigning accounts.

When to use: Bulk status updates, fraud-based suspensions, or reassigning affiliate books when account managers change.
POST /api/2/update_affiliate.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
affiliate_idintegerYesID of the affiliate to update.
affiliate_namestringNoUpdated display name.
affiliate_statusstringNoactive | inactive | pending | rejected | suspended
account_manager_idintegerNoID of the new account manager.

Sample request

POST https://yourdomain.cakemarketing.com/api/2/update_affiliate.json { "api_key": "YOUR_API_KEY", "affiliate_id": 67890, "affiliate_status": "suspended", "account_manager_id": 7 }

Sample response

{ "request_status": "Success", "affiliate": { "affiliate_id": 67890, "affiliate_name": "MediaBridge Partners", "affiliate_status": "suspended", "account_manager": { "id": 7, "name": "Mark Johnson" } } }


Get Affiliate Offer

Retrieves the offer access configuration for a specific affiliate-offer pairing, including custom payout overrides.

When to use: Audit which payout a specific affiliate is receiving on an offer, or verify offer access before triggering campaign workflows.
GET /api/2/affiliate_offer.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
affiliate_idintegerYesAffiliate ID.
offer_idintegerYesOffer ID.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/affiliate_offer.json?api_key=YOUR_API_KEY&affiliate_id=67890&offer_id=12345

Sample response

{ "request_status": "Success", "response": { "affiliate_offer": { "affiliate_id": 67890, "offer_id": 12345, "payout": 20.00, "payout_type": "CPA", "affiliate_offer_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.