Skip to main content

Notifications

The asynchronous notifications are processed periodically by a dedicated system and stored as a queue. Each of these notifications is assigned a cursor (i.e. unique ID), that allows the system to identify it and know which notifications are older and which ones are newer in the list. Delta methods allow you to retrieve the list of notifications triggered since a given cursor.

If an External system wishes to use the Deltas solution, it has to:

  • Call once the Latest Cursor method in order to initialize the starting point of the notifications it has to process.
    • Get the result as the starting cursor value.
  • Call periodically the Get Delta method in order to get the list of notifications triggered since a given cursor.
    • The very first call to this method will have to be made with the cursor initialized from the Latest Cursor method call.
    • This method can return an array of notifications to be processed.
    • Everytime one of these notifications is processed by the External system, its related cursor becomes the value to be used as the last processed cursor.
    • Use this new cursor value next time the Get Delta method is called, so that the already processed notifications are not returned anymore.
warning

Webhooks are necessary in order for the delta notifications system to work.


Delta Notification methods

Latest Cursor

Returns the lastest cursor from all the available delta async notifications.

Method

GETGET /api/externals/v1/notification/latestCursor

Arguments

(none)

Body

(none)

Response

The service returns a JSON message with the latest cursor :

{
"success": boolean,
"message": string,
"latestCursor": string,
}

Get Delta

Returns the delta notifications starting from the specified cursor.

Method

GETGET /api/externals/v1/notification/deltaNotification

Arguments

  • cursor (string): the cursor from which delta notifications are requested

Body

(none)

Response

All the delta nofifications from the specified cursor :

{
"lastCursor": string,
"notifications": [
{
"cursor": string,
"notificationDate": string,
"eventType": string,
"entityTypeID": long,
"entityID": long
}
],
"success": boolean,
"message": string,
"rowCount": long,
"errorCode": string,
"errorLevel": long
}
note

The lastCursor tag is equal to the cursor value of the last notification returned in the list.

Known error codes

Error CodeDescription
NOTIFICATION_DELTA_CURSOR_NOT_FOUNDThe specified cursor value is invalid or obsolete.