EndPreviousNextEnd EndPrint This TopicEnd

GetUnreadNotifications

The GetUnreadNotifications webservice is similar to the GetAllNotifications webservice, but it will return only notifications which haven’t been flagged as read

Unlike the GetUnreadNotifications webservice, the GetAllNotifications webservice has no paging options

 

Data to be passed to the webservice

Variable name

Data type

Description

authToken

String

The (logged in) authentication token for your session

 

Data which is returned

Variable name

Data type

Description

notifications

A list of Notification objects

A list of the notifications, ordered by their creation date descending

pageNumber

Integer

The page number (starting at 1)

pageSize

Integer

The number of notifications which are in each page

notificationsCount

Integer

The total number of notifications for all pages

errorCode

String

If your request was successful, the errorCode will be 0

If your request had a problem, there will be an error code for each kind of problem

errorMessage

String

A description of the problem with your error request (if there was a problem)

If your request was successful, this will be an empty string

 

Example XML for a GetUnreadNotifications request

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <GetUnreadNotifications xmlns="http://contegro.com/">

      <authToken>14ffdfd6-78c3-4fc0-9c63-3902011640af</authToken>

    </GetUnreadNotifications>

  </soap:Body>

</soap:Envelope>

 

 

Example XML which is returned

<?xml version="1.0" encoding="utf-8"?>

<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <GetUnreadNotificationsResponse xmlns="http://contegro.com/">

      <GetUnreadNotificationsResult>

        <notifications>

            <Notification>

                <type>

                    <name>Announcements</name>

                    <color>ff0000</color>

                </type>

                <publishDate>2016-06-07T11:06:45.257</publishDate>

                <title>Announcement regarding your account</title>

                <text>Lorem ipsum dolor sit amet, consectetur adipiscing elit. In aliquam tortor tortor, in consequat felis euismod nec. Vivamus pulvinar tincidunt lacus, eget mollis justo pretium vel</text>

                <read>false</read>

                <uniqueIdentifier>11341_2606</uniqueIdentifier>

            </Notification>

            <Notification>

                <type>

                    <name>Contegro news</name>

                    <color>00ff00</color>

                </type>

                <publishDate>2016-06-01T13:50:25.145</publishDate>

                <title> Contegro news update </title>

                <text>Fusce ac massa sit amet metus porttitor dignissim ut eget felis. Praesent rhoncus interdum tristique. Suspendisse vestibulum ex vel ultrices posuere. Pellentesque tempus gravida ipsum, vel rutrum sapien pulvinar et</text>

                <read>false</read>

                <uniqueIdentifier>11342_2606</uniqueIdentifier>

            </Notification>

        </notifications>

        <pageNumber>1</pageNumber>

        <pageSize>2</pageSize>

        <notificationsCount>20</notificationsCount>

        <errorCode>0</errorCode>

        <errorMessage></errorMessage>

      </GetUnreadNotificationsResult>

    </GetUnreadNotificationsResponse>

  </soap:Body>

 

Topic Link