This article will cover the following:
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.
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 Status —
approved,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.
GET /api/2/click.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| click_id | string | No | Unique CAKE click identifier. Returns single record; takes priority over date filters. |
| start_date | date | No | Start of date range (YYYY-MM-DD). |
| end_date | date | No | End of date range (YYYY-MM-DD). |
| offer_id | integer | No | Filter by offer ID. |
| affiliate_id | integer | No | Filter by affiliate ID. |
| start_at_row | integer | No | Pagination offset. Default 0. |
| row_limit | integer | No | Max 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=50Sample 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.
GET /api/2/conversion.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| click_id | string | Yes | The CAKE click ID (reqsessid) captured at click time. |
| offer_id | integer | Yes | The offer ID the conversion belongs to. |
| payout | decimal | No | Override affiliate payout for this conversion. |
| revenue | decimal | No | Override advertiser revenue for this conversion. |
| conversion_date | datetime | No | Date of conversion (YYYY-MM-DD HH:MM:SS). Defaults to now. |
| unique_id | string | No | Your internal transaction ID for deduplication. |
| order_id | string | No | Advertiser order reference. |
| adv1 | string | No | Custom advertiser data field 1. |
| adv2 | string | No | Custom advertiser data field 2. |
| adv3 | string | No | Custom advertiser data field 3. |
| adv4 | string | No | Custom advertiser data field 4. |
| adv5 | string | No | Custom 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-98765Sample 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.
GET /api/2/conversions.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| start_date | date | Yes | Start of date range (YYYY-MM-DD). |
| end_date | date | Yes | End of date range (YYYY-MM-DD). |
| offer_id | integer | No | Filter by offer. |
| affiliate_id | integer | No | Filter by affiliate. |
| advertiser_id | integer | No | Filter by advertiser. |
| conversion_status | string | No | approved | pending | rejected | reversed |
| start_at_row | integer | No | Pagination offset. |
| row_limit | integer | No | Max records. Default 100, max 500. |
| sort_field | string | No | Field to sort by. |
| sort_descending | boolean | No | true 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=50Sample 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.
POST /api/2/affiliate_postback.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| affiliate_id | integer | Yes | The affiliate to configure the postback for. |
| offer_id | integer | Yes | The offer the postback applies to. Use 0 for all offers. |
| postback_url | string | Yes | Full URL including CAKE macros (e.g. #reqsessid#, #price#, #status#). |
| postback_status | string | No | active | inactive. Default: active. |
| postback_type_id | integer | No | 1=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.
GET /api/2/tracking_domains.json| Parameter | Type | Required | Description |
|---|---|---|---|
| api_key | string | Yes | Your CAKE API key. |
| tracking_domain_id | integer | No | Filter to a specific domain by ID. |
| domain_status | string | No | active | inactive |
Sample request
GET https://yourdomain.cakemarketing.com/api/2/tracking_domains.json?api_key=YOUR_API_KEY&domain_status=activeSample response
{
"request_status": "Success",
"tracking_domains": [
{
"tracking_domain_id": 1,
"domain": "track.yournetwork.com",
"domain_status": "active",
"is_default": true
}
]
}You may also be interested in:
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.