Request API: AD endpoint
AD Endpoint
The AD endpoint is used for integrations that can't parse a JSON response and require the response toin bea specific markup instead. It is typically used for video and audio setups, where ads are requested by media players and follow the VAST protocol in specific markup.XML.
GETRequest requestmethod
The AD endpoint cansupports GET requests only. beAs used by using a Get request and - similar towith the GET version of the JSON endpointendpoint, - slot slot-level parameters are not supported. supported.
URL structure
TheA GETrequest versionURL ofis built from the adsections requestbelow, containsin theorder. sameSections informationmarked asrepeatable thecan POSTappear versionmore withthan one limitation:slot level parameters are not supported.once.
Example request
https://ads-[account].adhese.com/ad/sl_sdk_example_-leaderboard/ctsports;soccer?t=244.18664863333106| Section | Repeatable | Description | ||
|---|---|---|---|---|
https://ads-[account].adhese.com |
No | The domain |
||
/ad/ |
No | Fixed path segment that selects the AD endpoint. | ||
/sl[location code]-[format code]/ |
A placement sl, followed by the full slot code. |
|||
|
A target ct) and is followed by ;. Add one section per target group you want to pass. |
|||
|
No | A |
Example request
https://ads-demo.adhese.com/ad/sldemo.com_kitchen-billboard/dtdesktop
Broken down:
| Part | Meaning |
|---|---|
https://ads-demo.adhese.com |
Ads domain for the demo account |
/ad/ |
AD endpoint |
/sldemo.com_kitchen-billboard/ |
Placement: prefix sl, location code demo.com_kitchen, format code billboard |
/dtdesktop/ |
Target section: prefix dt with value desktop |
Response
A successful request returns the ads in the requested markup (VAST XML for video/audio setups).
If no ads are available, the response contains no ads. This is still a successful 200 response, not an error.
Response codes
| Code | Name | Description |
|---|---|---|
200 |
OK | |
454 |
No slots | The request x-adhese-bad-request header contains slots cannot be empty. |
500 |
Internal server error |
Error handling
When handling errors programmatically, read the x-adhese-bad-request response header for the specific error message.