Requesting a Search Term Banner X Ad
Search term 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
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",
"searchTerm": "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",
"searchTerm": "string",
"contentStandardId": "string",
"bannerSlotIds": [
{
"slotId": "string",
"maxNumberOfAds": number
}
]
}'Exemplar Context
Here is an example of a context for the pageType "Search":
What Happens when an Ad Is Successfully Requested
When you successfully request an ad, you receive the following object:
Filtered Searches & Multiple Banners
When a user filters their browsing deeper, you are able to serve ads relevant to their filters using productFilters in the context.
In this example, the user has searched for "chocolate" and navigated into the "Cupboard" category, and browsed further to "Confectionery". This is a new request and considered by Project Agora Commerce as a new page, and new set of ads. Even in the rare event the ads served are identical to the unfiltered results.. The example below also requests 2 banner slot ids:
As your customers filter deeper in their searches, your request will include more product filters
What Happens when an Ad Is Successfully Requested
When you successfully request an ad, you receive the following object:
Last updated