List Low Stock Products (v1)
Method & Path
GET /api/v1/{workspaceId}/storefront/products/low-stock
Description
Returns products where stockQuantity is less than or equal to the per-product lowStockThreshold.
Authentication
Required: Workspace auth with store.products.manage permission.
Headers
Authorization: Bearer <token>X-Staff-Id: <staffId>(when acting as staff)
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workspaceId | string | نعم | Workspace identifier |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | لا | Max results (1-50). Default: 12 |
Response 200 OK
{
"products": [
{
"id": "66b3c0e22a6e9d2c52f7b0aa",
"name": "ماسك تيسوباكي",
"stockQuantity": 3,
"lowStockThreshold": 5,
"categoryId": "66b3bfe92a6e9d2c52f7a0ff",
"status": "active"
}
]
}
Common Errors
- 400 Bad Request: Invalid identifiers.
- 401 Unauthorized: Missing/invalid token.
- 403 Forbidden: Missing
store.products.managepermission. - 404 Not Found: Workspace not found.
- 500 Internal Server Error: Unexpected error.