XML Feed Implementation

 

 

Push traffic (Classic)

Request URL

Basically, the template URL for the request is as following:

http://n1.smartyads.com/pushRequest?rtb_seat_id=companyname&secret_key=bfsRtBOSfkX1ST92vAgt&subid={subid}&ua={ua}&ip={ip}&url={url}&domain={network}&empty=204&image_size={image_size}&image_required={image_required}&icon_size={icon_size}&icon_required={icon_required}&country={country}&user_id={user_id}&lang={lang}&subscription_timestamp={timestamp}&format=json&count={count}&ref={ref_url}&empty=204

Warning: Push traffic requires icon or image macros.

 

Request parameters

 

seat

Required

Your unique identifier

token

Required

Authorization token

subid

Recommended

Addition that is useful for building statistics.

Up to 128 alphanumeric and special characters is allowed (It must contain only these characters [ . ], [ _ ], [ - ], [ 0-9 ], [ a-z ], [ A-Z ]). 

The feed is allowed to have up to 2,000 distinct subids per day. You will be able to view statistics for each subid.

ua

Required

User Agent (ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F80.0.3987.163+Safari%2F537.36)

ip

Required

IP (IP address, MUST support IPV4, IPV6,&ip=90.164.191.192 ) 

url

Required

URL of the page where ads from this feed will be displayed

network

Optional

Encoded referrer domain (To avoid any issues with traffic origin this parameter should send NETWORK domain, e.g. &domain=http%3A%2F%2Fsmarthub.com ALWAYS)

image_size

Optional

Main image size in format ###x###. Default value: 150x150.

image_required

Optional

If set to 1, it allows only ads with main image to be returned. Default value: 0.

icon_size

Optional

Icon image size in format ###x###, e.g 320x200

icon_required

Optional

If set to 1, it allows only ads with icon image to be returned. Default value: 0.

country

Recommended

The country of the request (three symbol country abbreviation, e.g. KOR)

user_id

Optional

Unique user id 

lang

Optional

Two symbol language abbreviation, e.g. en

timestamp

Recommended

UNIX timestamp, e.g. 1586763000 which is equivalent to:

04/13/2020 @ 7:30am (UTC)

subscription_timestamp

Optional

Timestamp of user’s subscription

format

Optional

When adding this macro, we explicitly substitute 

&format = json

count

Optional

An integer number denoting the number of ads requested. If the macro is not replaced, then consider 1 by default.

 

 

In-page push traffic

Basically, the template URL for the request is as following:

http://n1.smartyads.com/pushRequest?rtb_seat_id=companyname&secret_key=bfsRtBOSfkX1ST92vAgt&subid={subid}&ua={ua}&ip={ip}&url={url}&domain={network}&empty=204&image_size={image_size}&image_required={image_required}&icon_size={icon_size}&icon_required={icon_required}&country={country}&user_id={user_id}&lang={lang}&subscription_timestamp={timestamp}&format=json&count={count}&ref={ref_url}&empty=204

 

Warning: In-page push traffic requires ref_url macro.

Request parameters

 

seat

Required

Your unique identifier

token

Required

Authorization token

subid

Recommended

Addition that is useful for building statistics.

Up to 128 alphanumeric and special characters is allowed (It must contain only these characters [ . ], [ _ ], [ - ], [ 0-9 ], [ a-z ], [ A-Z ]). 

The feed is allowed to have up to 2,000 distinct subids per day. You will be able to view statistics for each subid.

ua

Required

User Agent (ua=Mozilla%2F5.0+%28Windows+NT+10.0%3B+Win64%3B+x64%29+AppleWebKit%2F537.36+%28KHTML%2C+like+Gecko%29+Chrome%2F80.0.3987.163+Safari%2F537.36)

ip

Required

IP (IP address, MUST support IPV4, IPV6,&ip=90.164.191.192 ) 

url

Required

URL of the page where ads from this feed will be displayed

network

Optional

Encoded referrer domain (To avoid any issues with traffic origin this parameter should send NETWORK domain, e.g. &domain=http%3A%2F%2Fsmarthub.com ALWAYS)

image_size

Optional

Main image size in format ###x###. Default value: 150x150.

image_required

Optional

If set to 1, it allows only ads with main image to be returned. Default value: 0.

icon_size

Optional

Icon image size in format ###x###, e.g 320x200

icon_required

Optional

If set to 1, it allows only ads with icon image to be returned. Default value: 0.

country

Recommended

The country of the request (three symbol country abbreviation, e.g. KOR)

user_id

Optional

Unique user id 

lang

Optional

Two symbol language abbreviation, e.g. en

timestamp

Recommended

UNIX timestamp, e.g. 1586763000 which is equivalent to:

04/13/2020 @ 7:30am (UTC)

subscription_timestamp

Optional

Timestamp of user’s subscription

format

Optional

When adding this macro, we explicitly substitute 

&format = json

count

Optional

An integer number denoting the number of ads requested. If the macro is not replaced, then consider 1 by default.

ref_url

Required

For in-page push traffic

 

 

Response format

We expect response in XML format, however JSON format is acceptable.

 

xml

<results>

<ad>

<title>${ad.title}</title>

<desc>${ad.desc}</desc>

<link-url>${ad.linkUrl}</link-url>

<bid-price>${ad.bidPrice}</bid-price>

<click-url>${ad.clickUrl}</click-url>

//one of

<image-url>${ad.imageUrl}</image-url>

<icon-url>${ad.iconUrl}</icon-url>

</ad>

</results>

 

json

{

results: [

{

title: ad.title,

desc: ad.desc,

  linkUrl: ad.linkUrl,

bidPrice: ad.bidPrice,

clickUrl: ad.clickUrl,

//one of

imageUrl: ad.imageUrl,

iconUrl: ad.iconUrl

        },

]

}

 

Request and response example

Request:

 

http://n1.smartyads.com/pushRequest?rtb_seat_id=companyname&secret_key=bfsRtBOSfkX1ST92vAgt&subid=adfc2135815bb&ua=Mozilla%2F5.0%20(Windows%20NT%2010.0;%20Win64;%20x64)%20AppleWebKit%2F537.36%20(KHTML,%20like%20Gecko)&ip=122.44.208.102&url=domainx123.net/url1/adress&domain=domainx123.net&empty=204&image_size=360x200&image_required=1

 

Response:

 

<?xml version="1.0" encoding="UTF-8"?>

<result>

<listing title="(3) Missed Calls From Paypal" descr="Call back Yes / No" site="clkn.browserg.com" bid="0.0009592" url="http://impressionrtb.xdomain100.com/?w=xc&uq=4e168b53252374eced29f21d41da8cf7" icon="http://impressionrtb.xdomain100.com/?w=xi&uq=5a39a5e90956933100ab1edcf5ac48f6"

</result>