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 |
---|---|---|
|
Integer |
The maximum number of contacts to return. Default: 15. |
|
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. |
|
Date |
Retrieve contacts before this date. Default: current date. |
|
[String] |
Additional search fields where=[filters], current filters are supported: |
|
[String] |
Include fields in the results: |
|
Ignore contacts where the last communication is processed. |
|
|
Only show contacts with missed incoming calls. |
Payload
None
Response
List Response < Contact >
Context
Authorization |
User |
Errors
Example
GET https://xelion.nl/api/v1/master/communications/recent?limit=2&period=7
{
"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"
}
}
}