Publisher API Integration Guide

330 views December 21, 2015 Administrator 2

API Integration Guide

Ad Request

http://a.bidsopt.com/request/ad?cid=6&ip=129.67.145.168&ua=Mozilla/5.0%20(iPhone;%20CPU%20iPhone%20OS%208_3%20like%20Mac%20OS%20X)%20AppleWebKit/600.1.4%20(KHTML,%20like%20Gecko)%20Mobile/12F70&udid_key=web&udid_value=1226&no_of_ads=1&ad_size=320x50

where,

http://a.bidsopt.com/request/ad -- Base URL (domain name a.bidsopt.com may be changing based on publisher data-center location needs; we're located in USA East Course)

cid — Client Identifier details. Bidsopt publisher management team would be giving related details. It will be an unique identifier.
ip — IPv4 Address of the user details to be sent. Using maxmind database for validation.
ua — User Agent of the user details to be sent in URL encoded format (Ref: http://www.w3schools.com/tags/ref_urlencode.asp). Using wurfl device database for valiation.
size — Ad size required to show (ex: 320×50, 300×250 etc. WidthxHeight in pixels format; Native ads – 0x0; Support all ad format sizes)
udid_key — Device identifier key details (ex: ida or ida_sha1 or ida_md5; Recommended Field)
udid_value — Device identifier value (Recommended Field)
Other fields — We’d support other user enrichment details like age, gender, and etc. Please work with Bidsopt publisher development team to get more details.

Ad Response

We support JSON format to give the responses.

{ no_of_ads: 1, response_status: "success", uuid_key: "web", uuid_val: "1226", ads: [ { ad_id: 5, pos: 1, cost_metrics: "CPM", price: 0.00166, creative_type: "banner", creative_id: 5, campaign_id: 6, adm: "<p><a href='http://clk.bidsopt.com/tracker/click?click_id=MzIkQk82JEJPMTI5LjY3LjE0NS4xNjgkQk9Nb3ppbGxhLzUuMCAoaVBob25lJEJPd2ViJEJPMTIyNg=='><img src='http://assets.bidsopt.com/creatives/10/34/34_300x250.png'/></a></p><img src='http://imp.bidsopt.com/tracker/impression?imp_id=bWFuYWdlZCRCTzEyOS42Ny4xNDUuMTY4JEtNNiRCTzMyJEJPNSRCTzIzJEJPMzQkQk8xNDQ0MjIxNzI5MDY4' width='1' height='1'/>" } ] }

where,

creative_type — will give creative type; It will be banner or native or js or iframe or html5 etc.
adm — will have the creative mark-up with click tracking url. Please use the same to render.
cost_metrics — Campaign cost metrics for reference.
price — Campaign price for reference.
ad_id, creative_id, campaign_id — Identifiers of Ad, Creative, and Campaign at Bidsopt

Native Ads Response

{ no_of_ads: 1, response_status: "success", uuid_key: "web", uuid_val: "1226", ads: [ { rating: "1", icon: "http://assets.bidsopt.com/creatives/10/38/38_0x0_icon.png", description: "Leading Demand Side Platform", main: "http://assets.bidsopt.com/creatives/10/38/38_0x0_main.png", creative_id: 38, creative: "NA", cta: "More", ad_id: 35, adm: "NA", imp_trackers: [ "http://imp.bidsopt.com/tracker/impression?imp_id=bWFuYWdlZCRCTzEyOS42Ny4xNDUuMTY4JEtNNiRCTzM1JEJPNSRCTzIzJEJPMzgkQk8xNDQ0MjIxNjkzOTU1" ], pos: 1, cost_metrics: "CPM", price: 0.001, creative_type: "native", action_item: "http://clk.bidsopt.com/tracker/click?click_id=MzUkQk82JEJPMTI5LjY3LjE0NS4xNjgkQk9Nb3ppbGxhLzUuMCAoaVBob25lJEJPd2ViJEJPMTIyNg==", headline: "Bidsopt DSP", campaign_id: 23 } ] }

where,

rating — App ratings to show
icon — icon image (will be 80×80 pixel size)
description — Details about the product or offer or mobile application
main — Main image (will be in 1200×627 pixel size)
cta — Click through Text to be shown
action_item — Click Link
headline — Title of the product or offer or mobile application
Use the impression trackers and action_item with 1×1 pixel to enable the impression and click tracking.

Example

<p><a href='http://clk.bidsopt.com/tracker/click?click_id=MzUkQk82JEJPMTI5LjY3LjE0NS4xNjgkQk9Nb3ppbGxhLzUuMCAoaVBob25lJEJPd2ViJEJPMTIyNg=='><img src='http://assets.bidsopt.com/creatives/10/38/38_0x0_main.png'/></a></p><img src='http://imp.bidsopt.com/tracker/impression?imp_id=bWFuYWdlZCRCTzEyOS42Ny4xNDUuMTY4JEtNNiRCTzM1JEJPNSRCTzIzJEJPMzgkQk8xNDQ0MjIxNjkzOTU1'width='1' height='1'/>

Tag response (example)

{ no_of_ads: 1, response_status: "success", uuid_key: "web", uuid_val: "1226", ads: [ { ad_id: 11, pos: 1, cost_metrics: "CPM", price: 0.0006, creative_type: "iframe", creative_id: 12, campaign_id: 9, creative: "<iframe src="http://srv1.partizanigames.com/tags/?tid=138&hash=u31uh4&width=320&height=50&media_id=$6&placement_id=6&pub_domain=6" width="320" height="50" border="0" scrolling="no" ></iframe><img src='http://imp.bidsopt.com/tracker/impression?imp_id=bWFuYWdlZCRCTzEyOS42Ny4xNDUuMTY4JEJPNiRCTzM0JEJPNSRCTzIzJEJPMzckQk8xNDQ0MjI3NTY2NjQ1' width='1' height='1'/>"" } ] }

where,

creative_type — Denoting the ad response as iframe tag

No Ads Response

{ no_of_ads: 0, response_status: "failure", uuid_key: "", uuid_val: "", ads: [ { ad_id: "NA", impression_id: "NA", pos: 1, cost_metrics: "NA", price: 0, creative_type: "NA", adm: "NA", error: "NO ADS TO DISPLAY", creative_id: "NA", campaign_id: "NA" } ] }

where,

response_status will be failure if no ads to display.
error will give the error message.

Any queries, please connect with Bidsopt Publisher Development Team. Thanks.