logo

Authentication

Tenant-Level Authentication

Basic Information

Path: /token Method: GET Interface Description:

1. Authentication Parameters
NameDescription
AppIdTenant ID
Timestamp10-digit timestamp, to be generated by yourself
TokenAuthentication signature, valid for 5 minutes, please refer to section 2 for generation
2. Authentication Signature Parameter Description

Token signature uses HMAC-SHA1 for encryption and is generated through AppId, Timestamp, and Secret. The generation method is as follows:

Field NameDescriptionExample
MessageTenant ID + Timestampa54a8b77-f12d-4ac9-742d-5b2bef5c4d111612513422
Algorithmsha1
SecretKey used to encrypt the message, each tenant has a separate key, please contact the administrator for key information1234569abcdef
TokenGenerated based on message, algorithm, and key5320d95c846d4a26d4b19c762a1d063ec50f4da6
Notes:
  1. Token generation can refer to the website: 【https://1024tools.com/hmac
  2. Please contact the relevant person in charge for the key
3 Request Example

http://ccps.xx.tryudesk.com/api/v1/workTimes?AppId=a54a8b77-f12d-4ac9-742d-5b2bef5c4d11&Timestamp=1612762544&Token=2e511f0b41902747ca5e3aaa1e64754695e96e38】

Query AI Auto Call Task Call Records

Basic Information

Path: /api/v1/call-calls/task Method: POST Interface Description:

Overview

Query the call records under the AI auto call task, the interval between the start and end times of the call cannot be greater than 7 days.

Example

Request

    $ curl 'http://ip:port/api/v1/call-calls/task?AppId={appid}&Timestamp={mytime}&Token={token}' -i -X POST -H 'Content-Type: application/json' -d '{
        "pageNum":1,
        "pageSize":20,
        "adTaskId":123456,
        "startDateTime":"2022-03-18 10:10:00",
        "endDateTime":"2022-03-18 11:10:00",
        "toNumber":"15888888888"
    }'

Response

    {
        "succeed": true,
        "code": 200,
        "bizCode": "000000",
        "message": "OK",
        "visible": false,
        "paging": {
            "pageNum": 1,
            "pageSize": 20,
            "total": 1
        },
        "data": [
            {
                "id": 168,
                "callId": "2a1",
                "workflow": 4,
                "fromNumber": "05388593",
                "toNumber": "15201111111",
                "relayNumber": "05388593",
                "callStartTime": [
                    2021,
                    10,
                    15,
                    14,
                    26,
                    35
                ],
                "callEndTime": [
                    2021,
                    10,
                    15,
                    14,
                    27,
                    23
                ],
                "callDuration": 48,
                "callRecordUrl": "https://prords.iao.com/9ff65-0e6a-767.mp3?OSSAccessKeyId=bPehfu&Expires=16658153&Signature=y7qb%2FStD4%3D",
                "customerProvince": "Beijing",
                "customerCity": "Beijing",
                "userAnsweredFlag": 1,
                "userAnsweredCount": 4,
                "userAnsweredEffectiveCount": 2,
                "routerId": null,
                "routerName": null,
                "readFlag": 0,
                "transferAgentFlag": 0,
                "agentId": null,
                "agentName": null,
                "queueId": null,
                "queueName": null,
                "robotNames": [
                    "Do not touch script"
                ],
                "labelInfos": [
                    "11"
                ],
                "adTaskId": 111,
                "variables": null,
                "ringingTime": 16,
                "ringResult": "Not selected queue",
                "hangupCause": null,
                "hangupBy": "IVR",
                "adTaskName": "AI Outbound call",
                "callDirection": "Call out",
                "intentionLabelKey": null,
                "intentionLabelName": null,
                "callResult": 1,
                "calledResult": 1,
                "taskContactBatchName": "Contact A",
                "agentCallDuration": 0,
                "customerNumber": "13394837483",
                "remark": null
            }
        ]
    }

Request Parameters

Headers

Parameter NameParameter ValueRequiredExampleNotes
Content-Typeapplication/jsonYes

Body

