SPA V3
POST
https://localhost/v3/{publisherUUID}
Path Parameters
- publisherUUIDstringrequiredDescription
Body Parameters
- bodyRequestrequired
- userUserrequired
- idstringDescriptionMin Length1Max Length128
- loggedInIdstringDescriptionMin Length1Max Length128
- additionalIdsmap<string, string>Example
{ "partner_x_id": "id123", "partner_y_id": "id456" }Description - ipstringDescriptionMax Length60
- agentstringExampleDescriptionMax Length400
- regionstringExampleDescriptionMax Length100
- segmentsstring[]Example
[ "income_>10k", "gender_male" ]
Description - limitedTrackingbooleanDescription
- adUnitContextobjectDescription
- searchQuerysearchQueryDescription
- productsobject[]Description
- gtingtinDescription
- ignoreBidbooleanDescriptionDefaultfalse
- pinnedbooleanDescriptionDefaultfalse
- extExtExample
{ "attr1": "val1", "attr2": "val2" }Description
- additionalProductsobject[]Description
- gtingtinDescription
- excludedProductsexcludedProductsDescription
- demandSourcesdemandSourcesExample
{ "spa": { "demand_source_1": { "947081": { "bid": 2.3, "beaconUrls": [ "https://demand_source_1.com/tracking/impression/947081" ], "clickUrls": [ "https://demand_source_1.com/tracking/click/947081" ] } } } }Description- spamap<string, object>Description
- adUnitsAdUnit[]requiredDescription
- adUnitIdstringrequiredDescriptionMin Length1Max Length100
- searchQuerysearchQueryDescription
- productsobject[]Description
- gtingtinDescription
- ignoreBidbooleanDescriptionDefaultfalse
- pinnedbooleanDescriptionDefaultfalse
- extExtExample
{ "attr1": "val1", "attr2": "val2" }Description
- categoriesobjectDescription
- currentstringDescriptionMax Length400
- additionalstring[]Description
- additionalProductsobject[]Description
- gtingtinDescription
- excludedProductsexcludedProductsDescription
- demandSourcesdemandSourcesExample
{ "spa": { "demand_source_1": { "947081": { "bid": 2.3, "beaconUrls": [ "https://demand_source_1.com/tracking/impression/947081" ], "clickUrls": [ "https://demand_source_1.com/tracking/click/947081" ] } } } }Description- spamap<string, object>Description
- onlySponsoredbooleanDescriptionDefaultfalse
- excludePositionKindstring[]Description
Responses
200
- AdResponse
- requestIdstring
- adUnitsobject[]
- adUnitIdstring
- positionsobject[]
- gtinstring
- extExtExample
{ "attr1": "val1", "attr2": "val2" }Description - beaconUrlsstring[]Description
- clickUrlsstring[]Description
- loadUrlsstring[]Description
- sponsoredbooleanExample
- kindstringDescription
- brandstringExampleDescription
- advertiserNamestringExampleDescription
- advertiserIdnumberExampleDescription
- campaignNamestringExampleDescription
- campaignIdnumberExampleDescription
- adGroupIdnumberExampleDescription
- adGroupNamestringExampleDescription
- productGroupIdnumberExampleDescription
- productTitlestringExampleDescription
- productCategoriesstring[]Example
[ "category X", "category Y" ]
Description - demandSourcesstring[]Example
[ "source X", "source Y" ]
Description
- extmap<string, object[]>Example
{ "dspName": [ { "key1": "value1" }, { "key2": "value2" } ] }Description
400
- ErrorResponse
- errorsstring[]
404
- ErrorResponse
- errorsstring[]
curl
curl --request POST \
--url https://localhost/v3/{publisherUUID} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"user": {},
"adUnits": [
{
"adUnitId": ""
}
]
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"user": {},
"adUnits": [
{
"adUnitId": ""
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://localhost/v3/{publisherUUID}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://localhost/v3/{publisherUUID}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"user": {},
"adUnits": [
{
"adUnitId": ""
}
]
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://localhost/v3/{publisherUUID}"
payload = json.dumps({
"user": {},
"adUnits": [
{
"adUnitId": ""
}
]
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// OK
{
"requestId": "",
"adUnits": [
{
"adUnitId": "",
"positions": [
{
"gtin": "",
"ext": {},
"beaconUrls": [
""
],
"clickUrls": [
""
],
"loadUrls": [
""
],
"sponsored": "true | false",
"kind": "",
"brand": "brand X",
"advertiserName": "advertiser X",
"advertiserId": 1,
"campaignName": "campaign X",
"campaignId": 1,
"adGroupId": 1,
"adGroupName": "ad group X",
"productGroupId": 1,
"productTitle": "product title X",
"productCategories": [
""
],
"demandSources": [
""
]
}
],
"ext": "{\"dspName\":[{\"key1\":\"value1\"},{\"key2\":\"value2\"}]}"
}
]
}400
// One or more request parameters don't comply to the API specifications.
{
"errors": [
""
]
}404
// One of the request ad unit IDs is unknown.
{
"errors": [
""
]
}