adUnit Image Download Endpoint

Use the adUnitImageDownload endpoint to obtain the ad unit image to the user, given the ad_id and dimensions of the image. If an image with the given dimensions is not found, a default image is returned.

Download Ad Unit Image

GET https://iql.zendrive.com/iql/<version>/ad_unit/<ad_id>/image -H 'Authorization: APIKEY sample_key'

Response:

Image will be sent as content-type:image/gif

Query Parameters

Name
Type
Description

dim_x

string

X dimension pixel size for ad image

dim_y

string

Y dimension pixel size for ad image

Headers

Name
Type
Description

APIKEY

string

Your unique Zendrive API key

Sample Request URL

https://iql.zendrive.com/iql/v1/ad_unit/ad_1/image?dim_x=200&dim_y=400

Design Recommendation

  • This endpoint should be called from publisher backend and not from the app itself. Exposing this endpoint through the app will result in security concerns related to API key.

  • The URL to get this image is supplied in the ad_unit api endpoint image_url label and should be used along with the API key to get the image by the publisher.

  • If the given dimensions do not match any of the valid image dimensions, a default image will be returned which will be useful to the publisher.

Sample Request and Response

curl request:
curl --location --request GET 'https://iql.zendrive.com/iql/v1/ad_unit/ad1/image?dim_x=1000&dim_y=1000' \
--header 'Authorization: APIKEY <API Key value>'

Response:
Image downloaded with status 200 OK