# Catalog API

> Read the active currencies, items and packs of your game from your backend with the server API.

The catalog is what your game rewards and sells: its currencies, its items and its packs. You manage it in the dashboard, which is in French for now (« Monnaies », « Objets », « Packs »); the API only reads it. The examples on this page continue from the [setup](/docs/api#setup-for-the-examples).

## Get the catalog

Returns the active currencies, items and packs of the game in one call. Use it to build a shop screen, or to check a sku and its price before you sell it. Archived and draft entries are left out.

```endpoint
GET /catalog
```

**Authentication:** secret key. **Idempotency:** not needed. **Parameters:** none.

<!-- tabs:start -->
```bash tab="curl"
curl "https://gamecoin.apilow.com/api/v1/catalog" \
  -H "Authorization: Bearer $GAMECOIN_SECRET_KEY"
```
```javascript tab="Node.js"
const catalog = await gamecoin.catalog.get();
for (const item of catalog.items) console.log(item.sku, item.type, item.price?.amount);
for (const pack of catalog.packs) console.log(pack.sku, pack.priceCents);
```
```python tab="Python"
catalog = gamecoin.catalog.get()
for item in catalog.items:
    print(item.sku, item.type, item.price.amount if item.price else None)
for pack in catalog.packs:
    print(pack.sku, pack.price_cents)
```
```php tab="PHP"
$catalog = $gamecoin->catalog->get();
foreach ($catalog->items as $item) {
    echo $item->sku, ' ', $item->type, ' ', $item->price?->amount ?? 'none', "\n";
}
foreach ($catalog->packs as $pack) {
    echo $pack->sku, ' ', $pack->priceCents, "\n";
}
```
```go tab="Go"
catalog, err := client.Catalog.Get(ctx)
check(err)
for _, item := range catalog.Items {
	if item.Price != nil {
		fmt.Println(item.SKU, item.Type, item.Price.Amount)
	} else {
		fmt.Println(item.SKU, item.Type, "no price")
	}
}
for _, pack := range catalog.Packs {
	fmt.Println(pack.SKU, pack.PriceCents)
}
```
```csharp tab="C#"
var catalog = await gamecoin.Catalog.GetAsync();
foreach (var item in catalog.Items) Console.WriteLine($"{item.Sku} {item.Type} {item.Price?.Amount}");
foreach (var pack in catalog.Packs) Console.WriteLine($"{pack.Sku} {pack.PriceCents}");
```
<!-- tabs:end -->

**Response** `200 OK`: a [Catalog](/docs/api/objects#catalog).

```json
{
  "currencies": [
    { "code": "gems", "name": "Gems", "purchasable": true },
    { "code": "gold", "name": "Gold", "purchasable": false }
  ],
  "items": [
    {
      "sku": "potion",
      "name": "Potion",
      "description": null,
      "type": "consumable",
      "price": { "currency": "gems", "amount": 20 },
      "maxOwned": null,
      "clientPurchasable": true,
      "metadata": {}
    },
    {
      "sku": "fire-sword",
      "name": "Fire sword",
      "description": null,
      "type": "durable",
      "price": { "currency": "gems", "amount": 300 },
      "maxOwned": 1,
      "clientPurchasable": true,
      "metadata": {}
    }
  ],
  "packs": [
    {
      "sku": "starter",
      "name": "Starter pack",
      "description": null,
      "priceCents": 99,
      "currency": "EUR",
      "grants": [{ "currency": "gems", "amount": 100, "bonus": 20 }],
      "items": [{ "sku": "potion", "quantity": 1 }],
      "badge": null,
      "maxPerPlayer": 1,
      "availability": null
    },
    {
      "sku": "gems-500",
      "name": "Bag of gems",
      "description": null,
      "priceCents": 499,
      "currency": "EUR",
      "grants": [{ "currency": "gems", "amount": 500, "bonus": 50 }],
      "items": [],
      "badge": null,
      "maxPerPlayer": null,
      "availability": null
    },
    {
      "sku": "founder-pack",
      "name": "Founder pack",
      "description": "Limited to the first 500 players.",
      "priceCents": 1999,
      "currency": "EUR",
      "grants": [{ "currency": "gems", "amount": 2000, "bonus": 500 }],
      "items": [{ "sku": "fire-sword", "quantity": 1 }],
      "badge": null,
      "maxPerPlayer": 1,
      "availability": {
        "startsAt": "2026-10-01T00:00:00.000Z",
        "endsAt": "2026-12-01T00:00:00.000Z",
        "remaining": 312,
        "founder": true
      }
    }
  ],
  "prelaunch": true,
  "launchAt": "2026-12-01T00:00:00.000Z"
}
```

**Errors:** none of its own; see the [errors common to every operation](/docs/api#errors-common-to-every-operation).

**Notes**

- `currencies[].purchasable` is true when packs can sell the currency for real money. Such a currency has a `paid` part in its balances (see [Wallet](/docs/api/wallet)); a free currency such as `gold` only ever has a `bonus` part.
- `items[].price` is `null` when the item cannot be bought with a currency. [Buy an item with currency](/docs/api/purchases#buy-an-item-with-currency) refuses such an item.
- `items[].maxOwned` is the most units a player can own, or `null` for no limit. `packs[].maxPerPlayer` is the most paid orders a player can have for the pack, or `null`.
- A pack's `grants[].amount` is credited to the `paid` part of the balance and `grants[].bonus` to the `bonus` part. `priceCents` is in euro cents, VAT included.
- `packs[].availability` is `null` for an ordinary pack. Otherwise it gives the sale window (`startsAt` included, `endsAt` excluded), the units `remaining` and the `founder` flag: see [PackAvailability](/docs/api/objects#packavailability). The catalog **also lists** packs that are scheduled, ended or sold out, so that your shop can show them (coming soon, sold out); an order for such a pack is refused with `PACK_NOT_AVAILABLE` or `PACK_SOLD_OUT`.
- `remaining` is counted in the environment of the key you use: sales in the test environment never use the stock of the live environment. A pending order holds one unit until it is paid, fails or expires, so `remaining` can go up again.
- `prelaunch` and `launchAt` come from the settings of the game in the dashboard (section « Lancement »). While `prelaunch` is `true`, show purchases as pre-orders and mention the launch date.
- The browser reads the same data with a publishable key: [Get the catalog](/docs/api/client#get-the-catalog) of the client API.
