Bold360 and BoldChat Developer Center

Retrieve inactive chats for a given folderID

This pseudocode example iterates over a list of folders and retrieves the inactive chats associated with each folder as a paginated JSON object.

Note: The getFolders, getInactiveChats and getChatMessages methods correspond to the following cURL commands:
Method cURL command
getFolders
curl "https://api.boldchat.com/aid/$accountId/data/rest/json/v1/getFolders?auth=$authHash"
getInactiveChats
curl "https://api.boldchat.com/aid/$accountId/data/rest/json/v1/getInactiveChats?FolderID=$folderID&auth=$authHash"
Note: Replace $folderID with the ID of the folder you want to query.
getChatMessages
curl "https://api.boldchat.com/aid/$accountId/data/rest/json/v1/getChatMessages?ChatID=$chatID&auth=$authHash"
Note: Replace $chatID with the ID of the chat you want to query.

folders = getFolders
foreach folder in folders
{
    parameters = folder.FolderID & date range
    Do
    {
        if chats has value
        parameters = chats.Next
        chats = getInactiveChats(parameters)
        foreach chat in chats
        {
            messages = getChatMessages()
            save chat transcript data
        }
    } while chats.Next is not null
}