Updated on 2023-09-27 GMT+08:00

POST /CCSQM/rest/ccisqm/v1/appraisecall/detail

Scenario

This interface is invoked to obtain the inspection result of a call.

Method

POST

URI

https://Domain name/apiaccess/CCSQM/rest/ccisqm/v1/appraisecall/complain (For example, the domain name is service.besclouds.com.)

Request Description

Table 1 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

No

The value is fixed to application/json; charset=UTF-8.

2

x-app-key

String

No

App key

3

Authorization

String

Yes

Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.)

4

x-UserId

String

Yes

Operator ID

You can sign in to the system and go to the employee management page to view the value of userId returned by an interface.

Table 2 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

call_uuid

String

Yes

Call ID

You can obtain the value of call_uuid from the result returned by the details interface.

Response Description

  • Status code: 200
Table 3 Response body parameters

No.

Parameter

Type

Mandatory or Not

Description

1.1

deal

Number

No

Whether a deal is made

1.2

left_speed

Number

No

Left channel speaking speed. The speaker is determined by the left_channel parameter.

1.3

left_speech_ratio

Number

No

Left channel speaking proportion. The speaker is determined by the left_channel parameter.

1.4

file_name

String

No

Inspection file name

1.5

left_channel

String

No

Left channel speaker. The options are Customer and Agent.

1.6

right_speech_ratio

Number

No

Right channel speaking proportion. The speaker is determined by the right_channel parameter.

1.7

call_time

Number

No

Call start time

1.8

right_channel

String

No

Right channel speaker. The options are Customer and Agent.

1.9

call_id

Number

No

Call ID

1.10

left_silence_time

Number

No

Silence duration of the speaker

1.11

segments

Array [Object]

No

ASR text segment result

1.11.1

asr_text

String

No

ASR text

1.11.2

speaker

String

No

Speaker

1.11.3

start_time

Number

No

Speaking start time

1.11.4

end_time

Number

No

Speaking end time

1.11.5

segment_id

Number

No

Segment ID

1.11.6

status

Number

No

Call status

1.12

duration

Number

No

Call duration

1.13

right_silence_time

Number

No

Silence duration of the speaker. The speaker is determined by the right_channel parameter.

1.14

upload_time

Number

No

Call upload time

1.15

rule_severity_violation_count

Number

No

Total number of violated inspection rules

1.16

left_emotions

Array [Object]

No

Tone, which is applicable only to agents. This parameter is valid only when left_channel is set to Agent.

1.16.1

type

String

No

Tone type. The options are positive and negative.

1.16.2

score

Number

No

Tone score

1.17

right_speed

Number

No

Right channel speaking speed. The speaker is determined by the right_channel parameter.

1.18

staff_id

String

No

User ID of an agent

You can sign in to the system and go to the agent management page to view the value of accountId returned by an interface.

1.19

call_uuid

String

No

Call ID

1.20

call_type

Number

No

Inspection call type. The options are Text and Audio.

1.21

status

Number

No

Inspection status

  • 0: The call is waiting for inspection.
  • 1: The inspection is in progress.
  • 2: The inspection is successful.
  • 3: The ASR is in progress.
  • 9: The inspection fails. An error occurs, or the data volume of inspection audio files or the number of daily inspection files reaches the upper limit.
  • 31: The voice content of the ASR result is empty.
  • 32: The ASR fails.
  • 33: The voice file fails to be uploaded to the ASR.
  • 34: The iFLYTEK ASR result transfer task fails to be submitted.
  • 35: The multimedia inspection task fails to be executed.
  • 36: The TUC inspection fails.
  • 37: The ASR fails to convert the voice file to a text file.
  • 38: The inspection result fails to be updated.
  • 39: The inspection task fails to be executed.
  • 40: The voice file is invalid.

1.22

right_emotions

Array [Object]

No

Tone, which is applicable only to agents. This parameter is valid only when right_channel is set to Agent.

1.22.1

type

String

No

Tone type. The options are positive and negative.

1.22.2

score

Number

No

Tone score

  • Status code: 400

    Incorrect request. Check the request path and parameters.

  • Status code: 401

    Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.

  • Status code: 404

    The requested content is not found. Check the request path.

  • Status code: 500

    Business failure. Check the values of parameters in the request.

Error Codes

None

Example

  • Scenario: Obtain the inspection result of a call.

    Request header:

    x-app-key:************************************  
    X-UserID:1611917095665261978  
    Authorization:Bearer ********************************
    Request parameters:
    {		
    	"call_uuid": "434l2j4242424jjl242"
    }

    Response parameters:

    {
    	"staff_name": "xieyiling",
    	"left_speed": 324.068,
    	"create_time": 1635318854,
    	"left_speech_ratio": 0.6081,
    	"file_name": "1111",
    	"right_speech_ratio": 0.185,
    	"left_channel": "customer",
    	"call_time": 1635318854,
    	"right_channel": "staff",
    	"call_id": "17af55af-e51d-4cc0-8a62-84222e1d1eea",
    	"segments": [{
    		"start_time": 0.0,
    		"asr_text": "Would you like to ask for the price",
    		"speaker": "customer",
    		"end_time": 11.32,
    		"segment_id": 1
    	}, {
    		"start_time": 13.36,
    		"asr_text": "Yes",
    		"speaker": "staff",
    		"end_time": 13.88,
    		"segment_id": 2
    	}, {
    		"start_time": 14.56,
    		"asr_text": "Are you going to buy a car in Beijing",
    		"speaker": "customer",
    		"end_time": 16.74,
    		"segment_id": 3
    	}, {
    		"start_time": 18.74,
    		"asr_text": "Yes",
    		"speaker": "staff",
    		"end_time": 19.68,
    		"segment_id": 4
    	}],
    	"left_silence_time": 40.8,
    	"duration": 104.12,
    	"right_emotions": [{
    		"score": 32.0,
    		"type": "negative"
    	}, {
    		"score": 69.0,
    		"type": "positive"
    	}],
    	"right_silence_time": 84.86,
    	"upload_time": 1635318854,
    	"left_emotions": [{
    		"score": 65.0,
    		"type": "negative"
    	}, {
    		"score": 80.0,
    		"type": "positive"
    	}],
    	"right_speed": 230.53,
    	"staff_id": "1679888582905592626",
    	"call_type": 0,
    	"status": 2
    }