How to Record and Update Conversions via the CAKE API

This article will cover the following:


Overview

The Tracking & Conversions API gives you programmatic control over the full conversion lifecycle — from recording a click-based conversion to querying history, updating statuses, and retrieving pixel or postback configurations. All endpoints require your api_key.

Note:
Conversions in CAKE are tied to a unique click ID generated at the time of click tracking. Every downstream action references that click. Understanding the click-to-conversion chain is essential before working with these endpoints.

Record a Conversion

Records a single conversion event against a tracked click. The click_id must correspond to an active, unexpired click in CAKE.

GET /api/2/conversion.json
ParameterTypeRequiredDescription
click_idstringYesThe unique click ID generated at click time.
offer_idintegerYesThe CAKE offer ID associated with the conversion.
payoutdecimalNoOverride the affiliate payout amount for this conversion.
revenuedecimalNoOverride the advertiser revenue for this conversion.
conversion_datedatetimeNoTimestamp of the conversion event (ISO 8601).
unique_idstringNoYour system's unique transaction reference for deduplication.
order_idstringNoOrder ID from the advertiser system.
adv1stringNoCustom sub ID field 1.
adv2stringNoCustom sub ID field 2.
adv3stringNoCustom sub ID field 3.
adv4stringNoCustom sub ID field 4.
adv5stringNoCustom sub ID field 5.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/conversion.json ?api_key=YOUR_API_KEY &click_id=abc123xyz789 &offer_id=12345 &payout=5.00 &revenue=12.00 &order_id=ORD-98765 &unique_id=TXN-00112233

Sample response

{ "request_status": "Success", "conversion_id": 4456789, "click_id": "abc123xyz789", "offer_id": 12345, "affiliate_id": 67890, "payout": 5.00, "revenue": 12.00, "conversion_date": "2024-01-01T14:32:00Z", "order_id": "ORD-98765", "unique_id": "TXN-00112233", "conversion_status": "approved" }

Query Conversion History

Returns a paginated list of conversions matching the specified filters. Useful for reconciliation, reporting exports, and monitoring conversion volume.

GET /api/2/conversions.json
ParameterTypeRequiredDescription
start_datedateYesStart of the date range (YYYY-MM-DD).
end_datedateYesEnd of the date range (YYYY-MM-DD).
offer_idintegerNoFilter to a specific offer.
affiliate_idintegerNoFilter to a specific affiliate.
advertiser_idintegerNoFilter to a specific advertiser.
conversion_statusstringNoFilter by status: approved, pending, or rejected.
start_at_rowintegerNoRow offset. Default: 1.
row_limitintegerNoMax rows. Default: 100; max: 500.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/conversions.json ?api_key=YOUR_API_KEY &start_date=2024-01-01 &end_date=2024-01-31 &offer_id=12345 &conversion_status=approved &start_at_row=1 &row_limit=25

Sample response

{ "request_status": "Success", "total_rows": 83, "conversions": [{ "conversion_id": 4456789, "click_id": "abc123xyz789", "offer_id": 12345, "affiliate_id": 67890, "payout": 5.00, "revenue": 12.00, "conversion_date": "2024-01-03T09:11:00Z", "conversion_status": "approved", "order_id": "ORD-98765" }] }

Update Conversion Status

Allows network admins to approve, reject, or reverse a conversion after it has been recorded.

POST /api/2/update_conversion.json
ParameterTypeRequiredDescription
conversion_idintegerYesID of the conversion to update.
statusstringYesNew status: approved, rejected, or pending.
notestringNoOptional internal note explaining the status change.

Sample request

POST https://yourdomain.cakemarketing.com/api/2/update_conversion.json { "api_key": "YOUR_API_KEY", "conversion_id": 4456789, "status": "rejected", "note": "Duplicate order ID detected" }

Sample response

{ "request_status": "Success", "conversion": { "conversion_id": 4456789, "conversion_status": "rejected" } }

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.