NameTypeRequiredDefault ValueNotesAdditional Information
pageNumnumberNot requiredPage number, default is 1
pageSizenumberNot requiredNumber of items per page, default is 20, maximum is 50
adTaskIdnumberRequiredTask ID
startDateTimestringNot requiredStart time of the callExample: 2021-10-10 00:00:00
endDateTimestringNot requiredEnd time of the callExample: 2021-10-17 00:00:00
toNumberstringNot requiredCalled number

Response Data

NameTypeRequiredDefault ValueNotesAdditional Information
succeedbooleanRequiredSuccess indicator
codenumberRequiredResult code
bizCodestringRequiredBusiness code
messagestringRequiredMessage
visiblebooleanRequiredVisibility
pagingobjectNot required
├─ pageNumnumberNot requiredPage number
├─ pageSizenumberNot requiredNumber of items per page
├─ totalnumberNot requiredTotal count
dataobject[]Not requiredItem Type: object
├─ idnumberRequiredID
├─ callIdstringRequiredCall ID
├─ workflownumberRequiredCall type, 4 - automatic outgoing call
├─ fromNumberstringRequiredCalling number
├─ toNumberstringRequiredCalled number
├─ relayNumberstringRequiredRelay number
├─ callStartTimestringRequiredCall start time
├─ callEndTimestringRequiredCall end time
├─ callDurationnumberRequiredTotal call duration (seconds)
├─ callRecordUrlstringRequiredCall recording URL
├─ customerProvincestringRequiredCustomer number - Province
├─ customerCitystringRequiredCustomer number - City
├─ routerIdnullRequiredRouter ID
├─ routerNamenullRequiredRouter name
├─ readFlagnumberRequiredRead flag, 0 - unread, 1 - read
├─ transferAgentFlagnumberRequiredTransfer to agent flag, 0 - no, 1 - yes
├─ agentIdnullRequiredAgent ID
├─ agentNamenullRequiredAgent name
├─ queueIdnullRequiredQueue ID
├─ queueNamenullRequiredQueue name
├─ robotNamesstring[]RequiredDialog names array: ["Dialog 1", "Dialog 2"]Item Type: string
├─Not required
├─ labelInfosstring[]RequiredNormal label array: ["Fruit", "Vegetable"]Item Type: string
├─Not required
├─ adTaskIdnumberRequiredAutomatic outgoing call task ID
├─ variablesstring[]RequiredDialog variablesItem Type: string
├─Not required
├─ ringingTimenumberRequiredRinging time
├─ ringResultstringRequiredCall result
├─ hangupCausenull, stringRequiredCause of customer unanswered hangup
├─ hangupBystringRequiredHangup party
├─ adTaskNamestringRequiredAutomatic outgoing call task name
├─ callDirectionstringRequiredCall direction
├─ intentionLabelKeystringRequiredIntention label key
├─ intentionLabelNamestringRequiredIntention label name
├─ customerNumberstringRequiredCustomer number
userAnsweredFlagnumberNot requiredEffective call (0 no, 1 yes)
userAnsweredCountnumberNot requiredUser interaction count
userAnsweredEffectiveCountnumberNot requiredUser effective interaction count
remarkstringNot requiredRemark
allRecordUrlListobject[]Not requiredRecordingsItem Type: object
├─ recordUrlstringNot requiredRecording URL
├─ recordTypestringNot requiredType
├─ contactDetailRelobject[]Not requiredContact informationItem Type: object
├─ namestringNot requiredContact name
├─ mobilestringNot requiredMobile number
├─ companyNamestringNot requiredCompany name
├─ remarkstringNot requiredRemark
├─ variatesobject[]Not requiredVariable collectionItem Type: object
├─ keystringNot requiredVariable name
├─ typestringNot requiredVariable type
├─ valuestringNot requiredVariable value
├─ customerAnswerAtstringNot requiredCustomer answer time
├─ isFinalCallstringNot requiredNot in use
├─ agentCallDurationnumberNot requiredAgent call duration
├─ calledResultnumberNot requiredCall result, 1 - connected, 2 - not connected
├─ taskContactBatchNamestringNot requiredContact list name
├─ callResultnumberNot requiredRing result