Skip to main content
Version: 5.9.0

GetItemsOnPromotion

Returns list of promotional details for the specified item definition, for promotions available to the current user.

ServiceOperation
userItemsGET_ITEMS_ON_PROMOTION

Method Parameters

ParameterDescription
shopIdThe id identifying the store the item is from, if applicable.
includeDefIf true, the associated item definition info of the promotional items will be included in the response.
includePromotionDetailsIf true, the promotion details of the eligible promotions will be included in the response.

Usage

http://localhost:3000
string shopId = "None";
bool includeDef = True;
bool includePromotionDetails = True;

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.UseritemsService.GetItemsOnPromotion(shopId, includeDef, includePromotionDetails, successCallback, failureCallback);
JSON Response
{
"data": {
"items": [
{
"defId": "s001",
"itemDef": {
"resourceGroup": null,
"sellPrice": {},
"type": "ITEM",
"coolDownSecs": 0,
"recoverySecs": 0,
"statusName": null,
"buyPrice": {
"bar": 88
},
"image": null,
"stackable": true,
"publishedAt": 1713324249793,
"pState": "PUBLISHED",
"activatable": false,
"tags": null,
"defId": "s001",
"maxStackable": 1,
"blockchain": false,
"meta": null,
"consumable": false,
"name": {
"en": "Sword"
},
"tradable": false,
"resourceTag": null,
"uses": null,
"_id": {
"timestamp": 1711508420,
"date": 1711508420000
},
"activeSecs": null,
"category": "weapon",
"desc": {
"en": "weapon"
}
},
"winningPromotionId": 1,
"promotionPrices": [
{
"promotionPrice": {
"bar": 44
},
"name": "test",
"type": "AUTOMATED",
"promotionId": 1
}
]
}
],
"promotionDetails": [
{
"promotionId": 1,
"type": "AUTOMATED",
"name": "test",
"duration": 10,
"customJson": {
"priority": 100,
"itemIds": {
"barBundle1Imp": {
"currency": {
"bars": 12
},
"extra": {
"specialItemReward": "bonusItemA"
}
},
"gemcollection": {
"currency": {
"gems": 7
},
"extra": {
"specialItemReward": "bonusItemA"
}
}
}
},
"isRetriggerable": true,
"maxRetriggers": null,
"maxPurchases": null,
"triggeredForUserAt": 1764353888374,
"expiresForUserAt": 1764389888374
}
]
},
"status": 200
}