Skip to content

Notification

Cherry edited this page Oct 22, 2022 · 2 revisions

Using for Notification's module.

this path goes under /notification/***

Get user setting web-application

Get user’s notification setting for web-application from user’s id

URL

GET /appSetting

REQUEST BODY

REQUEST BODY

Parameter Type Description
user_id string userId

EXAMPLE

{
user_id: “xxxxxxxxxx”
}

success

RESPONSE

Parameter Type Description
user_id string userId
noti_type_id string Notification setting type for web-application

EXAMPLE

{
user_id: “xxxxxxxxxx” ,
noti_type_id: “aaaaa”
}

fail

400 ( user not found)


Get user setting email

Get user’s notification setting for email from user’s id

URL

GET /emailSetting

REQUEST BODY

REQUEST BODY

Parameter Type Description
user_id string userId

EXAMPLE

{
user_id: “xxxxxxxxxx”
}

success

RESPONSE

Parameter Type Description
user_id string userId
noti_type_id string Notification setting type for email

EXAMPLE

{
user_id: “xxxxxxxxxx” ,
noti_type_id: “aaaaa”
}

fail

400 ( user not found)


Add new noti_object to database

Register new noti_object from any module

URL

Post /registerNotiObject

REQUEST BODY

REQUEST BODY

Parameter Type Description
value string Value that gonna be shown in notifications
template_id string Id of notification template
module_id string Id of module’s notification
URL string URL of source page of notification

EXAMPLE

{
value: [ “linuk”, “cherry” ] ,
template_id: “bbbbbbb” ,
module_id: “ccccccccc” ,
URL: “https://www.taskade.com/spaces/auBTttpZcKwaz1Lq/subspaces/pGPHjc361QqpGHPC”
}

success

RESPONSE

Parameter Type Description
noti_object_id string Id of notification object
user_id String User id of receiver
date DateTime dateTime when create noti_object
isRead boolean Status of noti_object
value String Value that gonna be shown in notifications in array of string
template_id String Id of notification template
module_id String Id of module’s notification
URL String URL of source page of notification

EXAMPLE

{
noti_object_id: “xxxxxxxxxx” ,
User_id: “vvvvvvvvvv” ,
date: 2016-12-21 00:00:00 ,
isRead: false ,
value: [“linuk”,”cherry”] ,
template_id: “bbbbbbb” ,
module_id: “ccccccccc” ,
URL: “https://www.taskade.com/spaces/auBTttpZcKwaz1Lq/subspaces/pGPHjc361QqpGHPC”
}

fail

400 ( Create noti_object failed )


Show notification object

Get notification from noti_object_id and show to the user

URL

GET /notification

REQUEST BODY

REQUEST BODY

Parameter Type Description
noti_object_id string Id of notification object

EXAMPLE

{
noti_object_id: “xxxxxxxxxx”
}

success

RESPONSE

Parameter Type Description
user_id string userId
date datetime dateTime when create noti_object
isRead boolean status of noti_object
value string value that gonna be shown in notifications in array of string
template_id string id of notification template
module_id string id of module’s notification
URL string URL of source page of notification

EXAMPLE

{
noti_object_id: “xxxxxxxxxx” ,
user_id:”vvvvvvvvvv”,
date: 2016-12-21 00:00:00 ,
isRead: false,
value: [“linuk”,”cherry”] ,
template_id: “bbbbbbb”,
Module_id: “ccccccccc”,
URL:”https://www.taskade.com/spaces/auBTttpZcKwaz1Lq/subspaces/pGPHjc361QqpGHPC”

}

fail

400 ( user not found)


Add new template

Add new template pattern to the database

URL

POST /addTemplate

REQUEST BODY

REQUEST BODY

Parameter Type Description
template string HTML template of notification

EXAMPLE

{
 template: “yyyy.html”
}

success

RESPONSE

Parameter Type Description
template_id string Id of notification’s template
template string HTML template of notification

EXAMPLE

{
template_id: “ttttttt”,
template: “yyyy.html”
}

fail

400 (Create template failed)


Add new value

Add new information value for the notifications

URL

Post /addValue

REQUEST BODY

REQUEST BODY

Parameter Type Description
value string Value of notifications

EXAMPLE

{
  value: “Hello”
}

success

RESPONSE

Parameter Type Description
value_id string id of notification’s value
value string value of notification

EXAMPLE

{
value_id: “vvvvvvvvv”,
value: “Hello”
}

fail

400 ( Create value failed)


Clone this wiki locally