/v2/publishers/{publisherId}/ad-units/locations
GET
https://<pcm-domain>/v2/publishers/{publisherId}/ad-units/locations
Path Parameters
- publisherIdinteger<int32>requiredFormatint32
Query Parameters
- marketIdinteger<int32>Formatint32
Responses
200
- AdGroupTargetLocation[]
- locationstring<CATEGORY_PAGE | SEARCH_PAGE | HOME_PAGE | PRODUCT_PAGE | CHECKOUT | MINI_SEARCH | EMAIL | EMAIL_ABANDONED_CART>AllowedCATEGORY_PAGESEARCH_PAGEHOME_PAGEPRODUCT_PAGECHECKOUTMINI_SEARCHEMAILEMAIL_ABANDONED_CART
- pagePositionstring<MAIN_GRID | CAROUSEL | BELOW_THE_FOLD | ABOVE_THE_FOLD | L1 | L2 | L3 | L4>AllowedMAIN_GRIDCAROUSELBELOW_THE_FOLDABOVE_THE_FOLDL1L2L3L4
401
403
404
- ExceptionResponse
- messagesstring[]
curl
curl --request GET \
--url https://<pcm-domain>/v2/publishers/{publisherId}/ad-units/locations \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://<pcm-domain>/v2/publishers/{publisherId}/ad-units/locations", 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://<pcm-domain>/v2/publishers/{publisherId}/ad-units/locations")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://<pcm-domain>/v2/publishers/{publisherId}/ad-units/locations"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// OK
[
{
"location": "",
"pagePosition": ""
}
]401
// Unauthorized
403
// Forbidden
404
// Not Found
{
"messages": [
""
]
}