# Phân tích cuộc gọi

Kết quả phân tích 1 cuộc gọi

<mark style="color:green;">`POST`</mark> {{url}}`/api/ai/call_transaction/get`

#### Headers

| Name                                            | Type         | Description                 |
| ----------------------------------------------- | ------------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | Bearer Token | AccessToken lấy từ api auth |

#### Request Body

| Name                                              | Type   | Description                             |
| ------------------------------------------------- | ------ | --------------------------------------- |
| transaction\_id<mark style="color:red;">\*</mark> | String | TransactionId của cuộc gọi đã phân tích |

{% tabs %}
{% tab title="200: OK Thành công" %}
{% code overflow="wrap" %}

```json
{
	"instance_id": "stg",
	"payload": {
		"tenant_id": "",//ID Doanh nghiệp
		"transaction_id": "",//Id cuộc gọi
		"direction": "outbound",//Hướng cuộc gọi
		"recording_file": "",//Link file ghi âm
		"sip_number": "",//Số Hotline thực hiện cuộc gọi
		"phone_number": "",//Số điện thoại khách hàng
		"time_start_to_answer": 1732682503,//Thời điểm trả lời 
		"duration": 70,//Tổng thời gian cuộc gọi
		"bill_sec": 60,//Thời lượng của cuôc gọi
		"result_speech_analytics": {},//Kết quả Speech to text
		"result_nlp_analytics": {},//Kết quả phân tích NLP
		"staff_word_alignments": [],//Tổng hợp kết quả Speech to text nhánh nhân viên
		"customer_word_alignments": [],//Tổng hợp kết quả Speech to text nhánh khách hàng
		"analyst_results": {},//Kết quả phân tích chung
		"quality_evaluation_result": {},//Kết quả đánh giá chất lượng theo thang điểm và tiêu chí
		"nl_analyze_result": {}//Đánh giá chung
	},
	"instance_version": "1.2.164",
	"key_enabled": false,
	"status_code": 9999
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

Danh sách kết quả phân tích của các cuộc gọi

<mark style="color:green;">`POST`</mark> {{url}}`/api/ai/call_transaction/list`

#### Headers

| Name                                            | Type         | Description                 |
| ----------------------------------------------- | ------------ | --------------------------- |
| Authorization<mark style="color:red;">\*</mark> | Bearer Token | AccessToken lấy từ api auth |

#### Request Body

| Name                                               | Type  | Description                                       |
| -------------------------------------------------- | ----- | ------------------------------------------------- |
| transaction\_ids<mark style="color:red;">\*</mark> | Array | List TransactionIds của các cuộc gọi đã phân tích |

{% tabs %}
{% tab title="200: OK Thành công" %}
{% code overflow="wrap" %}

```json
{
	"instance_id": "stg",
	"payload": [
		{	
			"tenant_id": "", //ID Doanh nghiệp
			"transaction_id": "", //Id cuộc gọi
			"direction": "outbound", //Hướng cuộc gọi
			"recording_file": "", //Link file ghi âm
			"sip_number": "", //Số Hotline thực hiện cuộc gọi
			"phone_number": "",//Số điện thoại khách hàng
			"time_start_to_answer": 1732682503, //Thời điểm trả lời 
			"duration": 70, //Tổng thời gian cuộc gọi
			"bill_sec": 60, //Thời lượng của cuôc gọi
			"result_speech_analytics": {},//Kết quả Speech to text
			"result_nlp_analytics": {}, //Kết quả phân tích NLP
			"staff_word_alignments": [],//Tổng hợp kết quả Speech to text nhánh nhân viên
			"customer_word_alignments": [],//Tổng hợp kết quả Speech to text nhánh khách hàng
			"analyst_results": {}, //Kết quả phân tích chung
			"quality_evaluation_result": {},//Kết quả đánh giá chất lượng theo thang điểm và tiêu chí
			"nl_analyze_result": {}//Đánh giá chung
		}
	],
	"instance_version": "1.2.164",
	"key_enabled": false,
	"status_code": 9999
}

```

{% endcode %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://api.omicall.com/omicall-api/ai-api/phan-tich-cuoc-goi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
