Get catalog specifications

Learn about the endpoint requirements for retrieving catalogs

To use dynamic catalogs, you need to create a GetCatalog endpoint on your backend. Stash calls this endpoint and passes a player ID to you, which determines what to show individual players in the web shop.

Authentication

It's your responsibility to secure this endpoint and provide Stash with an API key for authentication. Stash passes the API key in a header when it calls your endpoint.

curl --location 'https://custom.gamestudio.com/{custom_get_catalog_path}/{player_id}?lang={language_code}' \
--header '{x-custom-api-key}: abcdefc'

If the call fails, Stash displays an error page to the player instead of the web shop.

Payload structure

Stash requires the response to be in JSON format.

{
  "rows": [
    {
      "header": "Featured",
      "items": [
        {
          "id": "sword_123",
          "name": "My cool sword",
          "description": "This is really flashy",
          "max_purchasable": 1,
          "expiration_time_seconds": 1721319873,
          "price": {
            "currency": "USD",
            "amount": "11.2"
          },
          "image": "https://my.server/image/sword_123.png"
        }
      ]
    },
    {
      "items": [
        {
          "id": "shield_1234",
          "name": "My cool shield",
          "description": "This is really sturdy",
          "price": {
            "currency": "USD",
            "amount": "20.3"
          },
          "image": "https://my.server/image/shield_1234.png"
        }
      ]
    }
  ]
}

You specify what to show players by defining a set of rows, each of which contains a single header and a list of items. Headers are text strings displayed alongside the items in the row. For example, if you offer a subset of items at a discount, you might have a Discount items header. For each item in the row, you need to provide the following data.

PropertyDescriptionType
IDA unique identifier for the item.String
NameThe item's name.String
DescriptionA brief description of the item.String
Max purchasable (optional)The max number of the item the player is allowed to buy.String
Expiration time seconds (optional)The time in seconds that the item expires.String
PriceThe total cost of the item.JSON object
CurrencyThe currency to charge the player in.String
AmountThe amount to charge for the item.ISO 4217
ImageA URL for displaying an image of the item.String