Automated Campaigns API Examples

Note

In this documentation page we will use MY_ADVERTISABLE_EID as an example of an Advertisable EID. To try the calls, use an Advertisable from your organization as ownership privileges are enforced.

Create a Strategy

Create a strategy with a set of campaigns under one goal and one budget.

curl --user apihelp@adroll.com:password \
    -H "Content-Type: application/json" \
    -d '{ "budget": 1000, "currency": "USD", "kpi_goal": 2.00, "kpi_metric": "CPC", "products": "web" }' \
    "https://services.adroll.com/activate/api/v1/strategy?apikey=MYAPIKEY&advertisable_eid=MY_ADVERTISABLE_EID"
{
  "data": [
    {
      "advertisable_eid": "MY_ADVERTISABLE_EID",
      "budget": 1000.0,
      "created_at": "2017-03-13T23:08:33.198960",
      "currency": "USD",
      "end_date": null,
      "start_date": "2017-03-13T23:08:33.184906",
      "status": "live",
      "strategy_eid": "0000000STRATEGYEID8VOL"
    }
  ],
  "message": "",
  "status": 200
}

Fetch a Strategy

Fetch strategy data

curl --user apihelp@adroll.com:password \
    https://services.adroll.com/activate/api/v1/strategy?apikey=MYAPIKEY&advertisable_eid=MY_ADVERTISABLE_EID&strategy_eid=0000000STRATEGYEID8VOL
{
  "data": [
    {
      "advertisable_eid": "MY_ADVERTISABLE_EID",
      "budget": 1000.0,
      "created_at": "2017-03-13T23:08:33.198960",
      "currency": "USD",
      "end_date": null,
      "start_date": "2017-03-13T23:08:33.184906",
      "status": "live",
      "strategy_eid": "0000000STRATEGYEID8VOL"
    }
  ],
  "mesage": "",
  "status": 200
}

Fetch Campaigns for a Strategy

Get all campaigns under a strategy

curl --user apihelp@adroll.com:password \
    https://services.adroll.com/activate/api/v1/campaign?apikey=MYAPIKEY&advertisable_eid=MY_ADVERTISABLE_EID&strategy_eid=0000000STRATEGYEID8VOL
{
  "data": [
    {
      "budget": 1000,
      "campaign_eid": "RDEMJY2RF5CGZLRIGYIZ2U",
      "created_at": "2017-03-13T23:35:56.805483",
      "product": "retargeting",
      "strategy_eid": "RYULGPREKBA6LIVBWU8VOL",
      "updated_at": "2017-03-13T23:36:00.460571"
    }
  ],
  "message": "",
  "status": 200
}