This article will cover the following:
When to use these endpoints:
Use these endpoints to programmatically configure postback URLs during affiliate onboarding, update them when partners change tracking systems, or audit postback configurations across your network.
Use these endpoints to programmatically configure postback URLs during affiliate onboarding, update them when partners change tracking systems, or audit postback configurations across your network.
Authentication: All CAKE API requests require your
api_key parameter. Find yours under Setup → System Access → API Keys.Part of a series: This focused guide covers specific endpoints from the complete CAKE API — Tracking & Conversions reference, which documents all available endpoints for this feature area.
Available Endpoints
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| 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"
}
}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.