User Tools

Site Tools


Sidebar

apiv4:bulletin_board

Bulletin Board

Bulletin Board provides a place for alerts, messages and notifications to be presented to each user. Each user's Bulletin Board is composed of individual notices. User may choose to hide each notices separately.

Implementation wise, the Bulletin Board leverages the campaign system keep track of notices. As in the campaign system, each notice should be treated similar to a campaign push with the appropriate campaign key, appActionKey, and predefined url.

Get All Bulletin Notices

Retrieves all the bulletin notices for the user. The result is sorted based on bulletin type and date posted. includeHidden could be set to true to include any notices the user has explicitly hid from view. Hidden notice may become visible again when the user explicitly show it or another notice for the same campaign is added to the user's bulletin board again.

To use this mechanism, first authenticate, then perform an HTTP GET to this URL:

GET https://api.youmail.com/api/v4/campaign/bulletin/notice/{boolean includeHidden}

Result

The result is a list of bulletin notice structures.

Parameter Type Description
title String title of the notice
body String the text body to be presented to the user
campKey String This is the campaign key that is the underlying implementation for this notice.
createTime long when notice was first posted, milliseconds since Jan 1, 1970
campMsgType int The original message broadcast type that this notice was posted in addition to adding it on to the bulletin board, 1=PUSH, 2=VOICEMAIL, 3=EMAIL, 4=LOG ONLY, 5=BULLETIN NOTICE ONLY
sponsor String The original sponsor of the campaign or notification
campUserSatus int The status of the campaign notification, 2=SENT and 3=VIEWED.
appActionKey String what action the client application should execute if user “view” the notice, by default “url” is specified, in which case the client application should sends user to the campaign web site. If the client application does not know how to handle the corresponding appActionKey, just treat as “url”
hidden boolean true if notice should be hidden from user's view
bulletinType int what type of bulletin notice this is, 1=SYSTEM_ALERT, 2=ACCOMPLISHMENT_ALERT, 3=FEATURE_ALERT, 4=MARKETING_ALERT, 5=PARTNER_ALERT, 6=SYSTEM_WARN, 8=SYSTEM_NOTIF, 10=NEW_FEATURE, 11=PROMO_FEATURE, 13=ACCOMPLISHMENT, 15=MARKETING_BLAST, 20=PARTNER_BLAST, 100=OTHER
imageName String the name of the main image for this notice, if any
badgeIconName String the name of a small image that represent the icon or hilight of the notice, if any

Examples

* Retrieves all of the user notices including the hidden ones.

curl -v -H "Accept: application/xml" "https://api.youmail.com/api/v4/campaign/bulletin/notice/true?authtoken=sdfijdslfj"

<bulletin>
  <notice>
    <campKey>mb_full</campKey>
    <title>Your Mailbox is Full!</title>
    <body>Your callers may not be able to leave you messages until you delete some or upgrade to a larger mailbox!</body>
    <createTime>1406918440000</createTime>
    <campMsgType>3</campMsgType>
    <sponsor>YouMail Admin</sponsor>
    <campUserStatus>2</campUserStatus>
    <appActionKey>mb_full</appActionKey>
    <hidden>false</hidden>
    <bulletinType>1</bulletinType>
    <imageName>inbox_full</imageName>
    <badgeIconName>alert</badgeIconName>
  </notice>
</bulletin>

Hide/Show Notice

User may chose to temporary hide a particular notice from view.

To use this mechanism, first authenticate, then perform an HTTP PUT to this URL:

PUT https://api.youmail.com/api/v4/campaign/{String campKey}/bulletin/notice/hide

PUT https://api.youmail.com/api/v4/campaign/{String campKey}/bulletin/notice/show

Mark VIEWED

For campaign pushes, the server expects to be notified when the user has “viewed” the campaign materials. For example, for “call verification” campaign, the user maybe presented with the pages needed to complete this action. The “appActionKey” on each notice/campaign is the action that should be taken. If the user has been taken to see the campaign materials (whether they successfully complete it or not), the following api method show be executed. Note, when the user is sent to the server web page as specified via “appActionKey” of “url”, the “viewed” will already be triggered on the server and additional action is not required. The optional “value” is campaign specific and is used to specified how the “view” was triggered.

To use this mechanism, first authenticate, then perform an HTTP PUT to this URL:

PUT https://api.youmail.com/api/v4/campaign/{string campKey}/viewed/{String value}

Mark ACCEPTED

Similarly to “Mark VIEWED”, the server expects to be notified on completion of campaign action. The following api method should executed after the user has completed the campaign action (successful or not). The optional “value” is campaign specific and maybe used to specified success or failure.

To use this mechanism, first authenticate, then perform an HTTP PUT to this URL:

PUT https://api.youmail.com/api/v4/campaign/{string campKey}/accepted/{String value}
apiv4/bulletin_board.txt · Last modified: 2016/05/19 15:50 (external edit)

Page Tools