Recent Communication Inbox


This request returns a list of contacts that are contacted recently.
The response data is always in descending order.

Per contact you will see:
- the contact information (this is an addressable object or an address field with the contact name/number, if both are filled then the addressable object is preffered to identify the contact).
- if the contact has an linked organisation, then the organisation object is also added
- the last communication item.
- how many new items there are.

The last communication item always have a from addressee so you can determine the actual sender of the communication, normally this is the same as the contact addressable/addressee but there are some exceptions (like group chat)

When there 1 or more new communication items of one contact the value known as notificationsCount is filled, you can use this value to display the number of new communications.

If new chat messages are returned, the corresponding chat session delivery date of this user is updated.

Resource

GET /communications/recent[?parameters]

Parameters

Name Type Description

limit

Integer

The maximum number of contacts to return. Default: 15.

period

Integer

The number of days that are returned, for example when 7 is selected the recent contacts of the last 7 days are shown. Default: 14.

before

Date

Retrieve contacts before this date. Default: current date.

where

[String]

seperate by comma if you want to filter multiple fields

Additional search fields where=[filters], current filters are supported:

-voicemail=[true/false] → filter out voicemail messages
-incoming=[true/false] → filter out incoming or outgoing
-retrieved=[true/false] → filter out retrieved
-displayed=[true/false] → filter out displayed
-flagged=[true/false] → filter out flagged
-obj_type=[object type] → filter on object type (XCCUserChat,CallLog,SMSMessage,XCCMessage)
-phoneLine=[phone line oid] → filter by phone line

include

[String]

seperate by comma if you want to include multiple fields

Include fields in the results:

-The option attachments, include=attachments, includes the attachments of the communications.
-The option attachments + thumbnails, include=attachments,thumbnails, includes the attachments of the communications with the base64 of the thumbnail.
-The option messageReferences, include=messageReferences, includes the message references of the communications.
-The option transferredCommunications, include=transferredCommunications, includes the transferred from and transferred to communication objects of the communications.

ignore_processed_contacts

Ignore contacts where the last communication is processed.

only_missed_calls

Only show contacts with missed incoming calls.

Payload

None

Response

Context

Authorization

User

Errors

Example

Request
GET https://xelion.nl/api/v1/master/communications/recent?limit=2&period=7
Response
{
    "data": [
        {
            "object": {
                "addressable": {
                    "iconId": "20822846",
                    "commonName": "Kees Koopman",
                    "oid": "20822437",
                    "objectType": "Person"
                },
                "organisation": {
                    "iconId": "2063017",
                    "commonName": "Xelion",
                    "oid": "1650916",
                    "objectType": "Organisation"
                },
                "lastCommunication": {
                    "date": "2017-09-27 22:06:43",
                    "durationSec": 10,
                    "status": "Answer",
                    "incoming": true,
                    "retrieved": false,
                    "displayed": false,
                    "flagged": false,
                    "voicemail": false,
                    "voicemailIsHeard": false,
                    "hasAttachment": false,
                    "hasMessageReference": false,
                    "hasInlineAttachment": false,
                    "contentSummaryIsComplete": true,
                    "participants": [
                        {
                            "commonName": "909",
                            "role": "rtFrom",
                            "address": "909",
                            "addressable": {
                                "iconId": "20822846",
                                "commonName": "Kees Koopman",
                                "oid": "20822437",
                                "objectType": "Person"
                            },
                            "oid": "22505988",
                            "objectType": "Addressee"
                        },
                        {
                            "commonName": "411",
                            "role": "rtTo",
                            "address": "411",
                            "addressable": {
                                "iconId": "10872096",
                                "commonName": "Jan Janssen",
                                "oid": "1389401",
                                "objectType": "Person"
                            },
                            "oid": "22505977",
                            "objectType": "Addressee"
                        }
                    ],
                    "afterCallType": "Complaint",
                    "commonName": "Jan Janssen <- Kees Koopman, 2017-09-28",
                    "oid": "22505976",
                    "objectType": "CallLog"
                },
                "notificationsCount": 1
            },
            "links": [
                {
                    "rel": "self",
                    "href": "https://www.xelion.nl/api/v1/master/addressables/20822437",
                    "method": "GET"
                }
            ]
        },
        {
            "object": {
                "address": "Support",
                "lastCommunication": {
                    "date": "2017-09-27 22:03:16",
                    "durationSec": 10,
                    "status": "Answer",
                    "incoming": true,
                    "retrieved": false,
                    "displayed": false,
                    "flagged": false,
                    "voicemail": false,
                    "voicemailIsHeard": false,
                    "hasAttachment": false,
                    "hasMessageReference": false,
                    "hasInlineAttachment": false,
                    "contentSummaryIsComplete": true,
                    "participants": [
                        {
                            "commonName": "411",
                            "role": "rtTo",
                            "address": "411",
                            "addressable": {
                                "iconId": "10872096",
                                "commonName": "Jan Janssen",
                                "oid": "1389401",
                                "objectType": "Person"
                            },
                            "oid": "22495023",
                            "objectType": "Addressee"
                        },
                        {
                            "commonName": "Support",
                            "role": "rtFrom",
                            "address": "245",
                            "oid": "22495036",
                            "objectType": "Addressee"
                        }
                    ],
                    "afterCallType": "Complaint",
                    "commonName": "Jan Janssen <- Support, 2017-09-28",
                    "oid": "22495022",
                    "objectType": "CallLog"
                },
                "notificationsCount": 1
            },
            "links": [
                {
                    "rel": "self",
                    "method": "GET"
                }
            ]
        }
    ],
    "meta": {
        "links": [
            {
                "rel": "refresh",
                "href": "https://www.xelion.nl/api/v1/master/communications/recent?limit=2&period=7",
                "method": "GET"
            },
            {
                "rel": "previous",
                "href": "https://www.xelion.nl/api/v1/master/communications/recent?before=2017-09-26",
                "method": "GET"
            }
        ],
        "paging": {
            "previousId": "2017-09-19"
        }
    }
}