XML Feed Implementation

 

Push traffic (Classic)

Request URL

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

 

http://xml.smartyads.com/pushRequest?rtb_seat_id={seat_id}&secret_key={secret_key}&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={format}&count={count}


 

Warning: Push traffic requires icon or image macros.

 

Request Parameters

 

Parameter

Required/

Optional

Description

rtb_seat_id

Required

Your unique identifier. Shall be provided to you by your Account Manager.

secret_key

Required

Authorization token. Shall be provided to you by your Account Manager.

subid

Required

Id of the source where the user was generated.

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 unique subids per day. You will be able to view statistics for each subid.

ua

Required

User Agent.

ip

Required

IP address of user.

url

Required

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

domain

Optional

Website of subscribe.

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

Language of the visitor. Shall be sent in Accept-Language header format.

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

Feed response format (xml or json). Default value is 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

Request URL

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

 

http://xml.smartyads.com/pushRequest?rtb_seat_id={seat_id}&secret_key={secret_key}&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={format}&count={count}&ref_url={ref_url}

 

Warning: In-page push traffic requires ref_url macro.

Request parameters


 

Parameter

Required/

Optional

Description

rtb_seat_id

Required

Your unique identifier. Shall be provided to you by your Account Manager.

secret_key

Required

Authorization token. Shall be provided to you by your Account Manager.

subid

Required

Id of the source where the user was generated.

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 unique subids per day. You will be able to view statistics for each subid.

ua

Required

User Agent.

ip

Required

IP address of user.

ref

Required

For in-page push traffic. Should be encoded.

url

Optional

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

domain

Optional

Website of subscribe.

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

Language of the visitor. Shall be sent in Accept-Language header format.

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

Feed response format (xml or json). Default value is json.

count

Optional

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










 

Response format

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

Impressions counting by icon field. If there is no icon, then we count in this order of priority

Icon -> Image -> Pixel.

 

XML

<result>

    <listing>

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

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

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

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

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

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

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

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

</listing>

</results>





 

JSON

{

    results: [

        {

title: ad.title,

descr: ad.descr,

bid: ad.bid,

site: ad.site,

icon: ad.icon,

url: ad.clickUrl,

image: ad.image,

pixel: ad.pixel

                },

]

}

 

Request and response example

Request:

 

http://xml.smartyads.com/pushRequest?seat=af024cd240120&token=0295018432&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&format=xml

 

Response:

 

XML: 

<?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.02592" url="https://nd22.rtbtrack.com/url?uq=&amp;w=x&amp;type=xml" icon="https://nd22.rtbtrack.com/icon?uq=&amp;w=x&amp;type=xml"

</result>

 

JSON:

 {

    "results":[

        {

            "title":"Publlic Liability Insurance",

            "url":"https://nd22.rtbtrack.com/url?uq=asdddsad&w=x&type=json",

            "descr":"Get The Right Liability Insurance",

            "site":"click.techgus.com",

            "bid":0.03169,

            "image":"https://nd22.rtbtrack.com/image?uq=dsadsad&w=x&type=json",

            "icon":"https://nd22.rtbtrack.com/icon?uq=dsadsad&w=x&type=json"

        }

    ]

}