Skip to main content

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

NameTypeRequiredDescription
workspaceIdstringنعمWorkspace identifier

Query Parameters

NameTypeRequiredDescription
limitnumberلا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.manage permission.
  • 404 Not Found: Workspace not found.
  • 500 Internal Server Error: Unexpected error.