Skip to main content

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

PersonaAccess
Customer (client, storefront visitor)Yes — public
Staff / Workspace Owner / AdminNot applicable (customer-facing)

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json

Path parameters

ParameterTypeRequiredDescription
slugstringYesStore slug

Request body

{
"productIds": ["507f1f77bcf86cd799439011", "507f1f77bcf86cd799439012"]
FieldTypeRequiredDescription
productIdsstring[]Yes1–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