Skip to content

getScheduledNotifications ​

Retrieves a list of currently scheduled notifications that have been created using the sendNotification API.

Response Fields ​

FieldTypeDescription
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.
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
GET /rest/notification/scheduled

Headers ​

HeaderRequiredDescription
x-nextinteract-authtokenYesAuth token returned from loginUser

Parameters ​

SAMPLE REQUEST Team Notifications GET /rest/notification/scheduled?version=1&broadcastType=GT&companyId=3 Event Notifications GET /rest/notification/scheduled?version=1&broadcastType=ET&eventUUID=MY-d79f-EVENT-hdea67-UUID Single Notification GET /rest/notification/scheduled?version=1&notificationScheduleId

Response ​

200 OK ​

SAMPLE RESPONSE (array of)

json
[
  {
    "version": 3,
    "companyId": 3,
    "broadcastType": "GT",
    "keyCompanyId": 3,
    "scheduleTimezoneId": "Australia/Sydney",
    "scheduleLocalDateTime": 1584589293934,
    "scheduleJobName": "optionalJobName",
    "message": "This is a test of the emergency broadcast system.",
    "url": "https://my.interact.technology",
    "valueIds": [
      "5",
      "6",
      "7"
    ],
    "emailTemplate": "Client.3.TestCompany.Mandrill.html",
    "emailSubject": "Emergency Subject",
    "emailParams": [
      {
        "key": "emailLogoURL",
        "value": "https://www.clienturl.com/logo.jpg"
      },
      {
        "key": "userFirstName",
        "value": "userFirstName"
      },
      {
        "key": "emailDescription",
        "value": "This is the main message to be injected into my email template"
      },
      {
        "key": "emailLink",
        "value": "https://www.clienturl.com/link_to_resource.html"
      }
    ],
    "totalNotificationsSent": 235,
    "notificationLog": "Success",
    "scheduleCreated": 1584589293934,
    "scheduleCreatedBy": "654",
    "scheduleModified": 1584589293934,
    "scheduleModifiedBy": "721"
  },
  {
    "version": 3,
    "companyId": 3,
    "broadcastType": "GT",
    "keyCompanyId": 3,
    "scheduleTimezoneId": "Australia/Sydney",
    "scheduleLocalDateTime": 1584589293935,
    "scheduleJobName": "optionalJobName2",
    "message": "Forum Asset has been updated. Please refresh for the latest posts",
    "url": "https://my.interact.technology",
    "valueIds": [
      "5",
      "6",
      "7"
    ],
    "emailTemplate": "Client.3.TestCompany.Mandrill.html",
    "emailSubject": "Emergency Subject",
    "emailParams": [
      {
        "key": "emailLogoURL",
        "value": "https://www.clienturl.com/logo.jpg"
      },
      {
        "key": "userFirstName",
        "value": "userFirstName"
      },
      {
        "key": "emailDescription",
        "value": "This is the main message to be injected into my email template"
      },
      {
        "key": "emailLink",
        "value": "https://www.clienturl.com/link_to_resource.html"
      }
    ],
    "totalNotificationsSent": 0,
    "notificationLog": "InvalidParameterException('Some error message here'",
    "scheduleCreated": 1584589293935,
    "scheduleCreatedBy": "654",
    "scheduleModified": 1584589293935,
    "scheduleModifiedBy": "721"
  }
]

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