Developer Center

Notifications API

Last Updated: Feb 20, 2017 04:12PM CET

URL

/api/notifications/messages/search
/api/notifications/messages

Description

Allows you to get the communications history via API and re-send failed notification messages via API.

Methods

POST Search

Get the communications history by the specified filter

Parameters

Parameter Value
filterSelection The field on which the constraint will be applied. For custom fields the custom field encoded key must be provided.
filterElement The constraint operator. Available filter elements can be found below.
value The constraint value. Required for filter elements with one or two values.
secondValue The constraint second value. Required for filter elements with two values.
dataItemType The entity where the field on which to apply the constraint is located. If the field is located in the same entity with the entity being searched, this field is optional.
dataFieldType NATIVE(default)/CUSTOM for custom field searches

Available notification message filter values

Filter Selection Parameter Data Type
SENDER_KEY KEY
RECIPIENT_CLIENT_KEY KEY
RECIPIENT_GROUP_KEY KEY
RECIPIENT_USER_KEY KEY
ENCODED_KEY KEY
CREATION_DATE DATE_UTC
SENT_DATE DATE_UTC
STATE ENUM
FAILURE_REASON ENUM
DESTINATION STRING
TYPE ENUM
EVENT ENUM

Filter Elements

Filter Element Number Of affected values Available for
EQUALS ONE_VALUE BIG_DECIMAL,BOOLEAN,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY
MORE_THAN ONE_VALUE BIG_DECIMAL,NUMBER,MONEY
LESS_THAN ONE_VALUE BIG_DECIMAL,NUMBER,MONEY
BETWEEN TWO_VALUES BIG_DECIMAL,NUMBER,MONEY,DATE,DATE_UTC
ON ONE_VALUE DATE,DATE_UTC
AFTER ONE_VALUE DATE,DATE_UTC
BEFORE ONE_VALUE DATE,DATE_UTC
STARTS_WITH ONE_VALUE STRING
IN LIST ENUM,KEY
TODAY NO_VALUE DATE,DATE_UTC
THIS_WEEK NO_VALUE DATE,DATE_UTC
THIS_MONTH NO_VALUE DATE,DATE_UTC
THIS_YEAR NO_VALUE DATE,DATE_UTC
LAST_DAYS ONE_VALUE DATE,DATE_UTC
EMPTY NO_VALUE BIG_DECIMAL,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY,DATE,DATE_UTC
NOT_EMPTY NO_VALUE BIG_DECIMAL,LONG,MONEY,NUMBER,PERCENT,STRING,ENUM,KEY,DATE,DATE_UTC

Usage examples

// Get notifications sent when the loan account was created
POST Formatted JSON Data
{
   "filterConstraints":[
      {
         "filterSelection":"EVENT",
         "filterElement":"EQUALS",
         "value":"LOAN_CREATED"
      }
   ]
} /api/notifications/messages/search

// Get failed webhook notifications
POST {
   "filterConstraints":[
      {
         "filterSelection":"TYPE",
         "filterElement":"EQUALS",
         "value":"WEB_HOOK"
      },
      {
         "filterSelection":"STATE",
         "filterElement":"EQUALS",
         "value":"FAILED"
      }
   ]
} /api/notifications/messages/search

// Get all successful notifications sent to a particular user
POST {
   "filterConstraints":[
        { 
            "filterSelection":"RECIPIENT_USER_KEY",
            "filterElement":"EQUALS",
            "value":"40288011560e37a701560e3aef030483"
        },
        { 
            "filterSelection":"STATE",
            "filterElement":"EQUALS",
            "value":"SENT"
        }
   ]
} /api/notifications/messages/search

Response

A 200 OK response will be issued with an array of notifications.
[
   {
      "encodedKey":"8a0991f14de54ed1014de768d4a40c18",
      "creationDate":"2015-06-12T10:55:16+0000",
      "sendDate":"2015-06-12T10:55:17+0000",
      "type":"WEB_HOOK",
      "state":"SENT",
      "destination":"http://requestb.in/r0sdq1r0",
      "event":"LOAN_CREATED",
      "body":"Demo body content"
   },
   {
      "encodedKey":"8a09babc4d9d34b9014d9f35a9580530",
      "creationDate":"2015-05-29T10:26:43+0000",
      "sendDate":"2015-05-29T10:26:44+0000",
      "type":"WEB_HOOK",
      "state":"SENT",
      "destination":"https://example.com/webhook",
      "event":"LOAN_CREATED",
      "body":"Demo body content"
   }
]

POST Re-send failed notification messages

Re-send failed notification messages of any type (SMS/Email/WebHook) for the specified notification message encoded keys. It allows posting one notification or bulk notifications in the same API call

Parameters

Parameter Value
action The action type of this API call. Its value should be "resend". Required.
identifiers By this parameter you can specify an array of one or more encoded keys to re-send of failed notification messages. Duplicated encoded keys are not allowed. Required.

Notes

The user requires "Resend Failed Messages" permission in order to send the failed notifications.

Usage examples

// Re-send one failed notification message
POST {
   "action":"resend",
   "identifiers":[
      "8a80808a5317de22015317de5b94034c"
   ]
} /api/notifications/messages

// Re-send in bulk more failed notification messages
POST {
   "action":"resend",
   "identifiers":[
      "8a80808a5317de22015317de5b94034c",
      "8a80806852f38c860152f38de0ad0019",
      "8a80806852f38c860152f38de0ad0023"
   ]
} /api/notifications/messages

Response

A 200 OK response will be issued.
{
  "returnCode": 200,
  "returnStatus": "SUCCESS"
}
support@mambu.com
https://cdn.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete