Segments Examples

Warning

The Reporting API will be retired at the end of February 2022. Please migrate to the GraphQL Reporting API by following the migration guide.

Segment deliveries for an advertisable

GET /uhura/v1/segment-deliveries/advertisable

Request:

curl -H 'Authorization: Token YOUR_TOKEN' \
"https://services.adroll.com/uhura/v1/segment-deliveries/advertisable?apikey=MYAPIKEY&breakdowns=entity,date,summary&advertisable_eid=MY_ADVERTISABLE_EID&currency=CAD&start_date=2015-11-01&end_date=2015-11-03"

Response:

{
  "results": {
    "summary": {
      "visitors": 1245,
      "revenue": 49.91,
      "all_visitors": 1477,
      "all_revenue": 58.78
    }
    "entity": [
      {
        "entity": "MY_ADVERTISABLE_EID",
        "visitors": 1245,
        "revenue": 49.91
        "all_visitors": 1477,
        "all_revenue": 58.78
      }
    ],
    "date": [
      {
        "date": "2015-11-01",
        "visitors": 710,
        "revenue": 22.19,
        "all_visitors": 804,
        "all_revenue": 25.81
      },
      {
        "date": "2015-11-02",
        "visitors": 535,
        "revenue": 27.72,
        "all_visitors": 673,
        "all_revenue": 32.97
      }
    ]
  }
}

Segment deliveries per segment

GET /uhura/v1/segment-deliveries/segment

Request:

curl -H 'Authorization: Token YOUR_TOKEN' \
"https://services.adroll.com/uhura/v1/segment-deliveries/segment?apikey=MYAPIKEY&breakdowns=entity,date&advertisable_eid=MY_ADVERTISABLE_EID&segment_eids=MY_SEGMENT_EID_1&start_date=2015-11-01&end_date=2015-11-03"

Response:

{
  "results": {
    "entity": [
      {
        "entity": "MY_SEGMENT_EID_1",
        "visitors": 1245,
        "revenue": 49.91,
        "all_visitors": 1477,
        "all_revenue": 58.78
      }
    ],
    "date": [
      {
        "date": "2015-11-01",
        "visitors": 710,
        "revenue": 21.29,
        "all_visitors": 804,
        "all_revenue": 25.81
      },
      {
        "date": "2015-11-02",
        "visitors": 535,
        "revenue": 27.72,
        "all_visitors": 673,
        "all_revenue": 32.97
      }
    ]
  }
}

Request:

curl -H 'Authorization: Token YOUR_TOKEN' \
"https://services.adroll.com/uhura/v1/segment-deliveries/segment?apikey=MYAPIKEY&breakdowns=entity,date&advertisable_eid=MY_ADVERTISABLE_EID&segment_eids=MY_SEGMENT_EID_1,MY_SEGMENT_EID_2&start_date=2015-11-01&end_date=2015-11-03"

Response:

{
  "results": {
    "entity": [
      {
        "entity": "MY_SEGMENT_EID_1",
        "visitors": 0,
        "revenue": 0.0,
        "all_visitors": 1,
        "all_revenue": 1.12
      },
      {
        "entity": "MY_SEGMENT_EID_2",
        "visitors": 0,
        "revenue": 0.0,
        "all_visitors": 1,
        "all_revenue": 1.12
      }
    ],
    "date": [
      {
        "date": "2015-11-01",
        "visitors": 0,
        "revenue": 0.0,
        "all_visitors": 1,
        "all_revenue": 1.12
      },
      {
        "date": "2015-11-02",
        "visitors": 0,
        "revenue": 0.0,
        "all_visitors": 1,
        "all_revenue": 1.12
      }
    ]
  }
}

Request:

curl -H 'Authorization: Token YOUR_TOKEN' \
"https://services.adroll.com/uhura/v1/segment-deliveries/segment?apikey=MYAPIKEY&breakdowns=entity,date&advertisable_eid=MY_ADVERTISABLE_EID&past_days=2"

Response:

{
  "results": {
    "entity": [],
    "date": [
      {
        "date": "2015-11-01",
        "visitors": 0,
        "revenue": 0.0,
        "all_visitors": 1,
        "all_revenue": 1.70
      },
      {
        "date": "2015-11-02",
        "visitors": 0,
        "revenue": 0.0,
        "all_visitors": 2,
        "all_revenue": 2.8
      }
    ]
  }
}

Segment deliveries CSV export

GET /uhura/v1/segment-deliveries/export

Request:

curl -H 'Authorization: Token YOUR_TOKEN' \
"https://services.adroll.com/uhura/v1/segment-deliveries/export?apikey=MYAPIKEY&advertisable_eid=MY_ADVERTISABLE_EID&segment_eids=MY_SEGMENT_EID_1,MY_SEGMENT_EID_2&start_date=2015-11-01&end_date=2015-11-03"

Response:

#date,advertisable_eid,segment_eid,visitors,revenue,all_visitors,all_revenue
2015-11-01,MY_ADVERTISABLE_EID,MY_SEGMENT_EID_1,23,88.00,24,99.00
2015-11-01,MY_ADVERTISABLE_EID,MY_SEGMENT_EID_2,93,54.23,98,55.19
2015-11-02,MY_ADVERTISABLE_EID,MY_SEGMENT_EID_1,34,29.12,37,36.42
2015-11-02,MY_ADVERTISABLE_EID,MY_SEGMENT_EID_2,11,8.31,13,9.01