Support > Publisher > Server-Side Implementation with XML/JSON-Feed

Server-Side Implementation with XML/JSON-Feed (#2104)

(Last Update: 28.02.2022)

For server-side integrations, especially where structural manipulation (layout, aggregation with other feeds, etc) is required, XML requests with appropriate 2nd party XSLT transformations or similar is recommended.

For AJAX type requests JSONP is generally recommended where server-side proxy requests are possible using JSON, but note that a SCRIPT request may better fit most of the common AJAX use cases and is much simpler to implement.


Data formats & Feed-URLs

Data formats
Response
Basic URL
Encoding
JSON
JSON formatted data object
UTF-8
XHTML
XHMTL (transitional) document
UTF-8
XHTML Fragment
DIV Container
UTF-8

Feed Inputs

Header
Data Type
Required?
Description
User-Agent
String
Yes1
The User-Agent of the brwser. In general, client-side implementations (JSON, JSONP, HTML, SCRIPT) do this automatically, server-side implementations must set this header in the request to SolAds Media accordingly.
Referer
String
Yes1
The URL of the page that will receive the adverts from the request. In general, client-side implementations (JSON, JSONP, HTML, SCRIPT) do this automatically, server-side implementations must set this header in the request to SolAds Media accordingly.

1 In the unlikely event of your chosen programming language or environment not allow you to set request headers, these can be supplied using the "ua=" and "ref=" parameters. The data must be URL encoded if sent in this manner. Please try and use headers if at all possible because the use of parameters causes unnecessary logging and may impact performance as a result.


Parameter
Data Type
Required?
Description
a
Integer (6)
Yes
Your publisher id
ai
Bit
Yes
Activate Actual Impressions and receive an impression callback url to notify our adserver when advert was visually served to the user
b
Bit
No
Use backfill results if required (default = 1). "Backfill" results are 3rd party results which help to fill advert requests.
bfcpm
Float
No
Minimum Bid for Banners. Only relevant for display ads. Usage: #.##
ch
Integer
Yes
Channelnumber
cpw
Integer
No
Copy width for banner ads
cph
Integer
No
Copy height for banner ads
ct
Boolean
0
Declare if you have user consent to enable processing of Personally Identifiable Information (PII) as per Regional Data Regulation Laws. Values are 1 for consent or 0 for no consent. Default value if empty or not defined is 0 (no consent).
i
Bit
No
Use images if available (default = 0)
ih
Integer
No
Logo image height for native text ads
iw
Integer
No
Logo image width for native text ads
ip
IP Address
Yes
End user IP address
lang
String
Yes
End User Browser Language
mt
String
No1
Media Type - banner, standardtexts
n
Integer
Yes
Number of results requested (1-15)
p
Enum
No
Return prices. See below.
ref
URL
No
Pass the URL that is sending the ad request (supports decoded and encoded URL strings). Use this parameter if you cannot send your site referrer with the request header. This tracks your traffic against the site table of your publisher account so that advertisers are able to target specific pages of your site. If ref= and the referrer header are both sent, ref= will override.
s
String
No
SubID-String
sl
Bit
No
Set sl=1 to get secure links (HTTPS) (Default=0)
sys
String
Yes
sys=Solads, internal Systemname
t
URL
No
Tracking URL

1 Depending upon the system's configuration, specific types of adverts can be requested by supplying the media type parameter. If this parameter is not supplied, the advert server is free to choose any media type that is valid for the other parameters in the request.


Enumerated Inputs

Prices (Parameter "p"):

Value
Description
Empty or 0
Do not return price (Default)
EUR
Return prices in Euros (estimated if not feed default)
USD
Return prices in US Dollars (estimated if not feed default)
GBP
Return prices in Sterling (estimated if not feed default)

N.B. All prices are in cents/pennies NOT Pounds/Euros/Dollars e.g. 1.52 is ONE POINT FIVE-TWO CENTS, NOT ONE DOLLAR FIFTY-TWO!


Optional Inputs

For HTML requests:

Parameter
Data Type
Mandatory?
Details
c
URI
No
URI of your CSS file

Inactive Inputs

Parameter
Data Type
Mandatory?
Details
f
Bit
No
Filter for adult content (default = 0)
q
String
Yes2, if ch not defined
Keyword
z
String
No
Zone Name