Skip to main content
Version: 6.0.0

GetSalesInventory

Method gets the active sales inventory for the passed-in currency type and platform.

tip

The itemId field returned in each product entry is the cash product's own unique identifier (a SKU-like key set when the product was created in the portal). It is not a reference to an item catalog entry. Item catalog entries awarded by a product purchase are identified by defId and appear in the items field of the product definition.

ServiceOperation
appStoreGET_INVENTORY

Method Parameters

ParameterDescription
storeIdThe store id. Refer to the current available store IDs here.
userCurrencyThe currency to retrieve the sales inventory for. This is only used for Steam and Facebook stores.

Usage

http://localhost:3000
string storeId = "itunes";
string userCurrency = "{\"userCurrency\":\"USD\"}";
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.GetSalesInventory(storeId, userCurrency, successCallback, failureCallback);
JSON Response
{
"data": {
"productInventory": [
{
"currency": {
"bar": 50
},
"description": "Bundle of 50 Bars.",
"fbUrl": "https://dev.braincloudservers.com/fbproductservice?gameId=eggies&itemId=barBundle2Imp",
"gameId": "eggies",
"imageUrl": "http://eggies6waves.braincloudservers.com/s3/eggies-prod/store/bars.png",
"itemId": "barBundle2Imp",
"priceData": {
"ids": [
{
"appId": "ipad",
"itunesId": "com.playbrains.eggiesdevhd2.barBundle2Imp"
},
{
"appId": "iphone",
"itunesId": "com.playbrains.eggiesdev2.barBundle2Imp"
}
]
},
"payload": "__bc:[1,itemid,0,199,-1]",
"title": "Bars"
}
],
"serverTime": 1395952561266
},
"status": 200
}