Playbasis Goods API
Methods
-
<static> goodsGroupAvailable(playerId, group, options)
-
Find number of available Goods given group.
Parameters:
Name Type Description playerIdString player id
groupString goods group
optionsObject (optional) options as object.
It can include
{
amount: Number = amount of the goods to redeem
}Returns:
Promise object
- Type
- Object
-
<static> goodsInfo(goodsId, options)
-
Returns information about the goods with the specified id.
Parameters:
Name Type Description goodsIdString goods id
optionsObject (optional) options as object.
It can include
{
player_id: String
}Returns:
Promise object
- Type
- Object
-
<static> goodsListInfo(options)
-
Returns information about all available goods for the current site.
Parameters:
Name Type Description optionsObject (optional) options as object.
It can include
{
player_id: String = player id
active_filter: Boolean = filter only active goods items based on today. It will include only item that has been started but not yet expired, but not include items that has not yet started or have a start date in the future. It can be set to true | false.
name: String = name or group name of goods to search
date_start: String = date start in the format YYYY-MM-DD (i.e. 1982-09-29) to filter goods whose valid start date is in specified range
date_end: String = date expire in the format YYYY-MM-DD (i.e. 1982-09-29) to filter goods whose valid end date is in specified range
offset: String = paging offset. Default is 0.
limit: Number = paging limit. Default is unlimited.
tags: String = delimit by comma
custom_param: String = specific custom param(s) to filter for results. It needs to be in formatkeyorkey|operator|valuein which operator can be "<", "<=", ">", ">=", "=", "!=". Such key needs to be set prior on dashboard first.not_custom_param: String = specific custom param(s) to filter for results. It needs to be in formatkeyorkey|operator|valuein which operator can be "<", "<=", ">", ">=", "=", "!=". Such key needs to be set prior on dashboard first. }.Returns:
Promise object
- Type
- Object
-
<static> goodsListInfoWithSelectedFields(options)
-
Return information about all available goods for the current site.
Parameters:
Name Type Description optionsObject (optional) options as object.
It can include
{
player_id: String = player id
selected_field: String = fields that will be included result payload, delimited with comma and with no space i.e. field1,field2,field3.
active_filter: Boolean = filter only active goods items based on today. It will include only item that has been started but not yet expired, but not include items that has not yet started or have a start date in the future. It can be set to true | false.
date_start: String = date start in the format YYYY-MM-DD (i.e. 1982-09-29) to filter goods whose valid start date is in specified range
date_end: String = date expire in the format YYYY-MM-DD (i.e. 1982-09-29) to filter goods whose valid end date is in specified range
offset: String = paging offset. Default is 0.
limit: Number = paging limit. Default is unlimited.
tags: String = delimit by comma
custom_param: String = specific custom param(s) to filter for results. It needs to be in formatkeyorkey|operator|valuein which operator can be "<", "<=", ">", ">=", "=", "!=". Such key needs to be set prior on dashboard first.
not_custom_param: String = specific custom param(s) to filter for results. It needs to be in formatkeyorkey|operator|valuein which operator can be "<", "<=", ">", ">=", "=", "!=". Such key needs to be set prior on dashboard first. }Returns:
Promise object
- Type
- Object