Amba

Catalog

Catalog items, per-currency prices, and bundle contents.

The catalog is the library of purchasable things — durable items, consumables, bundles. Prices live in a separate table (one row per item+currency); bundles map a bundle-type item to its child content items.

Source: apps/api/src/routes/admin/catalog.ts.

Endpoints

MethodPathDescription
POST/admin/projects/:projectId/catalogCreate a catalog item.
GET/admin/projects/:projectId/catalogList, optional ?category=. Includes catalog_item_prices.
GET/admin/projects/:projectId/catalog/:itemIdFull item including prices + bundle contents.
PATCH/admin/projects/:projectId/catalog/:itemIdPartial update.
DELETE/admin/projects/:projectId/catalog/:itemIdDelete.
POST/admin/projects/:projectId/catalog/:itemId/pricesUpsert a per-currency price.
DELETE/admin/projects/:projectId/catalog/:itemId/prices/:currencyCodeRemove a price.
POST/admin/projects/:projectId/catalog/:itemId/bundleUpsert bundle content.
DELETE/admin/projects/:projectId/catalog/:itemId/bundle/:contentItemIdRemove bundle content.

POST /admin/projects/:projectId/catalog

Request (CreateCatalogItemInput)

FieldTypeRequiredDefault
keystringyes
namestringyes
descriptionstringnonull
icon_urlstringnonull
categorystringnonull
tagsstring[]no[]
item_type"durable" | "consumable" | "bundle"no"durable"
metadataobjectno{}

Response 201

{
  "data": {
    "id": "…",
    "key": "healing_potion",
    "name": "Healing Potion",
    "item_type": "consumable",
    "tags": [],
    "metadata": {}
  }
}

Try it:

POST/admin/projects/%7B%7BprojectId%7D%7D/catalog
developer auth
curl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X POST '${BASE_URL}/admin/projects/{projectId}/catalog' \
  -H 'Authorization: Bearer ${DEV_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{}'

GET /admin/projects/:projectId/catalog

Query

ParamDescription
categoryFilter to a single category.

Response 200

{
  "data": [
    {
      "id": "…",
      "key": "…",
      "name": "…",
      "item_type": "durable",
      "catalog_item_prices": [{ "currency_code": "gems", "price": 100 }]
    }
  ]
}

Try it:

GET/admin/projects/%7B%7BprojectId%7D%7D/catalog
developer auth
curl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/admin/projects/{projectId}/catalog' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

GET /admin/projects/:projectId/catalog/:itemId

Response 200

{
  "data": {
    "id": "…",
    "catalog_item_prices": [{ "currency_code": "gems", "price": 100 }],
    "bundle_contents": [{ "content_item_id": "…", "quantity": 3 }]
  }
}

Errors

  • 404 NOT_FOUND.

Try it:

GET/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D
developer auth
curl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X GET '${BASE_URL}/admin/projects/{projectId}/catalog/{itemId}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

PATCH /admin/projects/:projectId/catalog/:itemId

Allowed fields: name, description, icon_url, category, tags, item_type, metadata, is_active.

Try it:

PATCH/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D
developer auth
curl -X PATCH 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X PATCH '${BASE_URL}/admin/projects/{projectId}/catalog/{itemId}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{}'

DELETE /admin/projects/:projectId/catalog/:itemId

{ "data": { "deleted": true } }

Try it:

DELETE/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D
developer auth
curl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X DELETE '${BASE_URL}/admin/projects/{projectId}/catalog/{itemId}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

POST /admin/projects/:projectId/catalog/:itemId/prices

Upsert a price for a specific currency. ON CONFLICT (catalog_item_id, currency_code) DO UPDATE.

Request

FieldTypeRequired
currency_codestringyes
pricenumberyes

Response 201

{ "data": { "catalog_item_id": "…", "currency_code": "gems", "price": 100, "updated_at": "…" } }

Errors

  • 500 SET_PRICE_FAILED.

Try it:

POST/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D/prices
developer auth
curl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D/prices'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X POST '${BASE_URL}/admin/projects/{projectId}/catalog/{itemId}/prices' \
  -H 'Authorization: Bearer ${DEV_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{}'

DELETE /admin/projects/:projectId/catalog/:itemId/prices/:currencyCode

{ "data": { "deleted": true } }

Try it:

DELETE/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D/prices/%7B%7BcurrencyCode%7D%7D
developer auth
curl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D/prices/%7B%7BcurrencyCode%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X DELETE '${BASE_URL}/admin/projects/{projectId}/catalog/{itemId}/prices/{currencyCode}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'

POST /admin/projects/:projectId/catalog/:itemId/bundle

Add or update bundle content. ON CONFLICT (bundle_item_id, content_item_id) DO UPDATE SET quantity.

Request

FieldTypeRequiredDefault
content_item_iduuidyes
quantitynumberno1

Response 201

{ "data": { "bundle_item_id": "…", "content_item_id": "…", "quantity": 3 } }

Errors

  • 500 ADD_BUNDLE_FAILED.

Try it:

POST/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D/bundle
developer auth
curl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D/bundle'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X POST '${BASE_URL}/admin/projects/{projectId}/catalog/{itemId}/bundle' \
  -H 'Authorization: Bearer ${DEV_TOKEN}' \
  -H 'Content-Type: application/json' \
  -d '{}'

DELETE /admin/projects/:projectId/catalog/:itemId/bundle/:contentItemId

{ "data": { "deleted": true } }

Try it:

DELETE/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D/bundle/%7B%7BcontentItemId%7D%7D
developer auth
curl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/catalog/%7B%7BitemId%7D%7D/bundle/%7B%7BcontentItemId%7D%7D'
Loading auth… Configure auth in the settings drawer (top-right) to run this request.

Curl:

curl -X DELETE '${BASE_URL}/admin/projects/{projectId}/catalog/{itemId}/bundle/{contentItemId}' \
  -H 'Authorization: Bearer ${DEV_TOKEN}'