- Getting Started
- API Home
- API Postbacks
- API Response Errors
- API Technical Details
- Client API Libraries
- HTTP Response Codes
- Email & User Profiles
- blast
- blast_repeat
- list
- send
- template
- user
- Reporting
- job
- stats
- Horizon
- content
- purchase
- Advanced & Beta Features
- ad/plan
- alert
- preview
- settings
- trigger
ad/plan
BETA Warning: this feature is currently in beta and may be subject to change.
Overview
Update, or get information about, an adFlight Plan.
Base URL
https://api.sailthru.com/ad/planGET Mode
Get information about an AdFlight plan
Required Parameters
| Parameter | Description | Example |
|---|---|---|
name |
Plan Name |
New York Weekdays |
Return Value
Will return a data structure including some or all of the following information:
| Field | Description | Example |
|---|---|---|
name |
Name of plan |
New York Weekdays |
list |
List associated with plan |
New York - Main |
schedule |
Days of week the plan runs |
['Mon','Tue','Wed','Thu','Fri'] |
POST Mode
Create or update an AdFlight plan
Required Parameters
| Parameter | Description | Example |
|---|---|---|
name |
Plan Name |
New York Weekdays |
Optional Parameters
| Parameter | Description | Example |
|---|---|---|
list |
List associated with plan |
New York - Main |
schedule |
Array of the days of week the plan runs |
['Mon','Tue','Wed','Thu','Fri'] |
schedule_days |
Object of specific days to include/exclude from the schedule |
{"20120214":1,"20120215":-1} |
zones |
Array of the zones within the plan | See below |
schedule_days parameter
schedule_days should be an associated array of days, where the key is in YYYYMMDD format, and the value is either:
-
1, meaning "include this day"
-
-1, meaning "exclude this day"
-
0, meaning, "don't apply any special rules to this day"
This is useful for scheduling irregular schedules, one-off sends, or removing specific days (such as holidays) when you do not plan to send.
zones parameter
zones should be an array of zones, where each element contains the following:
| Field | Description | Example |
|---|---|---|
name |
Name of the zone |
header |
width |
Width of the zone |
728 |
height |
Height in pixels of the zone | 90 |
Example
$client->apiPost('ad/plan', array( 'name' => 'My New Zone', 'list' => 'All Users', 'days' => array('Mon', 'Tue', 'Wed'), 'zones' => array( array('name' => 'header', 'width' => 728, 'height' => 90), array('name' => 'sidebar', 'width' => 300, 'height' => 200), array('name' => 'footer', 'width' => 728, 'height' => 90), ) ));
DELETE Mode
Delete a plan
Required Parameters
| Parameter | Description | Example |
|---|---|---|
name |
Plan name to delete |
New York Weekdays |