Requesting a Home Page Banner X Ad
Home page banner ads require a simple "context' to be sent to Project Agora Commerce. A "context" is a bit of code that defines the conditions under which a product is shown to a customer.
Banner X Ads use the /bannerx endpoint
Project Agora Commerce may need to enable home page ads before ads can be served.
Minimum Viable Context:
Below are the minimum values needed to generate a search term ad:
POST $BASE_URL/v1/ads/bannerx HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic your_api_key_here
{
"catalogId": "string",
"pageType": "string",
"contentStandardId": "string",
"bannerSlotIds": [
{
"slotId": "string",
"maxNumberOfAds": number
}
]
}curl -iX POST "$BASE_URL/v1/ads/bannerx" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: Basic your_api_key_here" \
-d \
'{
"catalogId": "string",
"pageType": "string",
"contentStandardId": "string",
"bannerSlotIds": [
{
"slotId": "string",
"maxNumberOfAds": number
}
]
}'Exemplar Context
Here is an example of a context for the pageType "Home":
What Happens when an Ad Is Successfully Requested
When you successfully request an ad, you receive the following object:
Requesting Multiple Banners
The example below requests 2 banner slot ids in the same home page request:
What Happens When an Ad Is Successfully Requested
When you successfully request an ad, you receive the following object:
Last updated