Ad InsertionGet Ad Consumption

Get Ad Consumption

Custom Plan Returns ad insertion consumption data (ad insertions, impressions, egress breakdown) grouped by the requested time resolution. Requires the ad service to already be provisioned.

curl -X POST "https://api.5centscdn.com/v2/zones/vod/pull/42/adinsertion/consumption" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "groupBy": "day",
  "r": "2026-01-01 00:00:00 - 2026-01-31 23:59:59"
}'
{
  "statusCode": 200,
  "result": "success",
  "from": "2026-01-01 00:00:00",
  "to": "2026-01-31 23:59:59",
  "serviceIds": [
    10001
  ],
  "groupBy": "day",
  "totalAdInsertions": 1284,
  "totalAdImpressions": 3720,
  "totalEgress": "0 B",
  "egressDetails": {
    "manifests": "0 B",
    "segments": "0 B",
    "ssat": "0 B",
    "transcoding": "0 B",
    "other": "0 B"
  },
  "adInsertionsChart": [
    {
      "key": "2026-01-15",
      "value": 42
    }
  ],
  "adImpressionsChart": [
    {
      "key": "2026-01-15",
      "value": 42
    }
  ],
  "egressChart": [
    {
      "key": "2026-01-15",
      "value": 42
    }
  ],
  "trackingBreakdown": {
    "impressions": 0,
    "starts": 0,
    "firstQuartiles": 0,
    "midpoints": 0,
    "thirdQuartiles": 0,
    "completes": 0,
    "completionRate": 0
  }
}
POST
/zones/vod/pull/{zoneid}/adinsertion/consumption
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
groupBystring
Required

Time resolution for aggregating consumption data.

Options: day, hour
rstring
Required

Date-time range: YYYY-MM-DD HH:MM:SS - YYYY-MM-DD HH:MM:SS

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

zoneidinteger
Required

Zone ID

Example:
42

Body

application/json
groupBystring
Required

Time resolution for aggregating consumption data.

Allowed values:dayhour
rstring
Required

Date-time range: YYYY-MM-DD HH:MM:SS - YYYY-MM-DD HH:MM:SS

Example:
2026-01-01 00:00:00 - 2026-01-31 23:59:59

Responses

statusCodeinteger
resultstring
Allowed values:successerror
fromstring
tostring
serviceIdsinteger[]
groupBystring
Allowed values:dayhour
totalAdInsertionsinteger
totalAdImpressionsinteger
totalEgressstring
egressDetailsobject
adInsertionsChartarray
adImpressionsChartarray
egressChartarray
trackingBreakdownobject