Notifications
(ms.notifications)

This entity is used to send different types of notifications like: -

  • Email
  • Sms
  • Push
  • Browser

Fields

_id The unique identifier for the orders. This one is used for API purposes. 

{ "_id" : "54b8bbf73e2dfb0a0b640c5e" }

Read Only
name This field contain the name of the notification. 
description
Type: string
This field contains the short description about when this notification will be used
publish Flag that determines if a category is published i.e. visible to users
group This field describes the group_set of notification. there are three groups for notifications.
  • Order
  • Shipping
  • User
type
Type: object

Required: Yes
This field is array of object , used for type of notification we want to send for an particular notification.
There are four types of notifications :
  • Email
  • Sms
  • Push
  • Browser

{
     "
Email": "1"​​​​​​​,
     "
Sms​​​​​​​": "1"​​​​​​​​​​​​​​,
     "
Push​​​​​​​" : "1"​​​​​​​​​​​​​​,
     "Browser" : "1"​​​​​​​
}

 
email
Type: object

Required: No
This field is an object containing information about email and its header info :-
{
     "from_email": "test@gmail.com",
     "cc":  ['test1@gmail.com','test2@gmail.com'],
     "subject" :"Order Confirmation",
     "message: :  "Your Order with OrderId 504 is confirmed"
}
 

from_email : it contains the email of the sender.
cc : it contains emails to be kept in cc.
subject : it contains the subject of email.
message : it contains the message to be send in email
sms
Type: object
It contains the message to be send in the sms.

{
message : "test message"


 
List GET /api/1/entity/ms.notifications

List the records saved in the entity.

Add POST /api/1/entity/ms.notifications

Add the record in the entity.

Update PUT /api/1/entity/ms.notifications/#{_id}

Update the record in the entity.

Delete DELETE /api/1/entity/ms.notifications/#{_id}

Delete the record from the entity.

Get GET /api/1/entity/ms.notifications/#{_id}

Get the record from the entity.

Duplicate POST /api/1/entity/ms.notifications/#{_id}/_duplicate

Duplicate the record from the entity.

Send POST /api/1/entity/ms.notifications

Example

send
POST /api/1/entity/ms.notifications

Example Request Json

{
 "entity": "ms.notifications",
"data" : {
 "name": "user_account_verification",
 "to": {
 "email": "rahul.verma@hippoinnovations.com"
  },
"type": [
 "email"
  ],
 "data": {
 "store": {
 "title": "title",
"url": "title.com"
  },
"user": {
 "name": "test",
 "email": "rahul.verma@hippoinnovations.com",
 "phone": "9898989898"
 },
 "details": {
 "link": "title.com/ms/pages/verification?key=1234"
  }
  }
}
}

Example Response Json

{
"status": "200"
}