Inventory
Per-user inventory reads and admin-side grants.
Read a user's owned items or grant items directly (joining rewards, customer support, etc.). The client-side purchase flow lives under /client/inventory/purchase.
Source: apps/api/src/routes/admin/inventory.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /admin/projects/:projectId/inventory/:userId | List a user's inventory with catalog item info. |
| POST | /admin/projects/:projectId/inventory/grant | Grant an item (upsert on (user, item) unique key). |
GET /admin/projects/:projectId/inventory/:userId
Response 200
Errors
500 FETCH_FAILED.
Try it:
GET
developer auth/admin/projects/%7B%7BprojectId%7D%7D/inventory/%7B%7BuserId%7D%7Dcurl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/inventory/%7B%7BuserId%7D%7D'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl:
POST /admin/projects/:projectId/inventory/grant
Grant an item to a user. If the user already owns it, the quantity is additive. acquired_via is stamped as "grant".
Request (GrantItemInput)
| Field | Type | Required | Default |
|---|---|---|---|
app_user_id | uuid | yes | — |
catalog_item_id | uuid | yes | — |
quantity | number | no | 1 |
Response 201
Errors
500 GRANT_FAILED.
Try it:
POST
developer auth/admin/projects/%7B%7BprojectId%7D%7D/inventory/grantcurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/inventory/grant'Loading auth… Configure auth in the settings drawer (top-right) to run this request.
Curl: