Skip to content

updateScheduledNotification ​

Updates a "single" scheduled notification that has not yet been sent.

Response Fields ​

FieldTypeDescription
versionIntegerCurrently supported version is 1.
notificationScheduleIdIntegerThe primary key of the created record.
companyIdIntegerThe company id that this record relates to.
broadcastTypeString(2)The type of broadcast: GE - Generic Events notification, GT - Generic Team Push Notification.
keyCompanyIdIntegerThe key of the company id when broadcastType=GT as sent in original request - should match companyId.
keyEventUUIDIntegerThe key of the event UUID when broadcastType=GE as sent in original request.
scheduleTimezoneIdString(40)The timezone id of the scheduled notification.
scheduleLocalDateTimeDatetimeThe local date/time in the timezone this notification will be sent.
scheduleJobNameString(100)The name of a previously configured job to run on the SAM server.
messageString(1000)The plain text message to be sent.
urlString(1024)The optional URL to be sent in the notification (deeplink or normal).
valueIdsArray of StringsTeam ids to send this notification to. Must belong to companyId. Can also be Product Codes for Pfizer Stock status notifications.
brochureIdNumberOnly used when the API caller wants to honour User unsubscribes via the ALP (Asset Level Preferences) ALP-NUN (Notification Unsubscribe) and ALP-EUN (Email Unsubscribe).
emailTemplateString(100)Only used when an email is required to be sent along with the notification.
emailSubjectString(256)Only used when an email is required to be sent along with the notification. MUST be present if emailTemplate is present.
emailParamsArray of Param objectsAn array of objects representing both "generic (common)" and "personalised (user-specific)" params. Each param object contains key [String(100)] and value [String(2000)].

NOTE: the combined length of message + url cannot exceed 2000 characters.

Request ​

http
PUT /rest/notification/scheduled

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth token returned from loginUser

Parameters ​

SAMPLE REQUEST

NOTE: broadcastType, companyId, keyCompanyId, and keyEventUUID cannot be updated.

PUT /rest/notification/schedule

json
{
  "version": 1,
  "valuesIds": [
    "7"
  ],
  "message": "Updated message and date/time",
  "notificationScheduleId": 23,
  "url": "http://google.com",
  "scheduleTimezoneId": "Australia/Sydney",
  "scheduleLocalDateTime": 1567662973000
}

Response ​

200 OK ​

SAMPLE RESPONSES

json
{
  "notificationScheduleId": 23,
  "companyId": 3,
  "broadcastType": "GT",
  "keyCompanyId": 3,
  "scheduleTimezoneId": "Australia/Sydney",
  "scheduleLocalDateTime": 1567662973000,
  "message": "Updated message and date/time",
  "url": "http://google.com",
  "valueIds": [
    7
  ]
}
json
{
  "notificationScheduleId": 242,
  "companyId": 3,
  "broadcastType": "GT",
  "keyCompanyId": 3,
  "scheduleTimezoneId": "Pacific/Auckland",
  "scheduleLocalDateTime": 1585046524000,
  "message": "Test Me",
  "url": "URL",
  "valueIds": [
    "123",
    "456"
  ],
  "emailTemplate": "EmailTemplate",
  "emailSubject": "EmailSubject",
  "emailParams": [
    {
      "key": "emailBody",
      "value": "My Body"
    },
    {
      "key": "emailSubject",
      "value": "My Subject"
    }
  ]
}

Errors ​

ExceptionDescription
WSInvalidParameterExceptionSee Error Definitions
WSUnsupportedVersionExceptionSee Error Definitions
WSInvalidAuthTokenExceptionSee Error Definitions
WSCacheServiceExceptionSee Error Definitions
WSInsufficientPrivilegesExceptionSee Error Definitions
WSEventCancelledExceptionSee Error Definitions
WSEventNotFoundExceptionSee Error Definitions
WSEventServiceExceptionSee Error Definitions
WSNotificationServiceExceptionSee Error Definitions