I would like to implement this in my game, but I do not know how to:
1 Like
You just need to use the catalog API. In your game, you’d do this using HttpService every X amount of time.
To get the total copies and the copies sold, you can use https://catalog.roblox.com/v1/catalog/items/{ASSETID}/details?itemType=Asset
. It will return something like this:
{
"expectedSellerId": 0,
"owned": false,
"isPurchasable": false,
"id": 12345,
"itemType": "Asset",
"assetType": 8,
"name": "Example",
"description": "example.",
"genres": [
"All"
],
"itemRestrictions": [
"Collectible"
],
"creatorHasVerifiedBadge": false,
"creatorType": "Group",
"creatorTargetId": 12345,
"creatorName": "group name",
"price": 0,
"lowestPrice": 30,
"lowestResalePrice": 30,
"unitsAvailableForConsumption": 76,
"favoriteCount": 12345,
"offSaleDeadline": null,
"collectibleItemId": "173a9e38-e594",
"totalQuantity": 12345,
"saleLocationType": "ExperiencesDevApiOnly",
"hasResellers": true,
"quantityLimitPerUser": 1
}
Then you can parse totalQuantity
for the total number of copies, and unitsAvailableForConsumption
for the number of copies that are still available.
If you’re wondering how to get all the other info (resellers, rap, copies, etc.) about UGC limiteds, I wrote a detailed explanation on the required endpoints here.
4 Likes
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.