Skip to main content

Uniphore Help Center Portal

Fetch Conversation Data

Fetch Conversation Data API retrieves detailed data from the specified conversation processed in Conversation Insights Agent. The response contains comprehensive analytical data, including facts, metadata, and scorecards.

Endpoint

METHOD: GET

URL: http://<host name>/v1/conversation/data/{sessionid}/

curl --location --request GET 'https://<host name>/uzng-gateway/v1/conversation/data/pov896123-qa22-44o9-87a9-628f2d37cc401400/' \
     --header 'Content-Type: application/json' \
     --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkxYejBQYWVFRERuS3dfcjdkU2s2UyJ9.eyJodHRwczovL2FwaS51bmlwaG9yZS5jb20vdGVuYW50IjoiMTViYjEwN2bnRzIiwiZ3R5IjoiY2xpZ6WyJyZWMcapfU8fY08zHkAS2j2GQ'
Header Parameter
Authorization - Bearer <Token>

Note

To obtain an authorization token, click here.

Path Parameter

Parameter Name

Data Type

Description

Required/ Optional

sessionId

String

ID of the session from which the conversation data needs to be fetched.

Required

Sample Response
{
        "code": 200,
	"message": Conversation data fetched successfully,
	"data": {
		"sessionId": "0e998f2e-dc6b-44cb-93a9-d38f73a1c6ba",
		"processingData": { [
			"processingId": "1c898f2e-dc6b-44cb-93a9-d38f73a1c9dc",
			"startTime": 1720681143367,
			"endTime": "1720681143367",
			"result": ""
			]
		},
		"callMetadata": {
			"organizationId": null,
			"callDirection": "inbound",
			"language": "en-us",
			"type": "audio",
			"agentChannel": 0,
			"fileType": ".wav",
			"callDate": 2024-05-02T07:15:54Z
		},
		"auxiliaryMetadata": [
            {
                "field": "call_source",
                "value": "Website"
            },
            {
                "field": "product_type",
                "value": "Personal Loan"
            }
        ],
		"factsGroups": [
			{
				"id": "6666faf3a4e878029b2bb4af",
				"name": "AutoFactGroup367653900",
				"facts": [
					{
						"id": "1c5408f2-4eae-428e-a172-6ad7ff33d852",
						"name": "AutoFact1923759652",
						"query": "Did the agent demonstrate willingness to help?",
						"results": [
							{
								"value": "true",
								"explanation": "Dummy explanation",
								"startOffsets": [
									"10720"
								]
							}
						],
						"keyFact": true
					}
				]
			}
		],
		"scorecards": [
			{
				"_id": "6620b1b783ce807964b91ca5",
				"name": "Agent Bad Behaviour Test",
				"version": "5",
				"tenantId": "fe572156-2212-458e-873a-6ac60bebf642",
				"passRanges": 60,
				"passScore": false,
				"sections": [
					{
						"_id": "66193597ed0e8e2394d7c35f",
						"name": "Agent used bad words",
						"order": 1,
						"parentId": "000000000000000000000000",
						"weightagePercent": 100.0,
						"sectionQuestions": null,
						"score": 0.0,
						"subsections": []
					}
				],
				"autoFail": false,
				"score": 0.0,
				"autoScore": true
			}
		],
		"sentimentScores": [
			{
				"participant": "agent",
				"sentiment": "NEUTRAL",
				"sentimentValue": 0.5527811255144036
			},
			{
				"participant": "customer",
				"sentiment": "NEUTRAL",
				"sentimentValue": 0.5292179412914045
			}
		]
	}
}
Response Parameter

Parameter Name

Description

processingData

Processing data includes information related to conversation batch processing, such as the Processing ID, start and end time of processing, and the result of the batch process.

callMetadata

Call metadata contains information related to calls for which the conversation data is fetched. Call metadata includes Organization ID, Call direction, Language, Type, and so on.

auxiliaryMetadata

Auxiliary metadata covers additional data related to the conversation.

factsGroups

Fact groups include the fact details related to the conversation.

scorecards

Score cards include the details of the section, sub-section, questions, weightage, and more that are related to the conversation.

sentimentScores

Sentiment scores include the participant's sentiments (Agent and Customer) and their values.

Response and Error Codes

Response Code

Condition

Message

Description

200

OK

Data fetched successfully.

Data for the given session ID is retrieved successfully.

204

No Data Found

NA

There is no data available for the given session ID.

401

UnAuthorized

NA

Invalid token or invalid signature received for JSON Web Token validation.

404

Not Found

Conversation not found.

The requested Conversation is not found.

500

Internal Server Error

NA

The server encountered an unexpected error that prevented it from fulfilling the request. Retry after some time.