Get Ads
The primary endpoint for retrieving ads to display.
1 | |
Input Parameters
| Path Param | Type | Required | Description |
|---|---|---|---|
| token | string | Required | The security token for the customer |
| Query Param | Type | Required | Description |
|---|---|---|---|
| channelId | int | Required | Value from Channel list |
| locationId | int | Required | Value from Location list |
| status | int | Required | A bitwise concatenation of the various AdStatus desired. For example if ads with status 2 or 16 are desired, the value specified here will be 18. For improved readability, this parameter also supports a comma-separated list of AdStatus values. For example, |
| includeParked | boolean | Optional | If true, only parked ads are returned. If false, only ads which have not been parked are returned. If not specified, ads in both states are returned. |
| maxAdLimit | int | Optional | the maximum number of the ads are returned. If not set, then return all available ads. Should be positive number (1 to int. max value) |
| enableSuppression | boolean | Optional | If this parameter is true, customer offer pairs which are marked as suppressible will be excluded from the ads response, if false, all ads will be returned, Default as false. |
Output
This endpoint returns an AdList object with the matching ads for the customer.
| Property | Type | Description |
|---|---|---|
| ads | Map with adId (string) keys and Ad objects as values | Data for ads, keyed by adId to make referencing from ranking section simpler |
| rankings | Map keyed by type of ranking returned | Indicator for how to rank ads returned. If no sections are used, then use “ALL” section id |
| assets | Creative[] | Array of metadata for creatives. This is an optional response object that can be disabled through ad-metadata and creative-metadata caching integration. |
| storeLocations | Map keyed by AdId, values: array of StoreLocation objects |
Example
This example will return ads for channelId 1 and locationId 2 which are not parked and which are in either the redeemed (16), activated (4), or served (2) status.
Request
1 | |
Response
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | |