Item Catalog
Durable, consumable, and bundle items with virtual currency pricing.
The item catalog defines all purchasable items in your app. Items can be durable (owned forever), consumable (used up), or bundles (contain other items).
Item types
| Type | Description | Example |
|---|---|---|
durable | Owned permanently | Themes, avatars, character skins |
consumable | Used up on use | Extra lives, boosts, hints |
bundle | Contains multiple items | Starter pack, holiday bundle |
MCP tools
| Tool | Description |
|---|---|
amba_catalog_items_create | Create a catalog item |
amba_catalog_list | List items (optionally by category) |
amba_catalog_items_set_price | Set a price in a virtual currency |
Example: Set up an item catalog
Client API reference
| Method | Path | Description |
|---|---|---|
GET | /v1/client/catalog | Browse catalog items |
GET | /v1/client/catalog/:id | Fetch one catalog item |
POST | /v1/client/inventory/purchase | Buy an item with a virtual currency |
Purchase an item
catalog_item_id takes the item's id or its key (sku and currency_key are accepted as aliases). currency_code can be left out when the item has a price in one currency only; an item priced in several answers 400 CURRENCY_REQUIRED. Pass store_id to buy at a store listing's price. An item that an active store limits per user (max_purchases_per_user) is sold through that store only: without store_id it answers 409 STORE_PURCHASE_REQUIRED. A purchase answers:
A single-item purchase also returns the inventory row it added to (id, sku, quantity and the rest of an inventory item). await Amba.inventory.purchase({ sku: 'theme_dark', currency_key: 'gold' }) sends this request and resolves with data, typed InventoryPurchase. The bought item (or a bundle's contents) is now in the user's inventory; Amba.inventory.getItems() lists it. A purchase buys one item: to buy several, call purchase once per item. A request with a quantity other than 1 answers 400 QUANTITY_NOT_SUPPORTED and charges nothing. Add store_id to buy through a store's listing, at its price and within its per-user limit; see Stores.