Ad Response

Prev Next

HTTP Response Codes

Code

Message

Description

200

OK

Success. Response may or may not contain an ad.

400

Bad Request

One of the required parameters is missing or has an invalid value (e.g., the placement ID does not exist).

404

Not Found

The endpoint being called is incorrect.

Other standard HTTP errors, such as 500 Internal Server Error, or 405 Method Not Allowed, may also be returned. Applications should handle HTTP response codes according to standard conventions, as described in w3.org protocol RFC9110.

200 - Ad Response

When returning an ad, the body of the response will contain a VAST Inline file.

The ad returned by the Broadcast Ad-Request Service is VAST compliant. (See the IAB's latest VAST Specification.)

The actual content of each VAST file returned depends on the creative manager used by the buyer, so your parser should ignore fields that it doesn’t recognize or cannot handle.

The ID of the partner that returned the ad, along with the creative ID returned by the partner, are provided in the following HTTP header: x-creative-id:

When creative approval is used, this ID can be used instead of parsing the VAST file.

When creative approval is not used, the caller should fetch the creative from one of the <MediaFile> elements.

In either case, the VAST file need to be stored as it will be needed when confirming the playback (see section below).

200 - No Ad Response

If the Broadcast Ad-Request Service has no available ad that matches the request's parameters, it will still return a 200 OK response code and a VAST file, but with no <Ad> element. Instead, an optional <Error> element can be included in the file, such as:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<VAST version=" 4.3">
     <Error>
           <![CDATA[http://adserver.com/?dur=[TD_DURATION]>
     </Error>
</VAST>

The <Error> element is optional and is used for forecasting digital inventory. Forecasting is not supported for broadcast at the moment, so this element can be ignored.