Get Conversations - Early Access

Resource

https://api.infobip.com/ccaas/1/conversations

Parameters

Use this method to get a list of conversations with pagination and filtering option. Using the filter is optional. The result can be filtered by one or many optional filters described in parameters.

Property name Type Description
limit integer Size of the result page. If a limit count is given, no more than that many rows will be returned (but possibly less, if the query itself yields fewer rows). The default value is 10, the max value is 999.
page integer

This parameter says to skip that many rows before beginning to return rows. If both page and limit appear, then page rows are skipped before starting to count the limit rows that are returned. The default value is 0.

orderBy string

This parameter is used to order your results. If an order is not given, the default order id:asc will be applied. Possible ordering fields are properties. Ordering direction can be specified with modifiers asc for the ascending ordering or desc for the descending one.

conversationIds array of strings

Optional filter. List of conversations Id to match result.

queueIds array of strings

Optional filter. List of queues Id to match result.

agentId

string

Optional filter. List of agents Id to match result.

status

string

Optional filter. Match any of status with result. Possible values: OPEN, WAITING, SOLVED, CLOSED.

priority

string

Optional filter. Match any of priority with result. Possible values: URGENT, HIGH, NORMAL, LOW.

createdAfter datetime

Optional filter. Filter result with created after dateTime. Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ

createdBefore datetime

Optional filter. Filter result with created before dateTime. Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ

updatedAfter datetime

Optional filter. Filter result with updated after dateTime. Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ

updatedBefore datetime

Optional filter. Filter result with updated befor dateTime. Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ

closedAfter datetime Optional filter. Filter result with closed after dateTime. Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ
closedBefore datetime Optional filter. Filter result with closed before dateTime. Format: yyyy-MM-dd'T'HH:mm:ss.SSSZ
tagNames array of strings Optional filter. List of tags names to match result.

 

Request Example

					GET /ccaas/1/conversations HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==
					
				

Response

					{
    "conversations": [
        {
            "id": "37B93F4D2BA3C58B58526EAEAA1AB35C",
            "topic": "Conversation default",
            "summary": null,
            "status": "OPEN",
            "priority": "NORMAL",
            "queueId": null,
            "agentId": null,
            "createdAt": "2019-04-24T11:25:41.058+0000",
            "updatedAt": "2019-04-24T11:25:41.058+0000",
            "channel": "NO_CHANNEL"
        },
        {
            "id": "9F1F21C198025CC026956A7E2E9C560F",
            "topic": "API help",
            "summary": "API not working properly",
            "status": "OPEN",
            "priority": "HIGH",
            "queueId": "FBDDA7F8B33417374ACC02F5265527E6",
            "agentId": "F66D67327326FCCB027BEAA916B94542",
            "createdAt": "2019-04-24T11:25:41.058+0000",
            "updatedAt": "2019-04-24T11:25:41.058+0000",
            "channel": "SMS"
        },
        {
            "id": "573711510E1C002E29679B12C7CB48AE",
            "topic": "Regular purchase",
            "summary": "Happy customer",
            "status": "CLOSED",
            "priority": "NORMAL",
            "queueId": "FBDDA7F8B33417374ACC02F5265527E6",
            "agentId": "6298AA7707903A4ED680B436929681AD",
            "createdAt": "2019-04-24T11:25:41.058+0000",
            "updatedAt": "2019-04-28T10:21:41.050+0000",
            "closedAt": "2019-04-28T10:21:41.050+0000",
            "channel": "SMS"
        }	
    ],
    "pagination": {
        "totalItems": 2,
        "page": 0,
        "limit": 10,
        "orderBy": "id:ASC"
    }
}
					
				
					{
    "statusCode": "ERROR",
    "message": "Page size must not be less than one!"
}
					
				

Additional example

Request example: Searching for conversations with priority "LOW", status "OPEN" and created before 22.05.2019. The result must be sorted by date of conversation creation in ascending order.

GET /ccaas/1/conversations?priority=LOW&status=OPEN&createdBefore=2019-05-22T00:00:00.000+0000&orderBy=createdAt:asc HTTP/1.1
Host: api.infobip.com
Authorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==	
  

Response:

{
    "conversations": [
        {
            "id": "353FCADE465A264DF9CB484EFABF5C14",
            "topic": "Talking with 38598886555",
            "summary": "IMR Engines",
            "status": "OPEN",
            "priority": "LOW",
            "queueId": "A916B94542001A33NT0006FCCB027BEA",
            "agentId": "001A33NT0006FCCB027BEAA916B94542",
            "createdAt": "2019-04-16T11:34:12.159+0000",
            "updatedAt": "2019-07-10T07:16:19.234+0000",
            "channel": "WHATSAPP"
        },
        {
            "id": "185FF66424AF821CF3F6E6C70CAB9CBE",
            "topic": "Talking with Jamie Smith",
            "summary": "Maybe they are in forest",
            "status": "OPEN",
            "priority": "LOW",
            "queueId": "A916B94542001A33NT0006FCCB027BEA",
            "agentId": "B94542001A33NT0006FCCB027BEAA916",
            "createdAt": "2019-04-16T11:37:35.693+0000",
            "updatedAt": "2019-04-30T05:59:33.709+0000",
            "channel": "SMS"
        },
        {
            "id": "1233C16E3C27DB5B3CD65123355C0D4F",
            "topic": "Talking with Magic Johnson",
            "summary": "Basketball",
            "status": "OPEN",
            "priority": "LOW",
            "queueId": "CCB027BEA916B94542001A33NT0006FA",
            "agentId": "001A33NT0006FCCB027BEAA916B94542",
            "createdAt": "2019-04-18T06:54:51.466+0000",
            "updatedAt": "2019-04-18T06:54:51.466+0000",
            "channel": "VIBER"
        }
    ],
    "pagination": {
        "totalItems": 3,
        "page": 0,
        "limit": 10,
        "orderBy": "createdAt:ASC"
    }
}