Dynamic Catalog

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

There are no strict limits on your dynamic catalog payload—just follow the base format detailed below. Add any metadata you need (e.g., item attributes). Stash’s dynamic catalog is fully customizable; contact our team if you need advanced features.

Catalog endpoint

Whenever a player visits your webshop, Stash will send a GET request to your game server to retrieve a player-specific catalog.

Request

Stash sends a GET request with the player’s ID as a query parameter:

GET /your-catalog-endpoint?player_id={player_id}

You can configure the endpoint URL and authentication methods in Stash Studio, the process is detailed in the configuration step below.

Response

Your endpoint should return a JSON response with the following structure:

{
  "rows": [
    {
      "id": "row-1",
      "header": "Featured Items",
      "items": [
        {
          "type": "product",
          "guid": "battle_pass",
          "product_id": "battle_pass",
          "name": "Battle Pass",
          "description": "Dominate the battlefield with powerful heroes and essential resources!",
          "image": "https://example.com/images/battle_pass.png",
          "price": {
            "amount": "34.99",
            "currency": "USD"
          },
          "max_purchasable": 1,
          "contents": [
            {
              "name": "Potion",
              "description": "A mysterious potion you can drink to get some abilities or health back.",
              "image": "https://example.com/images/potion.png",
              "quantity": 10
            }
          ],
          "attributes": {
            "banner": {
              "text": "New"
            },
            "badge": {
              "text": "Battle Pass"
            }
          }
        }
      ]
    },
    {
      "id": "banner-row",
      "header": "",
      "items": [
        {
          "type": "banner",
          "guid": "promo_banner",
          "title": "Earn free coins with every purchase",
          "body": "and unlock exclusive rewards only available on the web",
          "attributes": {
            "background": {
              "imageUrl": "https://example.com/images/banner-bg.png"
            }
          }
        }
      ]
    }
  ]
}

If the response is malformed or your endpoint returns error code (such as 400) Stash webshop will display an configurable error message to the player.

Data structure

This is a base payload structure, you can define the shop’s whole layout using rows and assing specific offers to each row. If any game-specific metadata needs to be passed you can leverage attributes field for each item. This object have no set structure and you can pass as much custom medata as needed to be displayed on your webshop.

Stash can also completly customize this payload structure on client-basis using our custom adapters, please contact us for more details.

Root Object

PropertyTypeRequiredDescription
rowsArrayYesArray of catalog rows containing items and banners

Row Object

PropertyTypeRequiredDescription
idStringYesUnique identifier for the row
headerStringNoDisplay title for the row section
itemsArrayYesArray of items (products or banners) in this row

Item Object (Product)

PropertyTypeRequiredDescription
typeStringYesItem type. Must be "product" for purchasable items
guidStringYesUnique identifier for the item
product_idStringYesProduct identifier used for purchase transactions
nameStringYesDisplay name of the product
descriptionStringNoProduct description text
imageStringYesURL to the product’s main image
priceObjectYesPrice information (see Price Object)
max_purchasableNumberNoMaximum quantity a player can purchase (default: unlimited)
contentsArrayNoArray of items included in this product (see Content Object)
attributesObjectNoAdditional visual attributes (see Attributes Object)

Item Object (Banner)

PropertyTypeRequiredDescription
typeStringYesItem type. Must be "banner" for promotional banners
guidStringYesUnique identifier for the banner
titleStringYesMain banner headline
bodyStringNoSecondary banner text
attributesObjectNoBanner styling attributes (see Attributes Object)

Price Object

PropertyTypeRequiredDescription
amountStringYesPrice amount as a string (e.g., “19.99”)
currencyStringYesISO currency code (e.g., “USD”, “EUR”)

Content Object

PropertyTypeRequiredDescription
nameStringYesName of the content item
descriptionStringNoDescription of the content item
imageStringNoURL to the content item’s image
quantityNumberYesQuantity of this item included

Attributes Object

The attributes object supports various visual enhancements:

PropertyTypeDescription
bannerObjectBanner overlay with text property
badgeObjectBadge overlay with text property
ribbonObjectRibbon overlay with text property
tooltipObjectTooltip text with text property
backgroundObjectBackground image with imageUrl property

Attribute Examples

{
  "attributes": {
    "banner": { "text": "New" },
    "badge": { "text": "Limited Time" },
    "ribbon": { "text": "Web Exclusive" },
    "tooltip": { "text": "This is a special offer" },
    "background": { "imageUrl": "https://example.com/bg.png" }
  }
}

Configuration

To configure your dynamic catalog endpoint:

  1. In Stash Studio, navigate to your game settings
  2. Go to WebshopConfiguration
  3. Set your catalog endpoint URL
  4. Configure authentication if required

Debugging & Logs

Stash Studio provides comprehensive logging and debugging tools for your dynamic catalog. Use these tools to monitor your catalog endpoint’s performance and troubleshoot any issues:

  • Check Stash Studio logs for endpoint response times
  • Verify your endpoint returns valid JSON
  • Ensure all required fields are present
  • Test with different player IDs to verify personalization
Was this page helpful?