Notification Management

REL-ID SDK: Notifications API Documentation

📘 Notifications Module Overview

This module enables mobile applications to interact with REL-ID’s secure notification system. Notifications serve as real-time, user-actionable prompts generated by enterprise servers for various workflows such as transaction approval, device verification, or risk acknowledgment.

Features

  • Securely fetch pending notifications
  • Allow users to respond with predefined actions
  • Retrieve and display historical notification decisions
  • Support for digital signing of sensitive notifications
  • Multi-language content rendering

APIs Included

  • GetNotifications: Fetch active/pending notifications
  • UpdateNotification: Send user’s response to server
  • GetNotificationHistory: View past notification responses

✨ Overview

The Notifications feature in the REL-ID SDK allows enterprises to deliver actionable alerts to users. These notifications may require user response (e.g., Accept/Reject/Fraud) and can be digitally signed. The SDK supports:

  • Fetching active notifications
  • Updating notification responses
  • Viewing historical notification actionsNotifications typically support workflows like device approval, transaction validation, or threat response.

🔄 Simple Notification Workflow

graph TD
    A[User logs in] --> B[SDK fetches active notifications using GetNotifications]
    B --> C[UI displays list of pending notifications]
    C --> D[User taps on an action: Accept / Reject / Fraud]
    D --> E[SDK sends UpdateNotification to server]
    E --> F[onUpdateNotification confirms result]
    F --> G[Show success or error message to user]
    G --> H[User optionally views old notifications using GetNotificationHistory]
    H --> I[onGetNotificationsHistory returns results for audit display]

💻 User Interface Requirement

Notification Screen UI should include:

  • A list of active notifications
  • Message and subject (multi-language support)
  • Response buttons as per available actions (Accept/Reject/Fraud)
  • Indicators for expiry and digital signing status
  • A separate screen/tab for notification history

🚀 API Usage Flow

1. Get Active Notifications

API: GetNotifications

Purpose

Fetch a paginated list of active (pending) notifications for the authenticated user.

Parameters

recordCount: number // Set 0 for all
enterpriseID: string // Optional
startIndex: number // e.g., 1
startDate: string // Optional, format yyyy-MM-dd'T'HH:mm:ssz
endDate: string // Optional, format yyyy-MM-dd'T'HH:mm:ssz

Event: onGetNotifications

Triggered when the active notification list is received.

{
  "response": {
    "ResponseData": {
      "notifications": [
        {
          "notification_uuid": "uuid",
          "ds_required": false,
          "actions": [
            { "label": "Accept", "action": "accept", "authlevel": 0 },
            { "label": "Reject", "action": "reject", "authlevel": 0 }
          ],
          "body": [
            { "lng": "English", "subject": "Title", "message": "You are attempting to..." }
          ]
        }
      ]
    }
  }
}

2. Respond to a Notification

API: UpdateNotification

Purpose

Post user's response (e.g., Accept/Reject) for a specific notification.

Parameters

notificationID: string // UUID from notification
response: string // Action value like "accept", "reject"

Event: onUpdateNotification

Triggered when the server acknowledges the update.

{
  "response": {
    "ResponseData": {
      "status_code": 100,
      "message": "Success",
      "notification_uuid": "uuid",
      "is_ds_verified": false
    }
  }
}

3. View Notification History

API: GetNotificationHistory

Purpose

Retrieve previously responded, expired, or cancelled notifications.

Parameters

recordCount: number // 0 for all
enterpriseID: string // Optional
startIndex: number // From 1
startDate: string // Optional
endDate: string // Optional
notificationStatus: string // UPDATED, EXPIRED, etc.
actionPerformed: string // Optional
keywordSearch: string // Optional
deviceID: string // Optional

Event: onGetNotificationsHistory

Triggered with an array of historical notification records.

{
  
  "response": {
    "ResponseData": {
      "history": [
        {
          "notification_uuid": "uuid",
          "status": "EXPIRED",
          "signing_status": "NA",
          "actions": [...],
          "body": [...]
        }
      ]
    }
  }
}

📊 Key Payload Fields

| Field | Description ||-------|-------------|| notification_uuid | Unique identifier for the notification | | ds_required | Whether digital signature is required | | is_ds_verified | Was the signature verified? | | status (history) | UPDATED, EXPIRED, TAMPERED, etc. | | signing_status | Verified, Failed, NA | | actions[] | Available responses for the notification | | body[] | Localized subject/message |

🔧 Multiple Value Definitions

| Field | Values | Meaning ||-------|--------|---------|| status | UPDATED<br>EXPIRED<br>TAMPERED<br>DISMISSED<br>DISCARD<br>CANCELLED | Final state of the notification | | signing_status | Verified<br>Failed<br>NA | Signature verification result |


⚠️ Error Codes & Actions

CodeMeaningAction
0SuccessProceed
4Invalid argumentsShow error dialog, retry
39Unknown errorReport/log and alert user
141User is blockedNotify and halt further steps

✅ Success & ❌ Failure Handling

On Success:

  • Refresh UI with new data (for Get/History)
  • Show confirmation message (for Update)

On Failure:

  • Display user-friendly error
  • Log error response for troubleshooting

⚙️ Event → API Mapping

EventUse CaseAPI to Call
onGetNotificationsNotification list receivedShow UI list
onUpdateNotificationAcknowledge user actionConfirm update
onGetNotificationsHistoryShow past notificationsRender audit trail

📑 Platform Code Snippets

📠 React Native
RdnaClient.getNotifications(0, '', 1, '', '');
RdnaClient.updateNotification(notificationID, 'accept');
RdnaClient.getNotificationHistory(0, '', 1, '', '', '', '', '', '');
🤖 Flutter
rdnaClient.getNotifications('0', '', '1', '', '');
rdnaClient.updateNotification(notificationID, 'accept');
rdnaClient.getNotificationHistory('0', '', '1', '', '', '', '', '', '');
👾 Cordova
com.uniken.rdnaplugin.RdnaClient.getNotifications(success, error, [0, '', 1, '', '']);
com.uniken.rdnaplugin.RdnaClient.updateNotification(success, error, [notificationID, 'accept']);
com.uniken.rdnaplugin.RdnaClient.getNotificationHistory(success, error, [0, '', 1, '', '', '', '', '', '']);
🌐 Native iOS
[rDNAClient getNotifications:0 withEnterpriseID:@"" withStartIndex:1 withStartDate:@"" withEndDate:@""];
[rDNAClient updateNotification:@"notificationID" withResponse:@"accept"];
[rDNAClient getNotificationHistory:0 withEnterpriseID:@"" withStartIndex:1 withStartDate:@"" withEndDate:@"" withNotificationStatus:@"" withActionPerformed:@"" withKeywordSearch:@"" withDeviceID:@""];
💻 Native Android
rDNAClient.getNotifications(0, "", 1, "", "");
rDNAClient.updateNotification("notificationID", "accept");
rDNAClient.getNotificationHistory(0, "", 1, "", "", "", "", "", "");