Skip to content
GameCoinDocs
Dashboard

Catalog management API

Create, change and archive the currencies, items and packs of your game from your backend with a secret key, like the products and prices of a payment platform.

On this page

The catalog is what your game rewards and sells. Besides the dashboard (« Monnaies », « Objets », « Packs »), you can manage it from your own code: a build script that publishes the shop of a new season, an admin tool of your studio, a migration. The five server SDKs (0.4.0) have these operations as currencies, items and packs; the examples on this page continue from the setup.

Warning

Each environment has its own catalog. A gc_sk_test_… key creates, changes and archives only the currencies, items and packs of test; a gc_sk_live_… key only those of live. Nothing a test key does can reach what your players see in live. A secret key can still change what your game sells in its own environment, so create a new pack as a draft and activate it when it is ready. To put a tested catalog in production, use the « Copier le catalogue de test » button of the dashboard (the live pages of « Monnaies », « Objets » and « Packs »): it copies the test catalog into live, with the packs as drafts. Every change is recorded in the audit log of the studio, under the key that made it.

How it works

  • Three resources. /currencies (identified by their code), /items and /packs (identified by their sku). Every resource has the same five operations: list, create, read, change and archive.
  • Identifiers are final. A currency code, an item or pack sku and an item type can never change, because balances, inventories and orders refer to them. A field that cannot change, like any unknown field, is refused with VALIDATION_FAILED.
  • The identifier is the natural key of a create. A code or sku that is already used, even by an archived resource, answers CONFLICT with fieldErrors.code or fieldErrors.sku set to ["CODE_TAKEN"] or ["SKU_TAKEN"]. So a create takes no Idempotency-Key: if you do not know whether it succeeded, read the resource back.
  • A change is partial. A field you leave out stays as it is; null clears a description, a price or a limit. grants, items, metadata and availability are replaced as a whole.
  • Nothing is deleted. DELETE archives: the resource is no longer offered, credited or sold, and the balances, inventories and past orders that refer to it are untouched. An archived resource can still be read, and cannot be changed.
  • The rules are the dashboard's. Everything you can do here, you can do in the dashboard, with the same checks: a pack needs at least one grant or item, its currencies and items must exist and be active, a paid amount needs a purchasable currency, a stock cannot go below the units already sold.

The objects are the catalog objects plus status, createdAt and updatedAt: see ManagedCurrency, ManagedItem and ManagedPack.

POST/api/v1/currencies
  • Authenticationsecret key
  • Idempotencynot needed (the code is the key)
FieldTypeDescription
codestring, requiredA lowercase letter, then lowercase letters, digits or _, 2 to 24 characters in all. Unique in the game, final.
namestring, requiredThe display name, 1 to 60 characters.
purchasablebooleantrue (the default) when packs can sell the currency for real money. false for a currency that is only given, such as gold: it is always credited to the bonus part of a balance.

Response

200 OK: a ManagedCurrency.

Errors

VALIDATION_FAILED for an invalid code or name; CONFLICT when the code is taken.

PATCH/api/v1/currencies/{code}
  • Authenticationsecret key

Request body

name and purchasable, both optional. Returns the currency.

A currency cannot become free (purchasable: false) while a pack that is not archived sells it for money: the answer is CONFLICT, with the pack skus in details.blockedBy.packs.

DELETE/api/v1/currencies/{code}
  • Authenticationsecret key

Returns the archived currency. Archiving is refused with CONFLICT while an active pack credits the currency or an active item is priced in it: details.blockedBy lists them as { packs, items }. Archive those first. Archiving an archived currency has no effect.

GET/api/v1/currencies/{code}

Returns one currency, archived ones included; NOT_FOUND for an unknown code.

GET/api/v1/currencies

Returns { "currencies": [ManagedCurrency, …] }, oldest first. Archived currencies are left out unless you add ?includeArchived=true.

POST/api/v1/items
  • Authenticationsecret key
  • Idempotencynot needed (the sku is the key)
FieldTypeDescription
skustring, requiredA lowercase letter or digit, then lowercase letters, digits, _, . or -, 1 to 48 characters. Unique among the items, final.
namestring, requiredThe display name, 1 to 80 characters.
typestring, requiredconsumable (can be consumed, like a potion) or durable (is owned, like a skin). Final.
descriptionstring or nullA text of at most 500 characters.
priceobject or null{ "currency": "gems", "amount": 20 }, in an active currency of the game. Leave it out for an item that cannot be bought with currency (it comes from packs or grants).
maxOwnedinteger or nullThe most units a player can own, 1 to 1,000,000,000. Left out: 1 for a durable item and no limit for a consumable. null: no limit.
clientPurchasablebooleantrue when the browser SDK may sell the item. Needs a price. Defaults to false.
metadataobjectFree key/value strings that your game reads: at most 10 entries, keys of 1 to 40 characters (letters, digits, _, -), values of at most 200 characters.

Response

200 OK: a ManagedItem.

Errors

