Banners & stores
The content APIs behind the advertisement module. Both are exposed as SDK methods rather than as endpoints you call directly.
Available Android · Available iOS
The banner and store placements are documented as SDK methods, and the SDKs handle the request construction and the parsing of the tagged tracking strings.
TBD A standalone, publisher-facing HTTP API for advertisement placements is not published. If you need placements on a surface with no Cheggout SDK — a headless integration, or a cross-platform app — raise it with Cheggout. It is on Open items.
Shared parameters
Both calls take the same parameter set.
| Parameter | Type | Required | Description |
|---|---|---|---|
languageCode | string | Yes | Two-character ISO language code, for example EN |
virtualId | string | Yes, except pre-login | The customer, for personalisation |
placementId | string | Yes | The slot. 01 for a banner position, 00 for the store row. |
securityKey | string | Optional | Pass an empty string unless Cheggout instructs otherwise |
additionalParams | string | Optional | JSON string of location, device and demographic context |
virtualId is mandatory except in pre-login, which is the one state where you have a screen but no
identified customer. See Placements.
Banners
- Android
- iOS
CHEGNetworkCallHelper.Companion.getTopBannerDetails(
virtualId,
placementId,
"EN",
securityKey,
additionalParams,
object : CHEGTopBannerCallBack {
override fun onResponse(responseString: String) { }
}
)
CheggoutApp.getCheggoutTopBanners(
languageCode: "EN",
virtualId: "pub_8f14e45fceea167a",
placementId: "01",
additonalParams: "",
securityKey: ""
) { topBanners in }
Response fields
| Field | Type | Description |
|---|---|---|
bannerLink | string | URL of the creative image to display. Documented with a maximum length of 500 characters. |
href | string | Deep-linking and impression tracking information. Documented with a maximum length of 1000 characters. Pass to the SDK on display and on click. |
bankLink | string | Documented values are 0 and 1. bankLink = 1 means the banner is the Bank's own and the Bank app must not call the SDK. TBD Samples also show an empty string; what an empty value means is not documented. |
duration | integer | Auto-scroll duration in seconds, for rotating banners |
trackLink, trackLinkExt | string | Tracking information |
clickLink | string | Click destination |
bankBanner | boolean | Present in the response. TBD No semantics are documented for this field, and its relationship to bankLink is not documented either — do not infer one from the other. |
brandDescription | string | Creative description text |
Banners are returned grouped by placement:
{
"banners": {
"01": [
{
"bannerLink": "https://assets.example.com/banner-1.jpg",
"href": "REPLACE_TRACKING_STRING",
"trackLink": "REPLACE_TRACKING_STRING",
"trackLinkExt": "REPLACE_TRACKING_STRING",
"bankBanner": false,
"duration": 10,
"bankLink": "",
"clickLink": "https://example.com/destination",
"brandDescription": "Example promotional description"
}
]
}
}
Full integration guidance: Banners.
Stores
- Android
- iOS
CHEGNetworkCallHelper.Companion.getTopStoreDetails(
virtualId,
placementId,
"EN",
securityToken,
additionalParams,
object : CHEGTopOfferCallBack {
override fun onResponse(responseString: String?) { }
}
)
CheggoutApp.getCheggoutTopStores(
languageCode: "EN",
virtualId: "pub_8f14e45fceea167a",
placementId: "00",
additionalParams: "",
securityKey: ""
)
Response fields
| Field | Type | Description |
|---|---|---|
storeId | string | Merchant identifier |
title | string | Store name — display it |
logo | string | Logo image URL |
discountPercentage | string | Current discount — display it |
category | string | Store category |
href | string | Deep-linking and tracking information |
[
{
"storeId": "318",
"title": "Example Retailer",
"logo": "https://assets.example.com/store-318.png",
"discountPercentage": "15",
"category": "Fashion",
"href": "REPLACE_TRACKING_STRING"
}
]
Full integration guidance: Stores.
The href tracking string
Both responses carry href as a pseudo-XML tagged string rather than a plain URL:
<click>https://example.com/destination</click>
<track>https://tracking.cheggout.com/REPLACE</track>
<clicktrack>https://tracking.cheggout.com/REPLACE</clicktrack>
<browser>Native</browser>
<expiryduration>60</expiryduration>
<id>REPLACE_ID</id>
<redirectURL>REPLACE_URL</redirectURL>
| Tag | Purpose |
|---|---|
<click> | The destination |
<track> | Impression URLs — fire on visibility |
<clicktrack> | Click URLs. Pass href to the SDK on launch as documented. TBD Whether the SDK also fires this URL itself is not documented — confirm with Cheggout, and do not assume it is handled for you. |
<browser> | Rendering hint, Native or Custom |
<expiryduration> | Present with an observed value of 60. TBD Its meaning is not documented. |
<id> | Identifier for this tracking record |
<redirectURL> | Redirect destination |
The SDKs parse this for you — pass href to the tracking method and to the launch payload. If you
are parsing it yourself, extract the tag you need and fire the URL with a plain GET.
Tracking
| Event | Method |
|---|---|
| Banner or store becomes visible | Android CheggoutUtils.Companion.trackLink(href, virtualId) · iOS CheggoutApp.impression(userID:impressionInfo:) |
| Customer taps | Open the SDK with href in the launch payload |
See Ad tracking.
Errors
TBD No error catalogue is published for these calls. Treat an empty or absent response as "no content for this placement" — a normal outcome under frequency caps and targeting — and fail quietly rather than showing an error.