Add alert
POST /add-alerts
This endpoint lets you create a new alert for a specific product.
Headers
Header
Type
Description
Authorization
string
Bearer token.
Request body
{
"productId": "678504dc4ef9824e38f29c27",
"type": "stock" // allowed fields are stock and price
}Response
{
"status": "success",
"data": {
"_id": "69416ae79e0508a7d6bb31a0",
"user": "69119256f34516a8f3dbc536",
"product": "678504dc4ef9824e38f29c27",
"isNotified": false,
"type": "stock",
"requestedAt": "2025-12-16T14:21:27.567Z",
"createdAt": "2025-12-16T14:21:27.567Z",
"updatedAt": "2025-12-16T14:21:27.567Z",
"__v": 0
}
}{
"status": "fail",
"data": "productId is required"
}Last updated
Was this helpful?