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

Interaction Record Query Interface

Description

The OIAP provides an interface for third-party systems to query intelligent interaction records. This interface can be used to query only the instances of the latest incoming call of a user.

Interface Method

POST

URL

https://IP:PORT/oifde/rest/api/queryHistory

Request

Parameter

Type

Position

Mandatory

Description

tenantId

String

Body

Yes

Tenant space ID.

params

Map <String, Object>

Body

Yes

Parameter package. For details, see Table 1.

authToken

String

Body

Yes

Valid token value for accessing the interface.

You can obtain the valid token information by invoking the interface for obtaining tokens.

For details, see C3 OIAP Interface Authentication.

Table 1 params

Parameter

Type

Position

Mandatory

Description

userMobile

String

Body

Yes

User ID. (In the voice navigation and voice outbound call scenarios, the user number is transferred. In other interaction scenarios, the user ID is transferred.)

Response

Parameter

Type

Position

Mandatory

Description

rtnCode

Integer

Body

Yes

Error code.

  • 0 or null: success
  • Other values: failure

    The status code 200 also indicates success.

rtnMsg

String

Body

No

Error description.

beans

Map <String, String>

Body

Yes

Returned content array. For details, see Table 2.

callId

String

Body

Yes

Unique call ID.

callSorId

String

Body

Yes

User ID, which is the same as the value of userMobile.

object

Object

Body

No

The default value is null (specific to dedicated sites).

bean

String

Body

No

The default value is null (specific to dedicated sites).

Table 2 beans

Parameter

Type

Position

Mandatory

Description

interNo

String

Body

Yes

Internal sequence number.

userSaying

String

Body

Yes

Text of the chat records between a user and the chatbot.

intention

String

Body

Yes

User intention.

systemReply

String

Body

Yes

System reply.

type

String

Body

Yes

Reply type. The options are TTS, voice file, and text.

timestamp

String

Body

Yes

System reply time.

responseSource

String

Body

Yes

Source of the dialog reply.

  • 0: chatbot reply
  • 1: reply from a silent agent

Example

  • Request
    {
       "tenantId":"123456",
       "params":{
          "userMobile": "180****9999" 
        },
       "authToken":"n******************************"
    }
  • Response
    {    
         "rtnCode": 0,//Interface success or failure flag.
         "rtnMsg": "Success",//Interface success or failure description.
         "beans": [{        
             "interNo":"1",    //Sequence number.
             "userSaying":"How much is my call fee?",  //ASR result.
             "intention":"Query the call fee.",      //User intention.
             "systemReply":"Hello, your call fee of this month is US$100. The call fee balance is US$100.",  //System reply.
             "type":"TTS",  //Reply type.
             "timestamp":"2019-04-25 17:42:10.0"  //System reply time.
             "responseSource":"0"  //Chatbot reply.
         }],
        "object": null,   
        "bean": null,
        "callId": "xytest02131110",
        "callSorId": "18019919999"
    }