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=250Required Parameters
| Parameter | Description | Example |
|---|---|---|
publisher_id | Your publisher ID | pub_abc123 |
format | Ad format | banner, video, native, audio, interstitial |
Optional Parameters
| Parameter | Description | Default |
|---|---|---|
w | Width in pixels | Format default |
h | Height in pixels | Format default |
ip | User IP (for server-side requests) | Detected from request |
ua | User agent (for server-side requests) | Detected from request |
geo | Country code (ISO 3166-1 alpha-2) | Detected from IP |
device_type | desktop, mobile, tablet, ctv | Detected from UA |
deal_id | Target a specific deal | None |
gdpr | GDPR applies (0 or 1) | 0 |
gdpr_consent | TCF consent string | None |
Response by Format
| Format | Content-Type | Response Body |
|---|---|---|
banner | text/html | HTML with embedded creative |
video | application/xml | VAST XML |
native | application/json | Native ad JSON |
audio | application/xml | VAST XML (audio creative) |
interstitial | text/html | Full-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
Banner
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.