Notifications
CREATE NOTIFICATION TEMPLATE
Description: Create notification template
REQUEST PARAMETERS
Parameter | Type | Description | Required |
---|---|---|---|
message | String | Notification message | Yes |
messageType | Integer | 0 - indicates message template for successful transaction, 1- indicates message template for failed transaction | Yes |
productCode | String | eTranzact specific product code | Yes |
- Sample Request
- Sample Response
POST / notification/template
curl `${base_url}/notification/template`
-H "Content-type: application/json"
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X POST
-d '{
"message": "Dear customer, an attempt to fund your wallet by bank transfer failed due to limit exceeded",
"messageType": 1,
"productCode": "PKM"
}'
POST / notification/template
{
"status": 201,
"message": "Template created"
}
GET NOTIFICATION TEMPLATES
Description: Get created notification templates
REQUEST PARAMETERS
Parameter | Type | Description | Required |
---|---|---|---|
product | String | eTranzact specific product code | Yes |
tempID | String | Template ID | No |
Not-Required = tempID - Template ID
- Sample Request
- Sample Response
GET / notification/template?product=PKM&tempID=
curl https://{base_url}/notification/template?product=PKM&tempID=
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X GET
GET / notification/template?product=PKM&tempID=
{
"status": 200,
"message": "Success",
"data": [
{
"templateID": 1,
"productCode": "PKM",
"message": "Dear customer, an attempt to fund your wallet by bank transfer failed due to limit exceeded",
"messageType": 1,
" createdAT ": "2021-04-12 12:00:21",
" createdBy ": "user",
" updatedAt ": "2021-04-12 12:00:21",
" updatedBy ": "user2",
" version ": 2
},
{
"templateID": 2,
"productCode": "PKM",
"message": "Dear customer, an attempt to fund your wallet by bank transfer failed due to limit exceeded",
"messageType": 0,
" createdAT ": "2021-04-12 12:00:21",
" createdBy ": "user",
" updatedAt ": "2021-04-12 12:00:21",
" updatedBy ": "user2",
" version ": 2
}
]
}
UPDATE NOTIFICATION TEMPLATE
Description: Update notification template
REQUEST PARAMETERS
Parameter | Type | Description | Required |
---|---|---|---|
message | String | Notification message | Yes |
messageType | Integer | 0 - indicates message template for successful transaction, 1- indicates message template for failed transaction | Yes |
productCode | String | eTranzact specific product code | Yes |
- Sample Request
- Sample Response
PUT / notification/template/{template_id}
curl https://{base_url}/notification/template/{template_id}
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X PUT
PUT / notification/template/{template_id}
{
"status": 200,
"message": "Template updated"
}
CREATE NOTIFICATION EMAIL
Description: Create notification email
REQUEST PARAMETERS
Parameter | Type | Description | Required |
---|---|---|---|
array | Admin notification email | Yes |
- Sample Request
- Sample Response
POST / notification/email
curl `${base_url}/notification/email`
-H "Content-type: application/json"
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X POST
-d '{
"email": [‘john@etz.com’,’sarah@etz.com’]
}'
POST / notification/email
{
"status": 201,
"message": "Email created"
}
REMOVE NOTIFICATION EMAIL
Description: Remove notification email
REQUEST PARAMETERS
Parameter | Type | Description | Required |
---|---|---|---|
array | Admin notification email | Yes |
- Sample Request
- Sample Response
DELETE / notification/email
curl `${base_url}/notification/email`
-H "Content-type: application/json"
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X DELETE
-d '{
"email": [‘john@etz.com’,]
}'
DELETE / notification/email
{
"status": 200,
"message": "Email deleted"
}
GET NOTIFICATION EMAIL
Description: Get admin notification email
RESPONSE PARAMETERS
Parameter | Type | Description | Required |
---|---|---|---|
status | Integer | HTTP status code | Yes |
message | String | Description of HTTP status code | Yes |
data | array | Admin Emails | Yes |
- Sample Request
- Sample Response
GET / notification/email
curl `${base_url}/notification/email`
-H "Authorization: Bearer YOUR_SECRET_KEY"
-X GET
GET / notification/email
{
"status": 200,
"message": "Success",
"data": [‘john@etz.com’,’sarah@etz.com’]
}