Ad endpoints
These endpoints allow you to track media ads that play before or during content playback. They consist of two types of advertising events:
- Ad break: A sequence of ads. A single ad break consists of one or more ads.
- Ad: An individual ad. Multiple ads can play during a single ad break.
Usage of these endpoints require an active session. Make sure that you call the sessionStart endpoint first to obtain a valid session ID.
adBreakStart
The adBreakStart endpoint indicates the start of a sequence of ads. Adobe recommends setting both ad break and ad events, even when a single advertisement is shown. If an ad break triggers but an ad does not, this scenario can point to possible issues loading advertisements. See Media Edge API implementation examples for more examples calling this endpoint.
POST https://edge.adobedc.net/ee/va/v1/adBreakStart?configId={datastreamID}
data-slots=heading, code
data-repeat=1
data-languages=CURL
Request
curl -X POST "https://edge.adobedc.net/ee/va/v1/adBreakStart?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"xdm": {
"eventType": "media.adBreakStart",
"mediaCollection": {
"sessionID": "ffab5[...]45ec3",
"playhead": 0,
"advertisingPodDetails": {
"index": 0,
"offset": 0
}
},
"timestamp": "YYYY-08-20T22:41:40+00:00"
}
}
]
}'
If successfully processed, the API returns 204 No Content.
This endpoint requires the following payload properties within the xdm object:
eventTypemedia.adBreakStart for this endpoint.mediaCollectiontimestampThe mediaCollection object requires several properties. See Media Collection Details data type in the Experience Data Model guide for more information.
sessionIDsessionStart endpoint.playheadadvertisingPodDetailsindex and offset properties are required.adBreakComplete
The adBreakComplete endpoint indicates the completion of a sequence of ads. Call this endpoint when a visitor finishes all ads in a pod. See Media Edge API implementation examples for more examples calling this endpoint.
POST https://edge.adobedc.net/ee/va/v1/adBreakComplete?configId={datastreamID}
data-slots=heading, code
data-repeat=1
data-languages=CURL
Request
curl -X POST "https://edge.adobedc.net/ee/va/v1/adBreakComplete?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"xdm": {
"eventType": "media.adBreakComplete",
"mediaCollection": {
"sessionID": "ffab5[...]45ec3",
"playhead": 0
},
"timestamp": "YYYY-08-20T22:41:40+00:00"
}
}
]
}'
If successfully processed, the API returns 204 No Content.
This endpoint requires the following payload properties within the xdm object:
eventTypemedia.adBreakComplete for this endpoint.mediaCollectionsessionID and playhead properties are required.timestampThe advertisingPodDetails object is not allowed when using this endpoint.
adStart
The adStart endpoint indicates the start of an individual advertisement. Call this endpoint once an ad successfully loads and starts playing. See Media Edge API implementation examples for more examples calling this endpoint.
POST https://edge.adobedc.net/ee/va/v1/adStart?configId={datastreamID}
data-slots=heading, code
data-repeat=1
data-languages=CURL
Request
curl -X POST "https://edge.adobedc.net/ee/va/v1/adBreakComplete?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"xdm": {
"eventType": "media.adStart",
"mediaCollection": {
"sessionID": "ffab5[...]45ec3",
"playhead": 0,
"advertisingDetails": {
"name": "Example ad",
"length": 1,
"playerName": "Ad player",
"podPosition": 0
}
},
"timestamp": "YYYY-08-20T22:41:40+00:00"
}
}
]
}'
If successfully processed, the API returns 204 No Content.
This endpoint requires the following payload properties within the xdm object:
eventTypemedia.adStart for this endpoint.mediaCollectiontimestampThe mediaCollection object requires several properties. See Media Collection Details data type in the Experience Data Model guide for more information.
sessionIDsessionStart endpoint.playheadadvertisingDetailsname, length, playerName, and podPosition properties are required.adComplete
The adComplete endpoint indicates the completion of an individual advertisement. Call this endpoint when an ad finishes. See Media Edge API implementation examples for more examples calling this endpoint.
POST https://edge.adobedc.net/ee/va/v1/adComplete?configId={datastreamID}
data-slots=heading, code
data-repeat=1
data-languages=CURL
Request
curl -X POST "https://edge.adobedc.net/ee/va/v1/adComplete?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"xdm": {
"eventType": "media.adComplete",
"mediaCollection": {
"sessionID": "ffab5[...]45ec3",
"playhead": 0
},
"timestamp": "YYYY-08-20T22:41:40+00:00"
}
}
]
}'
If successfully processed, the API returns 204 No Content.
This endpoint requires the following payload properties within the xdm object:
eventTypemedia.adComplete for this endpoint.mediaCollectionsessionID and playhead properties are required.timestampThe advertisingDetails object is not allowed when using this endpoint.
adSkip
The adSkip endpoint indicates that the user skipped an advertisement. Call this endpoint when a visitor selects the 'Skip ad' button on the media player.
POST https://edge.adobedc.net/ee/va/v1/adSkip?configId={datastreamID}
data-slots=heading, code
data-repeat=1
data-languages=CURL
Request
curl -X POST "https://edge.adobedc.net/ee/va/v1/adSkip?configId={datastreamID}" \
--header 'Content-Type: application/json' \
--data '{
"events": [
{
"xdm": {
"eventType": "media.adSkip",
"mediaCollection": {
"sessionID": "ffab5[...]45ec3",
"playhead": 0
},
"timestamp": "YYYY-08-20T22:41:40+00:00"
}
}
]
}'
If successfully processed, the API returns 204 No Content.
This endpoint requires the following payload properties within the xdm object:
eventTypemedia.adSkip for this endpoint.mediaCollectionsessionID and playhead properties are required.timestamp