ad/plan

Update, or get information about, an Ad Targeter Plan.

Endpoint URL: https://api.sailthru.com/ad/plan

GET Mode Retrieve information about Ad Targeter plans.

 

Optional Parameters

If no name specified, the call will return all plan names as an array

ParameterDescriptionExample
namePlan NameNew York Weekdays

Return Value

Will return a data structure including some or all of the following information:

FieldDescriptionExample
nameName of planNew York Weekdays
listList associated with planNew York - Main
scheduleDays of week the plan runs['Mon','Tue','Wed','Thu','Fri']

POST Mode

Create or update an Ad Targeter plan

Required Parameters

ParameterDescriptionExample
namePlan NameNew York Weekdays

Optional Parameters

ParameterDescriptionExample
listList associated with planNew York - Main
scheduleArray of the days of week the plan runs['Mon','Tue','Wed','Thu','Fri']
schedule_daysObject of specific days to include/exclude from the schedule{"20120214":1,"20120215":-1}
zonesArray of the zones within the planSee 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:

FieldDescriptionExample
nameName of the zoneheader
widthWidth of the zone728
heightHeight in pixels of the zone90

DELETE Mode

Delete a plan

 

Required Parameters

ParameterDescriptionExample
namePlan name to deleteNew York Weekdays