CAKE API — Schedules & Automation

This article will cover the following:

Why use this API?
Use the Schedules & Automation API to configure dayparting schedules, automated offer status changes, and time-based cap resets — enabling hands-off campaign management that respects advertiser budget windows and traffic patterns.
Authentication: All CAKE API requests require your api_key parameter. Find yours under Setup → System Access → API Keys.

Overview

CAKE's scheduling system allows network administrators to automate time-based campaign management tasks that would otherwise require manual intervention. Schedules control when offers are active, when caps reset, and how traffic is distributed across different times of day — reducing operational overhead and ensuring campaigns run within advertiser-specified windows.

Dayparting schedules define the hours during which an offer accepts traffic. Outside configured hours, CAKE automatically pauses traffic routing and resumes it at the next scheduled window. This is particularly important for lead generation offers where advertiser call centers or processing systems operate on fixed business hours.

Schedules are configured in the CAKE UI under Offers → Manage Offers → [Offer] → Schedule. The API enables programmatic schedule management, making it straightforward to apply consistent dayparting rules across large offer catalogs or update schedules in bulk when advertiser operating hours change.


Key Concepts

  • Schedule — A time-based rule attached to an offer that controls when it accepts traffic. Schedules define active hours and days, and CAKE enforces them by pausing and resuming traffic routing automatically.
  • Dayparting — The practice of restricting affiliate traffic to specific hours of the day. Used when advertisers can only process leads during business hours or when traffic quality varies significantly by time of day.
  • Schedule Status — Controls whether a schedule is actively enforced. Active schedules are evaluated on every click; inactive schedules are ignored.
  • Time Zone — The reference time zone for evaluating schedule rules. Must be set explicitly to avoid ambiguity when managing offers across multiple regions.
  • Cap Reset — A scheduled event that clears an offer's conversion or click cap counter, allowing traffic to resume after a cap has been reached. Typically scheduled daily at midnight in the advertiser's time zone.
  • Active Window — The configured hours during which an offer's schedule permits traffic. Outside the active window, CAKE routes traffic to the fallback URL or blocks it.

Available Actions


Get Offer Schedule

When to use: Retrieve the dayparting schedule configured for an offer — use when auditing schedule coverage, syncing schedules to an external calendar system, or verifying configuration before launching a time-sensitive campaign.
GET/api/2/offer_schedule.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
offer_idintegerYesThe offer ID to retrieve the schedule for.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/offer_schedule.json?api_key=YOUR_API_KEY&offer_id=1042

Sample response

{ "request_status": "Success", "response": { "offer_id": 1042, "schedule_status": "active", "timezone": "America/New_York", "schedule": { "monday": { "start": "08:00", "end": "18:00", "active": true }, "tuesday": { "start": "08:00", "end": "18:00", "active": true }, "wednesday": { "start": "08:00", "end": "18:00", "active": true }, "thursday": { "start": "08:00", "end": "18:00", "active": true }, "friday": { "start": "08:00", "end": "17:00", "active": true }, "saturday": { "start": "00:00", "end": "00:00", "active": false }, "sunday": { "start": "00:00", "end": "00:00", "active": false } } } }

Update Offer Schedule

When to use: Set or modify dayparting rules on an offer — use when onboarding a new lead generation offer with advertiser-specified business hours, or when updating schedules in bulk after a seasonal change.
POST/api/2/update_offer_schedule.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.
offer_idintegerYesThe offer ID to update the schedule for.
schedule_statusstringNoactive | inactive. Default: active.
timezonestringYesIANA time zone identifier (e.g. America/New_York, America/Los_Angeles).
monday_startstringNoMonday active window start time in HH:MM format (24-hour).
monday_endstringNoMonday active window end time in HH:MM format (24-hour).
tuesday_startstringNoTuesday active window start.
tuesday_endstringNoTuesday active window end.
wednesday_startstringNoWednesday active window start.
wednesday_endstringNoWednesday active window end.
thursday_startstringNoThursday active window start.
thursday_endstringNoThursday active window end.
friday_startstringNoFriday active window start.
friday_endstringNoFriday active window end.
saturday_activebooleanNoSet false to disable Saturday traffic entirely.
sunday_activebooleanNoSet false to disable Sunday traffic entirely.

Sample request

POST https://yourdomain.cakemarketing.com/api/2/update_offer_schedule.json { "api_key": "YOUR_API_KEY", "offer_id": 1042, "schedule_status": "active", "timezone": "America/New_York", "monday_start": "08:00", "monday_end": "18:00", "tuesday_start": "08:00", "tuesday_end": "18:00", "wednesday_start": "08:00", "wednesday_end": "18:00", "thursday_start": "08:00", "thursday_end": "18:00", "friday_start": "08:00", "friday_end": "17:00", "saturday_active": false, "sunday_active": false }

Sample response

{ "request_status": "Success", "response": { "offer_id": 1042, "schedule_status": "active", "timezone": "America/New_York", "schedule_updated": true } }

Get Network Time

When to use: Retrieve the current server time in your CAKE network's configured time zone — use when debugging schedule evaluation, verifying dayparting logic, or confirming time zone alignment between CAKE and external systems.
GET/api/2/network_time.json
ParameterTypeRequiredDescription
api_keystringYesYour CAKE API key.

Sample request

GET https://yourdomain.cakemarketing.com/api/2/network_time.json?api_key=YOUR_API_KEY

Sample response

{ "request_status": "Success", "response": { "network_time": "2026-06-19 10:45:32", "network_timezone": "America/New_York", "utc_time": "2026-06-19 14:45:32" } }


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.