Templates

Templates let you save pre-formatted messages for using it directly with holopush and A/B Test.

Template creation

POST https://exchange-prod-g.2mee.com/notification/stock

Create a message to be saved as template.

Query Parameters

NameTypeDescription

stockId

string

ID of the Hololibrary item. This is mandatory incase of HOLOPUSH

Request Body

NameTypeDescription

template

number

To be set as 1 for the message to be considered as a template

type

string

Type of message - HOLOPUSH/TEXT

appId

string

Application Id under which the template has to be created.

title

string

Appears as the title on the message created out of the template. This explains the purpose of notification.

subtitle

string

Appears as the subtitle on the message created from the template. This explains additional information about the notification.

text

string

The body that appears on the message. Content of the notification.

fbTitle

string

Fallback title for the notification in case media file cannot be downloaded.

fbSubtitle

string

Fallback subtitle for the notification in case media file cannot be downloaded.

fbText

string

Fallback text for the notification in case media file is not downloaded.

expiry

number

Duration from the playtime after which the notification expires. A text with content Sorry! Opportunity missed! appears in case the user opens the notification past expiry time.

about

array

URL of the targeted page can be provided. It acts as a deep link.

priority

string

The priority of the HoloPush notification. HIGH/MEDIUM/LOW in string format.

channel

string

Channel PUSH/PULL.By default it is considered as a PUSH

action

string

Action text is provided in the notification. Upon clicking on the action text deep link is opened (if provided).

{
    "appId": "bacb37d0-a51f-491b-bd68-489c245b8c16",
    "title": "Title of the Message",
    "subtitle": "SubTitle of the Message",
    "text": "Body of the Message",
    "action": "Open",
    "fbTitle": "FallBack Title of the Message",
    "fbSubtitle": "Fallback SubTitle of the Message",
    "fbText": "FallBack Text of the Message",
    "expiry": 1440,
    "playTime": null,
    "about": [],
    "filterId": "9e862fc2-e3b6-4420-bf63-80ad4368ec88",
    "priority": "MEDIUM",
    "favourite": 0,
    "type": "HOLOPUSH",
    "channel": "PUSH",
    "template": 1,
    "feature": null,
    "webTopic": [],
    "excludeFilterId": [],
    "smsInfo": null,
    "smsUsersList": null,
    "segment": null,
    "subType": null,
    "createdBy": "479cec74-767e-4ecb-9e6d-ee508cadbd75",
    "state": "NEW",
    "companyId": "6c445333-bac9-4ab0-a0b6-cc6838902abb",
    "messageTitle": null,
    "url": "https://secureexchange.s3.eu-geo.objectstorage.softlayer.net/58af7e42-16df-4a47-914c-190e90ee222b-e43b337a-575d-4964-a86c-f9cb21decea6-take-1.mp4",
    "id": "58af7e42-16df-4a47-914c-190e90ee222b",
    "size": 28867135,
    "tags": null,
    "holoTags": null,
    "parentMessageId": null,
    "holoPushAd": null,
    "jobId": "79e70e79-f515-4c50-a2d8-18e3703d1186",
    "holoPushUrl": null,
    "created": "2021-08-17T07:02:47.839+0000",
    "webActive": null,
    "abTestId": null
}
$ curl 'https://exchange-prod-g.2mee.com/notification/stock?stockId=' -i -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJ0ZXN0aW5ndGVhbUAybWVlLmNvbSIsImV4cCI6MTU4OTQ1NTc0OSwiaWF0IjoxNTg5NDM3NzQ5fQ.U2VtugGzqD0s9p0rUXaTxk8F5tHeMf5SB4ZRnYM8TV4QQm6y2FvdFIfD6kjQOhcYuPglSusAjVegzHqDKGgCqA' -d '{
  "appId" : "bacb37d0-a51f-491b-bd68-489c245b8c16",
  "title" : "Title of the Message",
  "subtitle" : "SubTitle of the Message",
  "text" : "Body of the Message",
  "action" : "Open",
  "fbTitle" : "FallBack Title of the Message",
  "fbSubtitle" : "Fallback SubTitle of the Message",
  "fbText" : "FallBack Text of the Message",
  "expiry" : 1440,
  "template" : 1,
  "about" : [],
  "favourite" : 0,
  "type" : "HOLOPUSH",
  "channel" : "PUSH"
  }'

Last updated