adUnit Endpoint V2.0
Use the adUnit
endpoint to fetch the insurance advertisement unit to be shown to the user. This endpoint contains the following information:
Insurance policy offer details
Policy advertisement details, to be shown to the user.
Design Recommendation
Call the adUnit
endpoint from the publisher's backend and not from the application itself. Exposing this endpoint through the application will result in security concerns related to API key.
Fetch Ad Unit
GET
https://iql.zendrive.com/iql/v2/ad_unit/{driver_id} -H ‘Authorization: APIKEY <api_key>'
This is the endpoint to fetch the ad unit. It will contain offer details as well as the details of the ad which has to be shown to the given user.
Path Parameters
driver_id
String
Driver's unique identifier.
Headers
Authorization*
string
APIKEY <api_key>
Sample Request URL
https://iql.zendrive.com/iql/v2/ad_unit/user_123?image_dim_x=200&image_dim_y=100
Sample Response
{
"driver_info": {
"publisher_app_name": "acne_financial-prod",
"driver_id": "0-b"
},
"ad_unit": {
"offer_id": "ad_123bajdh354",
"insurer_name": "Progressive",
"logo_url": "https://iql.zendrive.com/iql/v2/ad_unit/ad1/logo?dim_x=1000&dim_y=1000",
"title": "Your discount is waiting!",
"body": {
"text": "You qualify for an exclusive discount from our partner XYZ. You will get:",
"bullets": [
"Covered in minutes",
"Quick and personalized rates",
"Lighting fast claims",
"Super friendly customer service"
]
}
"button_text": "Get your discount!",
"button_click_url": "https://iql.zendrive.com/iql/v2/ad_unit/ad_123bajdh354/driver_id/0-b/click?auth_token=MTYyMzc3NjI3OS4zMjgzNzcgMC1iIHdhaXRyX3hsdGxwZmZzYmQ=",
"legal": {
"disclaimers: {
"current_customer": "Offer not available for current Progressive customers. Subject to policy eligibility and availability.",
"generic": "Auto insurance prices and products are different when purchased directly or through independent agencies."
},
"privacy_policy_url": "https://www.privacy.com",
"terms_and_conditions_url"" "https://www.term_and_conditions.com"
}
}
}
Response Fields
Response Fields
Description
Data Type
Nullable
Max Characters
driver_info.publisher_app_name
Name of the application.
String
False
driver_info.driver_id
Unique identifier for the driver.
String
False
ad_unit.insurer_name
Insurer's name
String
False
ad_unit.legal.disclaimers.generic
Generic disclaimer text associated with an offer.
String
True
120
ad_unit.legal.disclaimers.current_customer
Customer-specific disclaimer text associated with an offer.
String
ad_unit.legal.privacy_policy_url
URL of insurer’s privacy policy page
String (URI)
True
ad_unit.legal.terms_and_conditions_url
URL of insurer’s Terms and Conditions page.
String (URI)
True
ad_unit.offer_id
Unique identifier for the ad unit for which the user is currently qualified.
String
False
ad_unit.title
Title of the ad.
String
False
30
ad_unit.body.text
Body text of the ad unit. Length up to 325 characters.
String
False
200
ad_unit.body.bullets
Description of the offer in bullet points.
String Array
False
ad_unit.button_text
Text for button in the ad unit
String
False
15
ad_unit.button_click_url
This is the ad click redirection URL, which will take the user to the Insurer's landing page.
String
False
ad_unit.logo_url
The URL of the insurer's logo.
String (URI)
False