Collection
The Collection
object contains the details of a collection, the collection's ads, and any sub-collections.
Property | Type | Description |
---|---|---|
metadata | CollectionMetadata | The metadata for the collection. |
subCollections | SubCollection[] | The sub-collections within this collection, if any. |
categories | CategoryGroup[] | An array of ad category groups covering the ads in this collection and sub-collections. The categories reference ads in the ads arrays via their ad ID, similar to the categories list in AdList |
adIds | string[] | An array of ids of the ads that belong in this collection. Every ID in this array corresponds to an ad in the master list of ads in the response. It is not uncommon for this array to be empty if all ads belong to the sub-collections. |
SubCollection
The SubCollection
object contains the details of a sub-collection and the ads it contains. It is essentially a tuple of CollectionMetadata and an array of Ads.
Property | Type | Description |
---|---|---|
metadata | CollectionMetadata | The metadata for the sub-collection. Note: CollectionMetadata.bannerImage is null for sub-collection. |
ads | Ad[] | The ads within the sub-collection. |
Example
{
"metadata": {
"id" : "c122",
"name" : "Holiday Gift Shopping",
"tagLine" : "Gift yourself while gifting others.",
"bannerImage" : {
"url":"https://images.cardlytics.com/collections/banner/c122.png",
"text":"wrapped presents"
}
},
"ads" : [ /* Empty in this example, as all ads are part of sub-collections instead */ ],
"subCollections" : [
{
"metadata" : {
"id" : "111222333",
"name" : "Last-Minute Gift Ideas",
"tagLine" : "Stores open on holidays.",
"bannerImage" : null /* Will be null for Sub-Collection */
}
"ads" : [
ad.json
]
},
{
"metadata" : {
"id" : "F009A",
"name" : "Holiday Gifts for Kids",
"tagLine" : "Shop for the little ones this holiday season",
"bannerImage" : null /* Will be null for Sub-Collection */
}
"ads" : [
// Omitted for brevity
]
}
],
"categories":[
{
"name":"Shopping",
"id":"Shopping-123",
"adIds":[
"10132748",
"11244212"
]
}
]
}