Do Global Online Api Integration Document
Catalogue
1.Integration Process
- Contact Our BD to create an account for you.
- The system will assign the sid, token, app_id4, adslot_id.
- Please follow the document for integration.
- Join debugging.
2.Attention
When you request ads in real time, fill in as many optional parameters as possible which can help us search the most match ads for you and increase your revenue. However, if you can`t get the value of optional parameters, please do not fill it in, which will indirectly reduce the revenue.
The ads request allows the server to initiate the request, but it must bring the real IP of client. The impression, click and conversion data must be reported by client, or it will be judged as fake users, which will indirectly reduce the revenue.
3.API
3.1 Ads Request
3.1.1 Request URL
PS: The system will assign the sid and token.
3.1.2 Request Method
POST
Header: Content-Type Value: application/json
3.1.3 Request Paramters
Parent Object | Object / Parameter | Type | Required | Description |
---|
| id | string | Yes | Publisher request id |
| app | object | Yes | Object APP. |
app | app_id | string | Yes | APP ID, system assigned.testing app_id: 95caecceb1066c2b52665a2c85a959e4 |
app | app_bundle_id | string | Yes | For Android device, this is the package name. For IOS device, this is the bundle id. |
app | app_name | string | Yes | APP Name |
app | store_url | string | Recommend | App store URL for an installed app |
app | app_category | string | No | String of IAB content categories that describe the current page or view of the app. Refer to list 5.1 APP Category Type |
app | app_interaction_type | array | No | The Interaction type supported by the app. Refer to list 5.2 APP Interaction Type |
| adslot | object | Yes | Object Ad slot. |
adslot | adslot_id | string | Yes | Ad slot id, system assigned. testing adslot_id. banner: 12001, native: 12002 |
adslot | banner | object | No | Object Banner/Interstitial. |
adslot.banner | width | int | Yes | Exact width in device independent pixels. |
adslot.banner | height | int | Yes | Exact height in device independent pixels. |
adslot.banner | position | int | No | BAd position on screen. Refer to list 5.3 Banner Type |
adslot | native | object | No | Object Native. |
adslot.native | assets | array | Yes | Array assets for all you needed to generate the ad. Including Object title, Object img and Object data. |
adslot.native.assets | id | int | Yes | The id of asset for sorting all assets. which is marked by yourself. |
adslot.native.assets | required | int | Yes | Marking whether the asset you requested is required or not.where “1” = yes, “0” = no |
adslot.native.assets | title | object | No | Object Title |
adslot.native.assets.title | len | int | No | The max lenght of title. |
adslot.native.assets | img | object | No | Object Img. |
adslot.native.assets.img | type | int | Yes | The type of image. where “1” = icon, “2” = logo, “3” = poster, “0” = known to be other. |
adslot.native.assets.img | width | int | Yes | The width of image. |
adslot.native.assets.img | height | int | Yes | The height of image. |
adslot.native.assets | data | object | No | Object data. The description of ad or button. |
adslot.native.assets.data | type | int | Yes | Data categories. Refer to list 5.4 Assets Data Type |
adslot.native.assets.data | len | int | No | The max lenght of data. |
| user | object | Yes | Object User |
user | user_id | string | Yes | The user id defined by the publisher which must uniquely identify a user. |
user | ip | string | Yes | IPv4 address closest to device. |
user | gender | int | Yes | Gender, where “1” = male, “2” = female, “0” = known to be other. |
user | yob | int | No | Year of birth as a 4-digit integer. |
| device | object | Yes | Object Device |
device | user_agent | string | Yes | User Agent |
device | device_id | array | Recommend | Array device id |
device.device_id | type | int | Yes | The of device id. where “1” = IMEI, “2” = MAC address, “0” = known to be other. |
device.device_id | id | string | Yes | Value of id. |
device | advertising_id | object | Yes | Object advertising id |
device.advertising_id | type | int | Yes | Type of advertising id.where “4” = Android GAID, “5” = IOS IDFA, “0” = known to be other. |
device.advertising_id | id | string | Yes | Value of id. |
device | geo | object | Recommend | Object Geo |
device.geo | latitude | string | Recommend | latitude |
device.geo | longitude | string | Recommend | longitude |
device.geo | country | string | Recommend | Country code using ISO-3166-1-alpha-3 |
device.geo | Region | string | Recommend | Region code using ISO-3166-2 2-letter state code if USA. |
device | device_type | int | Yes | Device type categories. Refer to list 5.5 Device Type |
device | language | string | Yes | Language. Refer to list 5.6 Language |
device | os | int | Yes | Device operating system. where “1” = IOS, “2” = Android, “0” = known to be other. |
device | os_version | string | Yes | Device operating system version. |
device | brand | string | No | The brand of device. |
device | model | string | No | The model of device. |
device | screen_width | int | Recommend | Physical width of the screen in pixels. |
device | screen_height | int | Recommend | Physical height of the screen in pixels. |
device | screen_density | int | No | Screen size as pixels per linear inch. |
device | carrier_id | string | Yes | Carrier id. Mobile carrier as the concatenated MCC-MNC code (e.g., “310-005” identifies Verizon Wireless CDMA in the USA). Refer to list MCC & MNC Code |
device | wireless_network_type | int | Yes | Network connection type. where “1” = WIFI, “2” = 2G, “3” = 3G, “4” = 4G, “5” = 5G, “0” = known to be other. |
| regs | object | Yes | Object Regs. |
regs | coppa | int | Yes | Flag indicating if this request is subject to the COPPA regulations established by the USA FTC, where 0 = no, 1 = yes. |
regs | gdpr | int | No | Flag indicating if this request is subject to the GDPR regulations established by the EU, where 0 = no, 1 = yes. |
| tmax | int | No | Maximum time in milliseconds allowed for response to be received including Internet latency to avoid timeout. |
| secure | int | No | Flag to indicate if the impression requires secure HTTPS URL creative assets and markup, where 0 = non-secure, 1 = secure. If omitted, the secure state is unknown, but non-secure HTTP support can be assumed. |
3.1.4 Request Sample
3.1.4.1 Banner / Interstitial request sample
{
"id": "fgasikutgasurebuifgsiuafgisua",
"app": {
"app_id": "95caecceb1066c2b52665a2c85a959e4",
"app_bundle_id": "4767426574632874",
"app_name": "Es File",
"store_url": "https://play.google.com/store/apps/details?id=com.estrongs.android.pop",
"app_category": "IAB20",
"app_interaction_type": [
1,
2
]
},
"adslot": {
"adslot_id": "12001",
"banner": {
"width": 320,
"height": 50,
"position": 1
}
},
"user": {
"user_id": "dsygfyad",
"ip": "106.38.48.52",
"gender": 1,
"yob": 1990
},
"device": {
"user_agent": "Mozilla/5.0*****",
"device_id": [
{
"type": 1,
"id": "2536643785678345673845"
},
{
"type": 2,
"id": "5C-FF-35-0B-95-B5"
}
],
"advertising_id": {
"type": 4,
"id": "ghdakgdhajgdajydg"
},
"geo": {
"latitude": 56.223,
"longitude": 112.848
},
"device_type": 1,
"os": 1,
"language": "zh",
"os_version": "9.0.1",
"brand": "xiaomi",
"model": "hongmi",
"screen_width": 640,
"screen_height": 1136,
"screen_density": 326,
"carrier_id": "460-000",
"wireless_network_type": 4
},
"regs": {
"coppa": 0,
"gdpr": 0
},
"tmax": 200,
"secure": 1
}
3.1.4.1 Native request sample
{
"id": "fgasikutgasurebuifgsiuafgisua",
"app": {
"app_id": "95caecceb1066c2b52665a2c85a959e4",
"app_bundle_id": "4767426574632874",
"app_name": "Es File",
"store_url": "https://play.google.com/store/apps/details?id=com.estrongs.android.pop",
"app_category": "IAB20",
"app_interaction_type": [
2
]
},
"adslot": {
"adslot_id": "12002",
"native": {
"plcmttype": 1,
"assets": [
{
"id": 1,
"required": 1,
"title": {
"len": 256
}
},
{
"id": 2,
"required": 1,
"img": {
"type": 1,
"width": 75,
"height": 75
}
},
{
"id": 3,
"required": 1,
"img": {
"type": 3,
"width": 320,
"height": 240
}
},
{
"id": 4,
"required": 1,
"data": {
"type": 2,
"len": 256
}
}
]
}
},
"user": {
"user_id": "dsygfyad",
"ip": "106.38.48.52",
"gender": 1,
"yob": 1990
},
"device": {
"user_agent": "Mozilla/5.0 (Linux; U; Android 2.3.6; it-it; GT-S5570I Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 (Mobile; afma-sdk-a-v6.1.0),gzip(gfe)",
"device_id": [
{
"type": 1,
"id": "2536643785678345673845"
},
{
"type": 2,
"id": "5C-FF-35-0B-95-B5"
}
],
"advertising_id": {
"type": 4,
"id": "dfc59c16-4435-48cb-98a9-9bdd06108077"
},
"geo": {
"latitude": 56.223,
"longitude": 112.848
},
"device_type": 1,
"os": 1,
"language": "CN",
"os_version": "9.0.1",
"brand": "xiaomi",
"model": "hongmi",
"screen_width": 640,
"screen_height": 1136,
"screen_density": 326,
"carrier_id": "460-000",
"wireless_network_type": 4
},
"regs": {
"coppa": 0,
"gdpr": 0
},
"tmax": 200,
"secure": 1
}
3.1.5 Response Parameters:
Parent Object | Object / Parameter | Type | Required | Description |
---|
| err_no | int | Yes | Error No. Refer to list 5.7 Err No and Msg |
| err_msg | string | Yes | Error Message |
data | id | string | Yes | Ad id |
data | ads | array | No | Array ads |
data.ads | banner_ad | object | No | Object Banner / Interstitial |
data.ads.banner_ad | html_snippet | string | Yes | Html snippet |
data.ads.banner_ad | width | int | Yes | Exact width in device independent pixels. |
data.ads.banner_ad | height | int | Yes | Exact height in device independent pixels. |
data.ads.banner_ad | imptrackers | array | Yes | Array impression tracker. |
data.ads | native_ad | object | No | Object Native. |
data.ads.native_ad | assets | array | Yes | Array assets |
data.ads.native_ad.assets | id | int | Yes | The id of asset for sorting all assets. which is marked by yourself. |
data.ads.native_ad.assets | required | int | Yes | Marking whether the asset you requested is required or not.where “1” = yes, “0” = no |
data.ads.native_ad.assets | title | object | No | Object Title |
data.ads.native_ad.assets.title | title | string | No | Title |
data.ads.native_ad.assets | img | object | No | Object Img. |
data.ads.native_ad.assets.img | width | int | Yes | The width of image. |
data.ads.native_ad.assets.img | height | int | Yes | The height of image. |
data.ads.native_ad.assets.img | url | string | Yes | The url of image. |
data.ads.native_ad.assets | data | object | No | Object data. |
data.ads.native_ad.assets.data | value | string | Yes | The value of data. |
data.ads.native_ad | target_url | string | Yes | Target url(click url or tracking url) |
data.ads.native_ad | imptrackers | array | Yes | Array impression tracker. |
data.ads.native_ad | clicktrackers | array | Yes | Array click tracker. |
data.ads | deeplink_info | object | No | Object Deeplink |
data.ads.deeplink_info | deeplink_url | string | Yes | Deeplink Url |
data.ads.deeplink_info | fallback_url | string | Yes | Deeplink Fallback Url. When deeplink failed, use the deeplink fallback url. |
3.1.5 Response Sample
3.1.5.1 Banner / Interstitial response sample
{
"data": {
"ads": [
{
"banner_ad": {
"html_snippet": "<!DOCTYPE html> <html> <head> <title></title> <meta name='viewport' content='user-scalable=0, minimum-scale=1.0, maximum- scale=1.0'/> <style type='text/css'> body {margin: 0; overflow: hidden;} </style> </head> <body> <style>.im_1664_ads-lbl,.im_1664_ads-lbl img{position:absolute;bottom:0;right:0;pointer-events:none;z-index:1000000000000000}.im_1664_ads-lbl img{width:26px;height:16px}</style> <div class='im_1664_ads-lbl'><img src='http://i.l.inmobicdn.net/ifctpads/IFC/CCN/assets/AdsiconHDPI1472034285.png'></div> <style> .inmC { margin-left: auto; margin-right: auto; display: block; }</style> <a href='https://play.google.com/store/apps/details?id=com.offline.miniocr' target='_top' style='text-decoration:none;'> <img border='0' class='inmC' src='http://dev-report.doadx.com/static/img/320_50.jpg' height='50' width='320' /> </a> <style>body{margin:0}</style> <img src='http://et-cn.w.inmobi.com/c.asm/C/t/ectjuimhah/1blu/w/4k/lx/m/r/0/0/ eyJVSUQiOiJGQzBGMzQ0NS0wRkNFLTQwRUUtODY0Ni0zQ0E4QkIyNjYzRUEiLCJJREEiOiJGQzBGMzQ0NS0wRkNFLTQwRUUtODY0Ni0zQ0E4QkIy NjYzRUEifQ~~/ca0d9776-0159-1000-ee66-38a46c1e0093/-1/411p/-1/0/0/40.71269989013672,74.00589752197266,0.0/13779426/NW/2t/0/api/3.0.0/dir/ Y29tLmlubW9iaS5kZW1vYXBw/ FvCTCRYAFta48rroVFcAAAAAAADwPzQAEhg4NUxNdTREejQ0MmxZS3lZSXpNWHVkMG4yZUZuVEUxZ0gzZ1haQzlzS3g2ZC9tM2Qwd0grc3hRPT0YB kJBTk5FUhwUABQCHBwW_7-36r-itPJrFtndsvyC1-PgIwAWxN7fpp2TiM- yARUAEgAAOQUiFAAWloqp6t9RKD1wZXJmLWFkcG9vbC1za3lob29rcHJvZDUwMDJfcGVyZl9oa2cxX3BlcmYtYWRwb29sX3NreWhvb2twcm9kFAQSJpr 5FhwVAgAsFQIAUwEm8JMJFQASGAUwLjA3NQA=/-1/AA==/7/844b2836?m=18' width='1' height='1' style='display:none;' /> </body></html><img src=\"https://apac-trk.doadx.com/imp?&info=w4CM90WYmAjLw0TbmIDO5gjLw0TbiZSM9knYmETPmBnJOh0Q9MmJxADMyETPwZCNllTN5EWN4MmMhVjN2ITNiJzY2YDMxIWZjNWZhNWN50TYmgjMmRmNwADMlNzMzEWY5MWMyEDOllTZ3IGM0MGZycjY9Enc_w4nc&price=${AUCTION_PRICE}\" width=\"1\" height=\"1\" style=\"display:none;\">",
"img_url": "",
"width": 320,
"imptrackers": [
"http://apac-trk.doadx.com/imp?&info==AjLw0TbmAjLw0TbiZCMwETP5JmJy0jZwZSPjZCMxkjM2ETPwZCNllTN5EWN4MmMhVjN2ITNiJzY2YDMxIWZjNWZhNWN50TYmcDZ4ATZ2YGNilTOidjZkFTYzQGZzUmM4ADO1M2NjVGZ9Enc_"
],
"height": 50
}
}
],
"id": "fgasikutgasurebuifgsiuafgisua"
},
"err_msg": "Success",
"err_no": 1000
}
3.1.5.1 Native response sample
{
"data": {
"ads": [
{
"native_ad": {
"assets": [
{
"id": 1,
"title": {
"title": "The Vicious Cycle Of Vaginal Infections"
},
"required": 1
},
{
"img": {
"width": 50,
"url": "https://images2.zemanta.com/p/srv/sha/00/af/6c/28902411fa70b73aca75b2da2730553a99.jpg?w=75&h=75&fit=crop&crop=faces&fm=jpg",
"height": 50
},
"id": 2,
"required": 1
},
{
"img": {
"width": 600,
"url": "https://images2.zemanta.com/p/srv/sha/00/af/6c/28902411fa70b73aca75b2da2730553a99.jpg?w=75&h=75&fit=crop&crop=faces&fm=jpg",
"height": 280
},
"id": 3,
"required": 1
},
{
"data": {
"value": "Restore and maintain a healthy balance of good bacteria and yeast for a healthy vagina"
},
"id": 4,
"required": 1
}
],
"clicktrackers": [
"https://do_global/track/url",
"https://apac-trk.doadx.com/clk?&info=w4CM90WYmAjLw0TbmIDO5gjLw0TbiZSM9knYmETPmBnJOh0Q9MmJyADMyETPwZCNllTN5EWN4MmMhVjN2ITNiJzY2YDMxIWZjNWZhNWN50TYmAjNkZWO1cjN1cDOmJWZjJ2MjFGNwQzMzYjM5ETNidDM9Enc_w4nc&price=${AUCTION_PRICE}"
],
"target_url": "https://r1.zemanta.com/r/u1qm61onnbb4/b1_rubicon/478563/7124557/C4NAONQHHBYL3S7WLF4ZSZFV2GCZFYDDINNXKVCYIRNEUYD76UZIU4TKSAJW5I6DUMYFEUW4AAP7HS7NCZP73SQOS4HY3VM5P76JCBIBX2GK7HGI2H5D3ZW2WT7XPKB2JM3G5VQUBQZSLQEITY7G2Y3D4XR7PO5YSC7WMQPTQVI3VIVYDYVSUMEIHQFGKDQZ55VIVS7AH73YDIBYA4O7PS4QPYK2YTNWBJJR4FCXMHCWD2X2DGSBYZGUFRWXOMA7C4UUZN2X2HWAXIT4PAZN7EYS5M7JQC2MGYPXC4NIB7XX476P7JOKRDVAXQRZGBHPCFB2JID3ZUBK77TXGWWS2J5L32MWS2R3FGYIXFNUOCGWEXKX765X5OAA4HL35XPQWEBWX2JLNM4O7T6UJ2YCDTBDH5FXATJUOO2OI7SGHQKTZOCT2PKYMEHAURNFNYTQ5FZNIE5FTAIGGIXCOWIWKWZBPU/",
"imptrackers": [
"https://apac-trk.doadx.com/imp?&info=w4CM90WYmAjLw0TbmIDO5gjLw0TbiZSM9knYmETPmBnJOh0Q9MmJyADMyETPwZCNllTN5EWN4MmMhVjN2ITNiJzY2YDMxIWZjNWZhNWN50TYmAjNkZWO1cjN1cDOmJWZjJ2MjFGNwQzMzYjM5ETNidDM9Enc_w4nc&price=${AUCTION_PRICE}"
]
}
}
],
"id": "fgasikutgasurebuifgsiuafgisua"
},
"err_msg": "Success",
"err_no": 1000
}
4. JS Tag
4.1 Attention
- Doadx JS Tag supports the following ad formats: Banners、Interstitial.
- You need to replace [adDivId] with the Div ID where the ad should be placed. Please use unique Div ID on one page.
- The system will assign the [sid] [token] [app_id] [adslot_id] . You need to replace them with your own values.
- You need to replace [app_bundle_id] with your actual package name or bundle id.
- You need to replace [width] with an exact width in device and replace [height] with an exact height in device.
4.2 JS Network Tag in Mopub
- Follow the instructions and use the below html tag to configure a third party network tag in Mopub.
- The below html tag include the required parameters, you can append any of the recommended or optional parameters to increase your revenue. Please make sure to review and read through 3.1.3 Request Paramters.
Mopub JavaScript Network HTML
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
</head>
<body>
<div id="[adDivId]"></div>
<script>
var data = {
"adDivId": "[adDivId]",
"sid": "[sid]",
"token": "[token]",
"app": {
"app_id": "[app_id]",
"app_bundle_id": "[app_bundle_id]"
},
"adslot": {
"adslot_id": "[adslot_id]",
"banner": {
"width": [width],
"height": [height]
}
},
"user": {
"ip": "%%IPADDRESS%%"
},
"device": {
"user_agent": "%%USERAGENT%%",
"device_id": [{
"id": "%eudid!"
}],
"advertising_id": {
"id": "%eudid!"
}
}
};
(function () {
var script = document.createElement('script');
script.onload = script.onreadystatechange = function () {
if (script.readyState && /loaded|complete/.test(script.readyState)) {
script.onload = script.onreadystatechange = undefined;
}
script = undefined;
DoadxJS.loadAd(data, function () {
console.log("SUCCESS");
}, function () {
loaded = true;
window.location = "mopub://failLoad";
});
};
script.onerror = function () {
script.onerror = undefined;
document.body.removeChild(script);
script = undefined;
};
script.type = 'text/javascript';
script.charset = 'UTF-8';
script.src = 'https://xyz.doadx.com/static/bundle.js?t=' + new Date().getTime();
document.body.appendChild(script);
})();
</script>
</body>
</html>
5.Appendix
5.1 APP Category Type
value | Description |
---|
IAB1 | Arts & Entertainment |
IAB2 | Automotive |
IAB3 | Business |
IAB4 | Careers |
IAB5 | Education |
IAB6 | Family & Parenting |
IAB7 | Health & Fitness |
IAB8 | Food & Drink |
IAB9 | Hobbies & Interests |
IAB10 | Home & Garden |
IAB11 | Law, Gov’t & Politics |
IAB12 | News |
IAB13 | Personal Finance |
IAB14 | Society |
IAB15 | Science |
IAB16 | Pets |
IAB17 | Sports |
IAB18 | Style & Fashion |
IAB19 | Technology & Computing |
IAB20 | Travel |
IAB21 | Real Estate |
IAB22 | Shopping |
IAB23 | Religion & Spirituality |
IAB24 | Uncategorized |
IAB25 | Non-Standard Content |
IAB26 | Illegal Content |
5.2 APP Interaction Type
value | Description |
---|
0 | Phone Call |
1 | Download |
2 | Deeplink |
5.3 Banner Type
value | Description |
---|
0 | Unknown |
1 | Above the Fold |
2 | DEPRECATED - May or may not be initially visible depending on screen size/resolution |
3 | Below the Fold |
4 | Header |
5 | Footer |
6 | Sidebar |
7 | Full Screen |
5.4 Assets Data Type
value | Description |
---|
2 | The description of ad. |
12 | The description of click button. |
Other | Click for more |
5.5 Device Type
value | Description |
---|
0 | unknown |
1 | Phone |
2 | Tablet |
3 | TV |
4 | Other |
5.6 Language
value | Description |
---|
CN | Chinese |
EN | English |
JA | Japanese |
KO | Korean |
DE | German |
FR | French |
PT | Portuguese |
IT | Italian |
5.7 Err No and Msg
value | Description |
---|
1000 | Sucess |
1001 | Token error |
1010 | Request JSON Body cannot be parsed correctly |
1011 | Adslot obj has an error or doesn't exist |
1012 | User obj has an error or doesn't exist |
1013 | App obj has an error or doesn't exist |
1014 | Device obj has an error or doesn't exist |
1015 | Reg obj has an error or doesn't exist |
2001 | hava no ad |