VALIDATION_FAILED (an invalid sku, a price in a currency that does not exist or is archived, clientPurchasable without a price); CONFLICT when the sku is taken.

PATCH/api/v1/items/{sku}

Body: name, description, price, maxOwned, clientPurchasable and metadata, all optional. null clears the description, the price or the limit; metadata replaces the whole object. Sending sku or type is a VALIDATION_FAILED. An item that ends up with clientPurchasable: true and no price is refused.

DELETE/api/v1/items/{sku}

Archives the item and returns it. Inventories keep the units players own. Refused with CONFLICT (details.blockedBy.packs) while an active pack contains the item.

GET/api/v1/items/{sku}

Returns one item, archived ones included; NOT_FOUND for an unknown sku.

GET/api/v1/items

Same as for currencies: { "items": [ManagedItem, …] }, archived ones with ?includeArchived=true.

Packs

A pack is a bundle of currency and items that a player buys with real money. See Selling packs for how a pack is sold, and Founder packs for limited ones.

POST/api/v1/packs
  • Authenticationsecret key
  • Idempotencynot needed (the sku is the key)
FieldTypeDescription
skustring, requiredSame rules as an item sku. Unique among the packs, final.
namestring, requiredThe display name, 1 to 80 characters.
priceCentsinteger, requiredThe price in euro cents, VAT included: 50 to 50,000.
descriptionstring or nullA text of at most 500 characters.
grantsarrayCurrencies credited when the order is paid: { "currency", "amount", "bonus" }. amount goes to the paid part of the balance (purchasable currencies only), bonus to the bonus part. At most 10 lines.
itemsarrayItems granted when the order is paid: { "sku", "quantity" }, at most 50 lines. A pack needs at least one grant or one item.
badgestring or nullpopular or best_value.
maxPerPlayerinteger or nullThe most orders per player (a starter pack: 1), 1 to 1,000,000. null: no limit.
sortOrderintegerThe display order in the shop, ascending, from -10,000 to 10,000. Defaults to 0.
availabilityobject or nullThe sale window, the stock and the founder flag, see below. Left out: always on sale, without limit.
statusstringdraft (the default: not sold) or active (sold at once).

A new pack is a draft unless you say otherwise, so that you can check it before it is sold.

Response

200 OK: a ManagedPack.

Errors

VALIDATION_FAILED with the faulty lines in details.fieldErrors (an empty pack, an unknown or archived currency or item, a paid amount in a free currency, a price out of range); CONFLICT when the sku is taken.

PATCH/api/v1/packs/{sku}

Body: any field of the create table except sku. A field you leave out is unchanged; grants, items and availability replace the previous value as a whole. status (draft, active or archived) is applied after the rest of the change; turning a pack active checks that every currency and item it uses is still active. If that check fails, the content change stays and the status does not move.

The price of a pack can change at any time; the orders already placed keep the price they were made at. An archived pack cannot be changed, except to bring it back with a status alone.

Availability

availability is the whole sale setting of a pack, and it replaces the previous one:

FieldTypeDescription
startsAtstring or nullThe first instant of sale (included), an ISO 8601 date-time with a time zone. null: on sale from the start.
endsAtstring or nullThe first instant when the pack is no longer sold (excluded). null: no end.
stockinteger or nullThe total units that can be sold, 1 to 1,000,000. null: unlimited. It cannot go below the units already sold.
founderbooleantrue for a founder pack.

All four fields are required in the API (the Node.js SDK fills the ones you leave out with null and false). To remove every limit, send { "startsAt": null, "endsAt": null, "stock": null, "founder": false }. In a response, availability also has sold, the units delivered so far; the public catalog shows remaining instead.

LangageLanguage
curl -X PATCH "https://gamecoin.apilow.com/api/v1/packs/mega" \
  -H "Authorization: Bearer $GAMECOIN_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "availability": { "startsAt": "2026-11-01T00:00:00Z", "endsAt": "2026-12-01T00:00:00Z", "stock": 500, "founder": true } }'
DELETE/api/v1/packs/{sku}

Archives the pack (the same as setting status to archived) and returns it. The pack is no longer sold; the orders already placed are unaffected.

GET/api/v1/packs/{sku}

Returns one pack with its status and availability, archived ones included; NOT_FOUND for an unknown sku.

GET/api/v1/packs

{ "packs": [ManagedPack, …] } in display order, drafts included; archived packs only with ?includeArchived=true. GET /catalog is the shop's view: it lists the active packs only.

Errors

CodeWhen
VALIDATION_FAILEDA field is invalid, unknown or final (details.fieldErrors, one entry per field; a line of a pack's content is named by its position, such as grants.0.currency).
NOT_FOUNDUnknown code or sku in this game.
CONFLICTA code or sku already taken (fieldErrors); a change to an archived resource; an archive or a change that an active pack or item depends on (details.blockedBy).
FORBIDDENA publishable key, which cannot manage the catalog.

See also the errors common to every operation.