Views: 1543
Last Modified: 04.02.2022

"Reading" the list of notifications, excluding CONFIRM notification type

Revision Get current information about current API revision (platform version) – im.revision.get : 18

Parameters

Parameter Example Required Description Revision
IDS [1,2,3] Yes Array with notification IDs 30
ACTION 'Y' No Mark as read|unread (Y|N) 30


Called method and response

JavaScript

B24.callMethod(
  'im.notify.read.list',
  {
    IDS: [1,2,3],
    ACTION: 'Y'
  },
  res => {
    if (res.error())
    {
      console.error(result.error().ex);
    }
    else
    {
      console.log(res.data())
    }
  }

Response example

true

Response example on error

{
  "error": "PARAMS_ERROR",
  "error_description": "No IDS param or it is not an array"
}

Key description:

  • error – error code
  • error_description – error brief description

Possible error codes

Code Description
PARAMS_ERROR Parameter IDS not passed or is not an array




Courses developed by Bitrix24