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.
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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| click_id | string | Yes | The unique click ID generated at click time. |
| offer_id | integer | Yes | The CAKE offer ID associated with the conversion. |
| payout | decimal | No | Override the affiliate payout amount for this conversion. |
| revenue | decimal | No | Override the advertiser revenue for this conversion. |
| conversion_date | datetime | No | Timestamp of the conversion event (ISO 8601). |
| unique_id | string | No | Your system's unique transaction reference for deduplication. |
| order_id | string | No | Order ID from the advertiser system. |
| adv1 | string | No | Custom sub ID field 1. |
| adv2 | string | No | Custom sub ID field 2. |
| adv3 | string | No | Custom sub ID field 3. |
| adv4 | string | No | Custom sub ID field 4. |
| adv5 | string | No | Custom 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-00112233Sample 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| start_date | date | Yes | Start of the date range (YYYY-MM-DD). |
| end_date | date | Yes | End of the date range (YYYY-MM-DD). |
| offer_id | integer | No | Filter to a specific offer. |
| affiliate_id | integer | No | Filter to a specific affiliate. |
| advertiser_id | integer | No | Filter to a specific advertiser. |
| conversion_status | string | No | Filter by status: approved, pending, or rejected. |
| start_at_row | integer | No | Row offset. Default: 1. |
| row_limit | integer | No | Max 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=25Sample 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
| conversion_id | integer | Yes | ID of the conversion to update. |
| status | string | Yes | New status: approved, rejected, or pending. |
| note | string | No | Optional 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.