Skip to main content
Version: 5.7.0

RefreshPromotions

Returns up-to-date eligible 'promotions' for the user and a 'promotionsRefreshed' flag indicating whether the user's promotion info required refreshing.

tip

A user’s segments and promotions are automatically refreshed when they authenticate. Calling this method allows apps to periodically refresh the segment + promotion data for the user during the play session.

tip

Note that this is an expensive call - calling it is equates to 2 API counts (technically 1 API + 10 bulk API) - so use it sparingly!

ServiceOperation
appStoreREFRESH_PROMOTIONS

Usage

http://localhost:3000
SuccessCallback successCallback = (response, cbObject) =>
{
Debug.Log(string.Format("Success | {0}", response));
};
FailureCallback failureCallback = (status, code, error, cbObject) =>
{
Debug.Log(string.Format("Failed | {0} {1} {2}", status, code, error));
};

_bc.AppStoreService.RefreshPromotions(successCallback, failureCallback);
JSON Response
{
"data": {
"promotionsRefreshed": false,
"promotions": [
{
"gameId": "24591",
"promotionId": 13,
"type": "AUTOMATED",
"name": "adtestidunder50",
"message": "",
"enabled": true,
"segments": [
3
],
"prices": [
{
"itemId": "barBundle1Imp",
"priceId": 0
},
{
"itemId": "gemcollection",
"priceId": 3
}
],
"notifications": [
{
"trigger": "ACTIVATED",
"notificationTemplateId": 1
}
],
"duration": 5,
"customJson": null,
"isRetriggerable": true,
"maxRetriggers": null,
"maxPurchases": 1,
"createdAt": 1619802897824,
"updatedAt": 1619802981253,
"version": 2,
"triggeredForUserAt": 1619802981350,
"expiresForUserAt": 1619820981350
}
]
},
"status": 200
}