Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The API service returns the transcript of a concluded chat based on the ChatID

Tip

Status
colourGreen
titleHTTP GET
/livechat/:domain/getChatTranscriptByChatID/:chatId

Path Variables:

Name

Mandatory

Type

Description

domain

Status
colourRed
titleYES

Status
titleSTRING

Unique domain identifier

chatId

Status
colourRed
titleyes

Status
titlestring

Unique chat identifier

...

Type: jsonp

<chatId>

Name

Type

Description

result

Status
titleboolean

If true, the service response was performed correctly

error

Status
titlenull
/
Status
titlestring

Chat ID

Contains the error description if an error has occurred in the request

chatTranscripts

Status
titleobject

contains the transcript for the specified chat

Example:

Request

http://<hostname>:<port>/livechat/getChatTrasncriptByChatID/

...

CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25

Response:

Code Block
languagejson
{
    "result": true,
    "chatTranscripts": {
        "result": true,
        "transcript": {
            "messages": [
                {
                    "data": {
                        "id": "7ae34fb0-eb96-434a-abfd-d9735b854810",
                        "messageType": "TEXT",
                        "content": {
                            "text": "Buongiorno, sono l'operatore Gabriele Verde, come posso esserle utile?",
                            "user": {
                                "id": "USER_gverde1@acd.enghouse.com",
                                "isAgent": true,
                                "nickname": "Gabriele Verde"
                            }
                        },
                        "ts": 1590160388269,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fd1",
                    "room": "CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25"
                },
                {
                    "data": {
                        "id": "1b4ee873-82a8-477c-8a58-8f957f26ff2d",
                        "messageType": "TEXT",
                        "content": {
                            "text": "1",
                            "user": {
                                "id": "USER_gverde1@acd.enghouse.com",
                                "isAgent": true,
                                "nickname": "Gabriele Verde"
                            }
                        },
                        "ts": 1590160392271,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fd0",
                    "room": "CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25"
                },
                {
                    "data": {
                        "id": "fc7ec20d-9ecf-4863-b46d-c6f1f21c4aa2",
                        "messageType": "TEXT",
                        "content": {
                            "text": "2",
                            "user": {
                                "id": "USER_DEFAULT_ebad948e-d1c0-4131-835b-8991dc1b5c61",
                                "isAgent": false,
                                "nickname": "Customer"
                            }
                        },
                        "ts": 1590160396770,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fcf",
                    "room": "CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25"
                },
                {
                    "data": {
                        "id": "81845b84-bf6b-4ec2-aa04-9a3131c09746",
                        "messageType": "TEXT",
                        "content": {
                            "text": "3",
                            "user": {
                                "id": "USER_DEFAULT_ebad948e-d1c0-4131-835b-8991dc1b5c61",
                                "isAgent": false,
                                "nickname": "Customer"
                            }
                        },
                        "ts": 1590160397302,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fce",
                    "room": "CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25"
                },
                {
                    "data": {
                        "id": "2b4b0305-6e8c-49eb-a493-98745e4e2c66",
                        "messageType": "TEXT",
                        "content": {
                            "text": "4",
                            "user": {
                                "id": "USER_gverde1@acd.enghouse.com",
                                "isAgent": true,
                                "nickname": "Gabriele Verde"
                            }
                        },
                        "ts": 1590160400910,
                        "deliverySuccess": true,
                        "deliveryErrorReason": ""
                    },
                    "_id": "5ec7ec9b86772842485a7fcd",
                    "room": "CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25"
                }
            ],
            "_id": "5ec7ec9b86772842485a7fcc",
            "room": "CHAT_DEFAULT_5416bcd3-d78d-4dc8-be0e-7b9ac1f51b25",
            "__v": 0
        }
    },
    "error": null
}