Lookup Storefront Products by IDs (v1)
Method & Path
POST /api/v1/public/storefront/stores/:slug/products/by-ids
Actual backend path: POST /v1/public/storefront/stores/:slug/products/by-ids
Description
Returns public product payloads for up to 40 product IDs that belong to the store and are active. Used by the storefront web app to render the guest favorites list (browser-only storage) without N separate product requests.
Authentication
None — Public endpoint. Only products that are part of the published storefront catalog can be returned.
Persona access
| Persona | Access |
|---|---|
| Customer (client, storefront visitor) | Yes — public |
| Staff / Workspace Owner / Admin | Not applicable (customer-facing) |
Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | Store slug |
Request body
{
"productIds": ["507f1f77bcf86cd799439011", "507f1f77bcf86cd799439012"]
| Field | Type | Required | Description |
|---|---|---|---|
productIds | string[] | Yes | 1–40 MongoDB ObjectId strings |
Response 200 OK
{
"products": [
{
"id": "507f1f77bcf86cd799439011",
"name": "Example",
"basePrice": 10,
"images": [],
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T00:00:00.000Z"
}
]
}
Unknown, archived, or other-store product IDs are omitted (no error).
Common errors
- 400 BAD_REQUEST: Invalid body or more than 40 IDs / invalid ObjectId
- 404 NOT_FOUND: Store slug not found
- 500 INTERNAL_SERVER_ERROR: Server error