CAKE API — Tracking & Conversions

This article will cover the following:

Why use this API?
Use this API to record server-side conversions without a browser pixel, retrieve raw click logs for audit or reconciliation, manage postback configurations programmatically, and build custom attribution workflows.
Authentication: All CAKE API requests require your api_key parameter. Find yours under Setup → System Access → API Keys.

Overview

CAKE's tracking and conversion system is the engine connecting affiliate traffic to measurable outcomes. When an affiliate drives a click, CAKE stamps it with a click_id that follows the user journey through to any conversion. Conversions can be recorded server-side via the Record Conversion API, or client-side via tracking pixels. Once recorded, CAKE evaluates payout rules and fires affiliate postbacks in real time.



Key Concepts

  • Click ID — Unique identifier generated when an affiliate tracking link is clicked. Must be passed back at conversion time for attribution.
  • Postback URL — Server-to-server notification URL fired when a conversion is recorded, passing macros like {click_id} and {payout}.
  • Conversion Statusapproved, pending, rejected, ignored. Payout typically only on approved conversions.
  • Sub ID — Custom parameter in affiliate tracking links (&s1=, &s2=) for traffic segmentation. Not UTM parameters.
  • Tracking Domain — Branded domain used in affiliate links (e.g. track.yournetwork.com). Configured under Admin → Tracking Domains.
  • Postback Type — When a postback fires: on conversion, approval, or rejection. Set via postback_type_id.
  • Unique ID / Order ID — Advertiser-supplied identifiers to deduplicate events and tie CAKE conversions to internal transactions.


Available Actions

Get Click

Retrieves click records. Look up a specific click by click_id or pull filtered lists for reporting, troubleshooting attribution, or verifying a click was recorded before a conversion was fired.

When to use: Troubleshoot a missing conversion — confirm the click was recorded before investigating the conversion pipeline.
GET /api/2/click.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
click_idstringNoUnique CAKE click identifier. Returns single record; takes priority over date filters.
start_datedateNoStart of date range (YYYY-MM-DD).
end_datedateNoEnd of date range (YYYY-MM-DD).
offer_idintegerNoFilter by offer ID.
affiliate_idintegerNoFilter by affiliate ID.
start_at_rowintegerNoPagination offset. Default 0.
row_limitintegerNoMax records. Default 100, max 10000.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/click.json?api_key=YOUR_API_KEY&start_date=2026-01-01&end_date=2026-01-31&offer_id=12345&affiliate_id=67890&start_at_row=0&row_limit=50

Sample response

{ "request_status": "Success", "response": { "clicks": [ { "click_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "click_date": "2026-01-15 09:42:11", "offer_id": 12345, "affiliate_id": 67890, "sub_id_1": "banner_300x250", "ip_address": "203.0.113.42", "country": "US", "converted": true, "conversion_id": 998877 } ], "total_rows": 1 } }


Record Conversion

Records a conversion event against a previously tracked click. This is the server-side method, called by an advertiser's backend on their confirmation page. CAKE validates the click, applies payout rules, and triggers affiliate postbacks.

When to use: Fire a server-side conversion without a browser pixel — the most reliable method when an advertiser confirms a completed action server-side.
GET /api/2/conversion.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
click_idstringYesThe CAKE click ID (reqsessid) captured at click time.
offer_idintegerYesThe offer ID the conversion belongs to.
payoutdecimalNoOverride affiliate payout for this conversion.
revenuedecimalNoOverride advertiser revenue for this conversion.
conversion_datedatetimeNoDate of conversion (YYYY-MM-DD HH:MM:SS). Defaults to now.
unique_idstringNoYour internal transaction ID for deduplication.
order_idstringNoAdvertiser order reference.
adv1stringNoCustom advertiser data field 1.
adv2stringNoCustom advertiser data field 2.
adv3stringNoCustom advertiser data field 3.
adv4stringNoCustom advertiser data field 4.
adv5stringNoCustom advertiser data field 5.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/conversion.json?api_key=YOUR_API_KEY&click_id=a1b2c3d4-e5f6-7890-abcd-ef1234567890&offer_id=12345&payout=18.00&revenue=22.00&unique_id=ORD-98765

Sample response

{ "request_status": "Success", "conversion": { "conversion_id": 998877, "offer_id": 12345, "affiliate_id": 67890, "click_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "payout": 18.00, "revenue": 22.00, "unique_id": "ORD-98765", "conversion_date": "2026-06-19 14:30:00", "conversion_status": "approved" } }


Get Conversions

Pull conversion records for a date range, offer, or affiliate — use for reconciliation, external dashboards, or auditing payout accuracy before billing.

When to use: Reconcile CAKE conversions against advertiser reports; audit payout accuracy before generating invoices.
GET /api/2/conversions.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
start_datedateYesStart of date range (YYYY-MM-DD).
end_datedateYesEnd of date range (YYYY-MM-DD).
offer_idintegerNoFilter by offer.
affiliate_idintegerNoFilter by affiliate.
advertiser_idintegerNoFilter by advertiser.
conversion_statusstringNoapproved | pending | rejected | reversed
start_at_rowintegerNoPagination offset.
row_limitintegerNoMax records. Default 100, max 500.
sort_fieldstringNoField to sort by.
sort_descendingbooleanNotrue for descending.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/conversions.json?api_key=YOUR_API_KEY&start_date=2026-06-01&end_date=2026-06-19&offer_id=12345&conversion_status=approved&row_limit=50

Sample response

{ "request_status": "Success", "total_rows": 1, "conversions": [ { "conversion": { "conversion_id": 998877, "offer": { "offer_id": 12345, "offer_name": "Auto Insurance Quote" }, "affiliate": { "affiliate_id": 67890, "affiliate_name": "MediaBridge Partners" }, "payout": 18.00, "revenue": 22.00, "conversion_status": "approved", "conversion_date": "2026-06-19 14:30:00" } } ] }


Create Postback

Programmatically register a postback URL for an affiliate — useful when automating onboarding where each approved affiliate needs a postback configured without manual Admin UI entry.

When to use: Automate postback configuration as part of affiliate onboarding workflows.
POST /api/2/affiliate_postback.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
affiliate_idintegerYesThe affiliate to configure the postback for.
offer_idintegerYesThe offer the postback applies to. Use 0 for all offers.
postback_urlstringYesFull URL including CAKE macros (e.g. #reqsessid#, #price#, #status#).
postback_statusstringNoactive | inactive. Default: active.
postback_type_idintegerNo1=Server-to-Server, 2=iFrame, 3=Image, 4=JavaScript

Sample request

POST https://yourdomain.cakemarketing.com/api/2/affiliate_postback.json { "api_key": "YOUR_API_KEY", "affiliate_id": 67890, "offer_id": 12345, "postback_url": "https://tracking.partner.com/postback?click_id=#reqsessid#&payout=#price#&status=#status#", "postback_status": "active", "postback_type_id": 1 }

Sample response

{ "request_status": "Success", "postback": { "postback_id": 8801, "affiliate_id": 67890, "offer_id": 12345, "postback_url": "https://tracking.partner.com/postback?click_id=#reqsessid#&payout=#price#&status=#status#", "postback_type": "Server", "postback_status": "active" } }


Get Tracking Domains

Retrieves tracking domain configurations available in your CAKE network.

When to use: Enumerate available tracking domains for use when building affiliate tracking links or validating domain configurations.
GET /api/2/tracking_domains.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
tracking_domain_idintegerNoFilter to a specific domain by ID.
domain_statusstringNoactive | inactive

Sample request

GET https://yourdomain.cakemarketing.com/api/2/tracking_domains.json?api_key=YOUR_API_KEY&domain_status=active

Sample response

{ "request_status": "Success", "tracking_domains": [ { "tracking_domain_id": 1, "domain": "track.yournetwork.com", "domain_status": "active", "is_default": true } ] }


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.