Stores
Store definitions with segment-scoped listings, overrides, and availability windows.
A store is a curated view onto the catalog — optionally segment-scoped. Listings pin catalog items into a store with sort order, per-store price overrides, availability windows, and per-user purchase caps.
Source: apps/api/src/routes/admin/stores.ts.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /admin/projects/:projectId/stores | Create a store. |
| GET | /admin/projects/:projectId/stores | List stores. |
| PATCH | /admin/projects/:projectId/stores/:storeId | Partial update. |
| DELETE | /admin/projects/:projectId/stores/:storeId | Delete. |
| POST | /admin/projects/:projectId/stores/:storeId/listings | Add a listing. |
| GET | /admin/projects/:projectId/stores/:storeId/listings | List listings with catalog item detail. |
| PATCH | /admin/projects/:projectId/stores/:storeId/listings/:listingId | Update a listing (scoped by storeId). |
| DELETE | /admin/projects/:projectId/stores/:storeId/listings/:listingId | Remove a listing. |
POST /admin/projects/:projectId/stores
Request
| Field | Type | Required |
|---|---|---|
name | string | yes |
description | string | no |
segment_id | uuid | no |
Response 201
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/storescurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/stores'Curl:
GET /admin/projects/:projectId/stores
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/storescurl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/stores'Curl:
PATCH /admin/projects/:projectId/stores/:storeId
Allowed fields: name, description, is_active, segment_id.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7Dcurl -X PATCH 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D'Curl:
DELETE /admin/projects/:projectId/stores/:storeId
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7Dcurl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D'Curl:
POST /admin/projects/:projectId/stores/:storeId/listings
Request (AddStoreListingInput)
| Field | Type | Required | Default |
|---|---|---|---|
catalog_item_id | uuid | yes | — |
override_prices | object | no | null |
sort_order | number | no | 0 |
available_from | ISO-8601 | no | null |
available_until | ISO-8601 | no | null |
max_purchases_per_user | number | no | null |
Response 201
Errors
500 ADD_LISTING_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listingscurl -X POST 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listings'Curl:
GET /admin/projects/:projectId/stores/:storeId/listings
Listings joined to catalog_items for display, ordered by sort_order.
Response 200
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listingscurl -X GET 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listings'Curl:
PATCH /admin/projects/:projectId/stores/:storeId/listings/:listingId
Allowed fields: override_prices, sort_order, available_from, available_until, max_purchases_per_user. Scoped by both listingId and storeId so a listing from another store can't be mutated through the wrong URL.
Errors
404 NOT_FOUND.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listings/%7B%7BlistingId%7D%7Dcurl -X PATCH 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listings/%7B%7BlistingId%7D%7D'Curl:
DELETE /admin/projects/:projectId/stores/:storeId/listings/:listingId
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listings/%7B%7BlistingId%7D%7Dcurl -X DELETE 'https://api.amba.dev/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listings/%7B%7BlistingId%7D%7D'Curl: