GuidesAd ServingUniversal /ad Endpoint

Universal /ad Endpoint

The /ad endpoint serves ads in any format from a single URL. It runs an auction at the nearest edge location and returns the winning creative.

Request

GET https://rtb.praevis.com/ad?publisher_id={id}&format=banner&w=300&h=250

Required Parameters

ParameterDescriptionExample
publisher_idYour publisher IDpub_abc123
formatAd formatbanner, video, native, audio, interstitial

Optional Parameters

ParameterDescriptionDefault
wWidth in pixelsFormat default
hHeight in pixelsFormat default
ipUser IP (for server-side requests)Detected from request
uaUser agent (for server-side requests)Detected from request
geoCountry code (ISO 3166-1 alpha-2)Detected from IP
device_typedesktop, mobile, tablet, ctvDetected from UA
deal_idTarget a specific dealNone
gdprGDPR applies (0 or 1)0
gdpr_consentTCF consent stringNone

Response by Format

FormatContent-TypeResponse Body
bannertext/htmlHTML with embedded creative
videoapplication/xmlVAST XML
nativeapplication/jsonNative ad JSON
audioapplication/xmlVAST XML (audio creative)
interstitialtext/htmlFull-screen HTML creative

No Bid

If no DSP bids on the request, the endpoint returns HTTP 204 No Content with an empty body. Your player or SDK should handle this gracefully (show nothing or fall back to a house ad).

Examples

curl "https://rtb.praevis.com/ad?publisher_id=pub_abc123&format=banner&w=300&h=250"

Video (VAST)

curl "https://rtb.praevis.com/ad?publisher_id=pub_abc123&format=video&w=640&h=480"

Native

curl "https://rtb.praevis.com/ad?publisher_id=pub_abc123&format=native"

Tracking

Impression tracking is built into the response. Banner and interstitial responses include a tracking pixel. VAST responses include nurl and burl impression URLs plus VAST event tracking. No additional setup needed.