Partner API Integration
Adgebra Ad-Serving API integration Guidelines
Last updated
Was this helpful?
Adgebra Ad-Serving API integration Guidelines
Last updated
Was this helpful?
These API integration guidelines will be able to request demand from adgebra in real time by sending required parameters in API calls. In response, adgebra will send ad details that can be used to serve ads on the Web, Push Notifications, and In-App environment.
Request Parameters:
pid
Partner ID
Yes
It is a unique identifier that adgebra requires. It will be shared by adgebra team at the time of initial setup.
mkeys
Meta Keywords
No
Meta keywords present on the page. Multiple keywords should be sent separating by commas in singleEncodedformat. It is recommended to send meta keywords so that adgebra can respond with most relevant ads.
dcid
Delivery Channel ID
Yes
This is an ad format ID that adgebra requires. For Native, it is 9.
nads*
Number of ads
Yes
Number of ads required to serve in the request. adgebra will accept maximum 8 ads in one request. For any value greater than 8, adgebra will send response with only 8 ads.
deviceId
Device ID
Yes
Desktop – 2 Mobile – 1
uid
Unique ID
Yes
Pass a unique ID of the user. In case of APP, pass GUID/Advertiser ID
ip
IP Address
Yes
LATEST IP address of the user at client end. It helps adgebra to identify from which geo location, the request has come, so that it can serve relevant ads to the user.
url
URL
Yes
Domain from which the request has come. In case of push notification, at least domain URL should be sent. In case of In-App, the app name should be sent.
pnToken
Token (PIN)
Yes
It is an authentication PIN – adgebra will send response only if it is successfully verified. Adgebra will share the password at the time of initial setup.
gaid
Unique ID
Yes
The Google Advertising ID is a user-specific and unique identifier for advertising created by Google Play.
inApp
In-App
No – Web, Notification Yes – In-App
If the request is sent from In-App environment then this flag should be 1. Otherwise it should be 0.
slotId
Slot ID
No
Slot ID of the Ad placement.
templateId
Template ID
No
Template ID
articleTitle
Article Title
No
Article title in single encoded format
articleDescp
Article Description
No
Article description
refUrl
Refer URL
No
Article landing page URL
chToken
Unique Pin
Yes
Unique pin - exactly same value as against pnToken
osType
Operating System
Yes
Operating System type eg : windows,linux,ios,andoid etc
osVersion
Operating System Version
Yes
Operating System Version based on the operating system type
deviceBrand
Device Brand Name
Yes
Device brand name eg : samsung, apple, vivo
deviceModel
Device Model Name
No
Device model name based on brand name eg ; Apple 16 Pro, Samsum s22 ultra
Request Example:
Response Format:
Response Parameters
imageUrl
Image URL
The original version of the main image of the ad with dimensions 400x300px. It can be resized and served in any dimension. It is recommended that aspect ratio should not be changed when resizing.
notificationMessage
Notification Message
The description part in the Native ad in single encoded format. It is Mandatory to use for in-App and Push Notification both.
trackerUrl
Tracker URL
On click of ad, user should be redirected to this URL. It is a mandatory parameter. For In-App ads, adgebra will send this URL in single encoded format.
notificationTitle
Notification Title
It is a short text – generally used to mention brand name. It is an optional parameter.
Icon
Icon
It is a small image of 200x200px – generally used as brand logo. It is an optional parameter.
lifeOfAd
Validity of the Ad in minutes
Once the response is sent by adgebra, the ad must be served within this time in minutes.
notificationImage
Notification Image
The compressed version of the main image of the ad with dimensions 360x240px. It can be resized and served in any dimension. It is recommended that aspect ratio should not be changed when resizing.
advId
Advertiser ID
Advertiser ID of which the ad is. This is used for reports & troubleshooting.
campaignId
Campaign ID
Campaign ID of which the ad is. This is used for reports & troubleshooting.
pricingModel
Pricing Model
Pricing Model of the bid price at which adgebra is going to pay. 1 – CPM 2 – CPC
price
Price
Bid Price at which adgebra is going to Pay.
brandingLine
adgebra Branding text
Use it only when branding image URL is not available or cannot be used. (This is an alternative parameter to branding image URL)
brandingImageUrl
adgebra branding image URL
Client Impression Tracker
Third Party Impression Tracker
Additional Impression tracker to be triggered when ad is served if available
impressionTrackerUrl
adgebra impression tracker
To be triggered to notify adgebra about impression being served
osType
Operating System
Operating System type eg : windows,linux,ios,andoid etc
osVersion
Operating System Version
Operating System Version based on the operating system type
deviceBrand
Device Brand Name
Device brand name eg : samsung, apple, vivo
deviceModel
Device Model Name
Device model name based on brand name eg ; Apple 16 Pro, Samsum s22 ultra
Response Example:
At any point in time, if the response is blank or invalid, then it should be handled at the client's end. At times when planned/unplanned adgebra maintenance activity may be scheduled.
If no. of available ads is less than requested, then it will send a response for available campaigns, and the remaining elements will be indicated with a message - {"msgCode": "Campaign Not Found"}