Request
Request Parameters
User
Below are the parameters used in the request: The Ad Placement API can be called from either client side or server side:
Client side: you don't need to pass the user's IP. The API takes it from the connection.
Server side: pass the user's IP in the
ipparameter, so that ads are targeted to the user rather than to your server's location.For client-side requests, you can send
Content-Type: text/plainto avoid a browser pre-flight request.
id
The ID of the user
ip
The user IP address
ua
The User Agent: A string containing the user's browser/app and device/OS
language
Sets the language of the request using the standard two-character ISO code plus an optional 2-character region code. e.g. en-us for United States English
referer
The address of the site where the ad will be shown
el
The Base64-encoded email of the user
gdpr
Privacy advised extensions (Optional)
buyeruids
List of buyer uids* (Optional)
* json_encoded and then base64_encoded array
Example
user.gdpr
gdpr
This should be 0 if the caller believes that the user is not under GDPR, and 1 if the user is under GDPR .
consent
This is the consent string required by the IAB Standards.
Zones
id
The ID of the ad zone
sub
The Sub ID of the ad zone (optional)
sub2
Additional Sub ID (optional). See Using Additional Sub IDs.
sub3
Additional Sub ID (optional). See Using Additional Sub IDs.
keywords
You can insert keywords into the code in your ad zone to manually match it to the type of advertising you want (optional).
block_ad_types
Comma-separated list of ad types to block for this request (optional). See Block Ad Types.
custom_targeting
If Custom Targeting is available, will filter campaigns based on the key/value structure provided. {"custom_targeting": {"ex_car-brand": "mercedes", "ex_age-group": "25-34"}}
Banner Request Example: JSON
Last updated
Was this helpful?

