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.
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 |
segment_id targets the store at a segment: only users the segment's last evaluation recorded as members see the store or buy from it. A user the segment has not evaluated yet does not see it until the next evaluation adds them.
Response 201
Errors
400 INVALID_JSON— the body is not a JSON object.400 INVALID_NAME—nameis missing or empty.400 INVALID_DESCRIPTION—descriptionis neither a string nor null.400 INVALID_SEGMENT_ID—segment_idis not a uuid.400 SEGMENT_NOT_FOUND— no segment in this project has that id.409 STORE_EXISTS— a store with this name exists.500 CREATE_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/storescurl -X POST 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/stores' \
-H 'Content-Type: application/json' \
-d '{
"name": "Main store"
}'Curl:
GET /admin/projects/:projectId/stores
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/storescurl -X GET 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/stores'Curl:
PATCH /admin/projects/:projectId/stores/:storeId
Allowed fields: name, description, is_active, segment_id. segment_id: null opens the store to every user.
Errors
400 INVALID_JSON,400 INVALID_NAME,400 INVALID_DESCRIPTION,400 INVALID_SEGMENT_ID,400 SEGMENT_NOT_FOUND— as on create.400 INVALID_IS_ACTIVE—is_activeis not a boolean.404 NOT_FOUND.409 STORE_EXISTS.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7Dcurl -X PATCH 'https://api.amba.dev/v1/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/v1/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 |
override_pricesmaps currency codes to the price the store charges in that currency: a whole number from 0 to 2147483647 (a JSON number or a digit string), or null for the catalog price. The client store routes show and charge this price.max_purchases_per_useris a whole number from 1 to 2147483647, or null for no limit.
Response 201
Errors
400 INVALID_JSON— the body is not a JSON object.400 INVALID_CATALOG_ITEM_ID—catalog_item_idis missing or not a uuid.400 INVALID_OVERRIDE_PRICES—override_pricesis not an object of whole-number prices.400 INVALID_MAX_PURCHASES_PER_USER—max_purchases_per_useris not a whole number from 1, or null.400 INVALID_SORT_ORDER—sort_orderis not a whole number.400 INVALID_AVAILABLE_FROM/400 INVALID_AVAILABLE_UNTIL— the value is not an ISO 8601 timestamp or null.404 NOT_FOUND— the store or the catalog item does not exist.409 LISTING_EXISTS— the store already lists this item.500 ADD_LISTING_FAILED.
Try it:
/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listingscurl -X POST 'https://api.amba.dev/v1/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listings' \
-H 'Content-Type: application/json' \
-d '{
"catalog_item_id": "<catalog_item_id>"
}'Curl:
GET /admin/projects/:projectId/stores/:storeId/listings
Listings with each row carrying inlined catalog-item display info, 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/v1/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. override_prices and max_purchases_per_user follow the rules above; null clears either.
Errors
400 INVALID_JSON,400 INVALID_OVERRIDE_PRICES,400 INVALID_MAX_PURCHASES_PER_USER,400 INVALID_SORT_ORDER,400 INVALID_AVAILABLE_FROM,400 INVALID_AVAILABLE_UNTIL— as on create.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/v1/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/v1/admin/projects/%7B%7BprojectId%7D%7D/stores/%7B%7BstoreId%7D%7D/listings/%7B%7BlistingId%7D%7D'Curl: