Routes : Notification
File Name : notification.js
File Path : server/routes/api/notification.js
Contains route which can create, update, view and delete the notification details. These functionalities are included in notification Controller.
Get Notification Route
- API Path: api/notification
- Method: GET
- Description: This is a protected route which gets all the notification details through JWT access token which is provided in the header.
Parameters:
- jwtAccessToken: TRUE
- In: Header,
- Type: String,
- Description: JWT access token is used to check the authenticity of the favourite.
| Name | Type | Required |
|---|---|---|
| order | ObjectId | true |
| location | ObjectId | true |
| priceGrandTotal | Number | true |
| orderID | Number | true |
| readNotification | Boolean | true |
Response:
Http Code: 200
Data:[ ]
Type: Array
| Name | Type |
|---|---|
| statusCode | Number |
| Data | Array |
Description:Data is an Array with all notifications.
Get Notification Route
- API Path: api/notification/:id
- Method: GET
- Description: This is a protected route which gets particular notification details through JWT access token which is provided in the header.
Parameters:
- jwtAccessToken: TRUE
- In: Header,
- Type: String,
- Description: JWT access token is used to check the authenticity of the favourite.
- id: req.params.id
Response:
Http Code: 200
Data:{ }
Type: Object
| Name | Type |
|---|---|
| statusCode | Number |
| Data | Object |
Description:Data is an Object with particular notification.
Get Notification Route
- API Path: api/notification/unread/all/:id
- Method: GET
- Description: This is a protected route which gets all unread notification details through JWT access token which is provided in the header.
Parameters:
- jwtAccessToken: TRUE
- In: Header,
- Type: String,
- Description: JWT access token is used to check the authenticity of the favourite.
- locationId: req.params.id
Response:
Http Code: 200
Data:[ ]
Type: Array
| Name | type |
|---|---|
| statusCode | Number |
| Data | Array |
Description:Data is an Array with all unread notifications.
Get Notification Route
- API Path: api/notification/all/read
- Method: GET
- Description: This is a protected route which update all unread notification as read, through JWT access token which is provided in the header.
Parameters:
- jwtAccessToken: TRUE
- In: Header,
- Type: String,
- Description: JWT access token is used to check the authenticity of the favourite.
- locationId: req.params.id
Response:
Http Code: 200
Data:message
Type: String
| Name | Type |
|---|---|
| statusCode | Number |
| Data | String |
Description:Data is a String which get you as message.