Documentation

Getting Started

  1. Create an account — sign up for a free AutoScheduleAds account, or log in if you already have one.

  2. Create a location — go to Locations and click Add Location. A location represents a site, page, or placement slot where ads will appear.

  3. Add ads — open View Ads on a location and click Add Ad. Give each ad a title, an image URL, a destination link, and a start and end date.

  4. Manage the rotation — from the ad list you can archive, expire, or edit any ad. Each state has its own list, and every action can be undone.

  5. Serve via the API — call POST /api/ads/<location_id> from your website or app to fetch the currently-active ad for that location.

How scheduling works

Each ad has a start date and an end date. The API serves the single ad in a location whose date window contains today and that is not archived, expired, or marked used. If no ad is in window, the API returns an empty response.

API: get the active ad

Returns the active ad for a location. Authenticate with your account email and password in the request body.

curl -H "Content-Type: application/json" \
     -d '{"username":"[email protected]","password":"..."}' \
     -X POST https://autoscheduleads.com/api/ads/<location_id>

Response:

{
  "ad_id": "f41703dd-e841-48bf-9bea-96d37c0f2d93",
  "ad_title": "Summer Sale",
  "ad_image_source": "https://cdn.example.com/summer.png",
  "ad_link": "https://example.com/sale"
}

Render the banner by wrapping ad_image_source in a link to ad_link, using ad_title as the alt text.

API: mark an ad as used

Once an ad has been served (for example, a one-time placement), mark it used so it drops out of rotation.

curl -H "Content-Type: application/json" \
     -d '{"username":"[email protected]","password":"...","ad_id":"<ad_id>"}' \
     -X POST https://autoscheduleads.com/api/ads/move_to_used

Ad states