Get Last N Interactions for a Contact
| In the future, this route will be deprecated. We recommend that you use the Get a Specific Interaction endpoint. |
Use a GET request to retrieve a contact's last interactions. By default, the last 10 interactions are returned per page. Page 0 is the first page and is indexed. The interactions are returned in order, beginning with the most recent. You must have the CONTACTS_INTERACTION_HISTORY_READ permission in order to view a contact's historical interactions.
Request
Sample Request
curl GET https://api.cxengage.net/v1/tenants/<tenantID>/contacts/<contactID>/interactions
Request Parameters
The table below lists the parameters you can include in a request:
| Parameter | Required? | Type | Description |
|---|---|---|---|
| tenantId | yes | UUID | The tenant's unique identifier. |
| contactId | yes | UUID | The contact's unique identifier. |
| limit | no | integer | The maximum number of results to return per page. The default is 10. The maximum permitted is 100. |
| page | no | integer | The page that you want returned. By default, the first page is page 0 and it is indexed. |
Response
Sample Response
The request returns JSON structured like the example below:
{
"page": null,
"limit": 10,
"offset": 0,
"total": 2,
"results": [
{
"directionName": "Inbound",
"recording": null,
"endTimestamp": "2017-11-02T17:49:50.427Z",
"interactionId": "5e003dd5-d261-42fb-8895-edcb7071b0bb",
"customer": "+15064490906",
"note": 0,
"lastAgentId": "7a8c3cd0-82b2-11e7-b08f-6e56a766befb",
"lastQueueId": "3703e470-834a-11e7-b08f-6e56a766befb",
"channelName": "Voice",
"lastAgentName": "Don Smith",
"csat": null,
"lastDispositionName": null,
"startTimestamp": "2017-11-02T17:49:19.049Z",
"transcript": null,
"lastDispositionId": null,
"channelType": "voice",
"directionType": "inbound",
"lastQueueName": "Support"
},
{
"directionName": "Inbound",
"recording": null,
"endTimestamp": "2017-11-02T17:46:42.661Z",
"interactionId": "d5c63406-a585-415f-9785-066a35ca9331",
"customer": "+15064490906",
"note": 0,
"lastAgentId": "7a8c3cd0-82b2-11e7-b08f-6e56a766befb",
"lastQueueId": "3703e470-834a-11e7-b08f-6e56a766befb",
"channelName": "Voice",
"lastAgentName": "Don Smith",
"csat": null,
"lastDispositionName": null,
"startTimestamp": "2017-11-02T17:42:39.435Z",
"transcript": null,
"lastDispositionId": null,
"channelType": "voice",
"directionType": "inbound",
"lastQueueName": "Support"
}
]
}
Response Parameters
Your response may include statistics that are not described in this reference. For more information about the statistics that are returned, see the Data Dictionary. The table below lists and describes the parameters that can be returned in the response.
| Parameter | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| page | The page returned. By default, this is the first page which is page 0. | ||||||||||||||||||||||||||||||||||||||||
| limit | The maximum number of results permitted per page. By default, this is 10. If you requested a different number of pages in the request, that number is returned. | ||||||||||||||||||||||||||||||||||||||||
| offset |
Which interaction the request started returning results from. |
||||||||||||||||||||||||||||||||||||||||
| total | The total number of results. | ||||||||||||||||||||||||||||||||||||||||
| results |
A list of interactions and their details.
|