Ingrid 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.
Ingrid Banner Ads use a similar context to Product Ads, you will need your contentStandardId
and bannerSlotIds
.
The placement
attribute for Ingrid Banner ads has the value "banner-ingrid".
Ingrid Banner Ads will be integrated and serve only in the category/subcategory pages of a website and the position is defined in the Project Agora Commerce Ad Proposal file provided during the beginning of the integration.
The Ingrid Banner Ads use the "Agora Ingrid" content standard.
Minimum Viable Context:
Below are the minimum values needed to generate an ingrid banner ad:
HTTP cURL
Copy POST $BASE_URL/v1/ads/generate HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic your_api_key_here
{
"catalogId": "$MY_CATALOG_ID",
"productFilters": [
["taxonomy:string"]
],
"placement": "banner-ingrid",
"contentStandardId": "string",
"bannerSlotIds": ["string"],
"maxNumberOfAds": number,
"sessionId": "string"
}
Copy curl -iX POST "$BASE_URL/v1/ads/generate" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: Basic your_api_key_here" \
-d \
'{
"catalogId": "$MY_CATALOG_ID",
"productFilters": [
["taxonomy:string"]
],
"placement": "banner-ingrid",
"contentStandardId": "string",
"bannerSlotIds": ["string"],
"maxNumberOfAds": number,
"sessionId": "string"
}'
Exemplar Context
Here is an example of a context:
HTTP cURL
Copy POST $BASE_URL/v1/ads/generate HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8
{
"catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
"productFilters": [
["taxonomy:laptops"]
],
"placement": "banner-ingrid",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"bannerSlotIds": ["Ingrid_Banner"],
"maxNumberOfAds": 2,
"sessionId": "23dn3923-323d"
}
Copy curl -iX POST "$BASE_URL/v1/ads/generate" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8" \
-d \
'{
"catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
"productFilters": [
["taxonomy:laptops"]
],
"placement": "banner-ingrid",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"bannerSlotIds": ["Ingrid_Banner"],
"maxNumberOfAds": 2,
"sessionId": "23dn3923-323d"
}'
What Happens when an Ad Is Successfully Requested
When you successfully request an ad, you receive the following object:
HTTP cURL
Copy HTTP/2 200
{
"ads": [],
"banners": [
{
"id": "banner_syCZH8KEezQH4zAwlPrfLoUTYd0yODk5MDQ5UA==",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"slotId": "Ingrid_Banner",
"imageUrl": "https://assets.flavedo.io/s/BuzjrZS0fdyWw-NOyTh9Z6wxsvrdbtmXzwrDCvmSr4o=",
"linkUrl": "https://www.retailer.com/linkforwardedurl",
"altText": "Category banner for brandx laptop",
"text": "",
"gtins": [
"catpref--2899049P",
"catpref--9891566P",
"catpref--2902620P"
],
"expiry": "2019-12-10T01:46:07.518340479Z",
"tags": {}
}
],
"products": []
}
Copy {
"ads": [],
"banners": [
{
"id": "banner_syCZH8KEezQH4zAwlPrfLoUTYd0yODk5MDQ5UA==",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"slotId": "Ingrid_Banner",
"imageUrl": "https://assets.flavedo.io/s/BuzjrZS0fdyWw-NOyTh9Z6wxsvrdbtmXzwrDCvmSr4o=",
"linkUrl": "https://www.retailer.com/linkforwardedurl",
"altText": "Category banner for brandx laptop",
"text": "",
"gtins": [
"catpref--2899049P",
"catpref--9891566P",
"catpref--2902620P"
],
"expiry": "2019-12-10T01:46:07.518340479Z",
"tags": {}
}
],
"products": []
}
No customer information or cart items are necessary in this simple context. The simple context consists only of necessary filters.
In order to serve a Banner Ad on your website you will have to use as a creative image the imageUrl
, and as a landing page the linkUrl
as taken from the above ad response. The id also from this response shall be saved for later use for Impression/Click reporting.
Filtered Browsing
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 navigated to the Computers category, and browsed further to "Laptops" and "Windows" categories. 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.
HTTP cURL
Copy POST $BASE_URL/v1/ads/generate HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8
{
"catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
"productFilters": [
["taxonomy:computers>Laptops>Windows"]
],
"placement": "banner-ingrid",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"bannerSlotIds": ["Ingrid_Banner"],
"maxNumberOfAds": 2,
"sessionId": "23dn3923-323d"
}
Copy curl -iX POST "$BASE_URL/v1/ads/generate" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8" \
-d \
'{
"catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
"productFilters": [
["taxonomy:computers>Laptops>Windows"]
],
"placement": "banner-ingrid",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"bannerSlotIds": ["Ingrid_Banner"],
"maxNumberOfAds": 2,
"sessionId": "23dn3923-323d"
}'
As your customers filter deeper in their searches, your request will include more product filters
HTTP cURL
Copy POST $BASE_URL/v1/ads/generate HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8
{
"catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
"productFilters": [
["taxonomy:computers>Laptops>Windows", "delivery:DeliveryOnly", "pricerange:$250-$500"]
],
"placement": "banner-ingrid",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"bannerSlotIds": ["Ingrid_Banner"],
"maxNumberOfAds": 2,
"sessionId": "23dn3923-323d"
}
Copy curl -iX POST "$BASE_URL/v1/ads/generate" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8" \
-d \
'{
"catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
"productFilters": [
["taxonomy:computers>Laptops>Windows", "delivery:DeliveryOnly", "pricerange:$250-$500"]
],
"placement": "banner-ingrid",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"bannerSlotIds": ["Ingrid_Banner"],
"maxNumberOfAds": 2,
"sessionId": "23dn3923-323d"
}'
What Happens when an Ad Is Successfully Requested
When you successfully request an ad, you receive the following object:
HTTP cURL
Copy HTTP/2 200
{
"ads": [],
"banners": [
{
"id": "banner_syCZH8KEezQH4zAwlPrfLoUTYd0yODk5MDQ5UA==",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"slotId": "Ingrid_Banner",
"imageUrl": "https://assets.flavedo.io/s/BuzjrZS0fdyWw-NOyTh9Z6wxsvrdbtmXzwrDCvmSr4o=",
"linkUrl": "https://www.retailer.com/linkforwardedurl",
"altText": "Category banner for brandx Laptop",
"text": "",
"gtins": [
"catpref--2899049P",
"catpref--9891566P",
"catpref--2902620P"
],
"expiry": "2019-12-10T01:46:07.518340479Z",
"tags": {}
}
],
"products": []
}
Copy {
"ads": [],
"banners": [
{
"id": "banner_syCZH8KEezQH4zAwlPrfLoUTYd0yODk5MDQ5UA==",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"slotId": "Ingrid_Banner",
"imageUrl": "https://assets.flavedo.io/s/BuzjrZS0fdyWw-NOyTh9Z6wxsvrdbtmXzwrDCvmSr4o=",
"linkUrl": "https://www.retailer.com/linkforwardedurl",
"altText": "Category banner for brandx Laptop",
"text": "",
"gtins": [
"catpref--2899049P",
"catpref--9891566P",
"catpref--2902620P"
],
"expiry": "2019-12-10T01:46:07.518340479Z",
"tags": {}
}
],
"products": []
}
Requesting Product Ads
To request Product Ads and Banner Ads in the same request, use the maxNumberOfAds
field to specify the number of Product Ads requested.
Below is an example requesting 3 Product Ads and 1 Banner Ads
HTTP cURL
Copy POST $BASE_URL/v1/ads/generate HTTP/1.1
accept: application/json
content-type: application/json
Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8
{
"catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
"productFilters": [
["taxonomy:computers>Laptops>Windows", "delivery:DeliveryOnly", "pricerange:$250-$500"]
],
"placement": "banner-ingrid",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"bannerSlotIds": ["Ingrid_Banner"],
"maxNumberOfAds": 3,
"sessionId": "23dn3923-323d"
}
Copy curl -iX POST "$BASE_URL/v1/ads/generate" \
-H "accept: application/json" \
-H "content-type: application/json" \
-H "Authorization: Basic 4ww25f70-b52s-40de-8f29-07b139b5cdc8" \
-d \
'{
"catalogId": "628dbe95-2ec9-4e07-881d-3e9f92ab2e0b",
"productFilters": [
["taxonomy:computers>Laptops>Windows", "delivery:DeliveryOnly", "pricerange:$250-$500"]
],
"placement": "banner-ingrid",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"bannerSlotIds": ["Ingrid_Banner"],
"maxNumberOfAds": 3,
"sessionId": "23dn3923-323d"
}'
What Happens when an Ad Is Successfully Requested
When you successfully request an ad, you receive the following object:
HTTP cURL
Copy HTTP/2 200
{
"ads": [
{
"id": "display_SEY2W7-VZzspoirbw4ANs-r-w6YyODk5MDQ5UA==",
"gtin": "catpref--2899049P",
"discount": {
"amount": 0,
"minPrice": 0,
"maxPerCustomer": 0
},
"expiry": "2019-12-10T01:46:07.516943179Z"
},
{
"id": "display_-hPcUdg5KUQ2sxhE6r0XVN3-iLY5ODkxNTY2UA==",
"gtin": "catpref--9891566P",
"discount": {
"amount": 0,
"minPrice": 0,
"maxPerCustomer": 0
},
"expiry": "2019-12-10T01:46:07.516948637Z"
},
{
"id": "display_aGULlK-E_yEiVZ_S_jH9qsH-KhYyOTAyNjIwUA==",
"gtin": "catpref--2902620P",
"discount": {
"amount": 0,
"minPrice": 0,
"maxPerCustomer": 0
},
],
"banners": [
{
"id": "banner_syCZH8KEezQH4zAwlPrfLoUTYd0yODk5MDQ5UA==",
"contentStandardId": "885d0bf3-0c9a-450f-a3c3-706e228cbb05",
"slotId": "Ingrid_Banner",
"imageUrl": "https://assets.flavedo.io/s/BuzjrZS0fdyWw-NOyTh9Z6wxsvrdbtmXzwrDCvmSr4o=",
"linkUrl": "https://www.retailer.com/linkforwardedurl",
"altText": "Category banner for brandx Laptop",
"text": "",
"gtins": [
"catpref--2899049P",
"catpref--9891566P",
"catpref--2902620P"
],
"expiry": "2019-12-10T01:46:07.518340479Z",
"tags": {}
}
],
"products": []
}
Copy {
"ads": [
{
"id": "display_SEY2W7-VZzspoirbw4ANs-r-w6YyODk5MDQ5UA==",
"gtin": "catpref--2899049P",
"discount": {
"amount": 0,
"minPrice": 0,
"maxPerCustomer": 0
},
"expiry": "2019-12-10T01:46:07.516943179Z"
},
{
"id": "display_-hPcUdg5KUQ2sxhE6r0XVN3-iLY5ODkxNTY2UA==",
"gtin": "catpref--9891566P",
"discount": {
"amount": 0,
"minPrice": 0,
"maxPerCustomer": 0
},
"expiry": "2019-12-10T01:46:07.516948637Z"
},
{
"id": "display_aGULlK-E_yEiVZ_S_jH9qsH-KhYyOTAyNjIwUA==",
"gtin": "catpref--2902620P",
"discount": {
"amount": 0,
"minPrice": 0,
"maxPerCustomer": 0
},
],
"banners": [
{
"id": "banner_syCZH8KEezQH4zAwlPrfLoUTYd0yODk5MDQ5UA==",
"contentStandardId": "21r372ba-dce6-46f2-bd16-1b923b9189f9",
"slotId": "Ingrid_Banner",
"imageUrl": "https://assets.flavedo.io/s/BuzjrZS0fdyWw-NOyTh9Z6wxsvrdbtmXzwrDCvmSr4o=",
"linkUrl": "https://www.retailer.com/linkforwardedurl",
"altText": "Search banner for brandx red wine",
"text": "",
"gtins": [
"catpref--2899049P",
"catpref--9891566P",
"catpref--2902620P"
],
"expiry": "2019-12-10T01:46:07.518340479Z"
}
],
"products": []
}