CCPaaS Application Side API
Common Information
General Description
1 Interface Specification
1.1 Request Format
Base URL
https://{host}/{Type}/{version}/{api}?Timestamp={Timestamp}&AppId={AppId}&Token={Token}
-
host: API domain name
-
Type: API
-
version: API version, currently v1
-
api: See API URI for specifics
-
Timestamp: UTC timestamp, accurate to the second
-
AppId: Used to indicate which APP to operate on, UUID string, should be included except for creating an APP
-
Token: Authentication Token calculated according to the authentication method, refer to section 2 for calculation HTTP Header
-
Accept:
"application/json"
-
Content-Type:
"application/json;charset=utf-8"
HTTP METHOD
-
GET (SELECT): Retrieve resources (one or more) from the server.
-
POST (CREATE): Create a new resource on the server.
-
PUT (UPDATE): Update a resource on the server (the client provides the complete resource with changes).
-
PATCH (UPDATE): Update a resource on the server (the client provides the attributes with changes).
-
DELETE (DELETE): Delete a resource from the server.
HTTP Status Code
-
200 OK - [GET]: The server successfully returns the data requested by the user, and this operation is idempotent (Idempotent).
-
201 CREATED - [POST/PUT/PATCH]: The user successfully creates or modifies data.
-
202 Accepted - [-]: Indicates that a request has entered the background queue (asynchronous task)
-
204 NO CONTENT - [DELETE]: The user successfully deletes data.
-
400 INVALID REQUEST - [POST/PUT/PATCH]: The request made by the user is incorrect, the server does not perform the operation of creating or modifying data, and this operation is idempotent.
-
401 Unauthorized - [-]: Indicates that the user does not have permission (token, username, password error).
-
403 Forbidden - [-]: It means that the user is authorized (opposite to the 401 error), but the access is forbidden.
-
404 NOT FOUND - [-]: The request made by the user is for a non-existent record, the server does not perform any operation, and this operation is idempotent.
-
406 Not Acceptable - [GET]: The format requested by the user is not available (for example, the user requests JSON format, but only XML format is available).
-
410 Gone - [GET]: The resource requested by the user has been permanently deleted and will not be obtained again.
-
422 Unprocessable Entity - [POST/PUT/PATCH] When creating an object, a validation error occurs.
-
500 INTERNAL SERVER ERROR - [-]: An error occurs on the server, and the user will not be able to determine whether the request sent was successful.
1.2 Response Format
General
- Responses are in JSON format encoded in UTF-8
- Response codes refer to
HTTP Status Code
Successful Response Format
{
"succeed":true,
"code":200,
"bizCode":"000000",
"message":"OK",
"visible":false,
"data":{
// data
}
}
Error Response Format
{
"succeed":false,
"code":401,
"bizCode":"000000",
"message":"error info", // error message
"visible":false,
"data":{
// data
}
}
2 Authentication Method
Authentication Parameters Description
Parameter Name | Required | Remarks |
---|---|---|
AppId | Yes | Tenant ID |
Timestamp | Yes | UTC timestamp, accurate to the second |
Token | Yes | Authentication signature, valid for 5 minutes |
The Token is obtained by encrypting with the HMAC-SHA1 algorithm
, where the message to be encrypted is obtained by adding AppId
and Timestamp
. The Secret used for encryption needs to be obtained from the administrator.
- Message to be encrypted: Tenant ID + Timestamp
For example: a54a8b77-f12d-4ac9-742d-5b2bef5c4d111612513422, where a54a8b77-f12d-4ac9-742d-5b2bef5c4d11
is the tenant ID, and 1612513422
is the timestamp
- Encryption Secret: Obtain from the administrator
Note: All interface calls need to carry the signature parameter Token, and the request will only be accepted when the Token value is valid.
Example
Suppose you want to call the following interface:
https://demo.udesk.cn/api/v1/petitions/search
The authentication data required is as follows:
Name | Data |
---|---|
AppId | a54a8b77-f12d-4ac9-742d-5b2bef5c4d11 |
Timestamp | 1612513422 |
Secret | secret-1234567890abc |
Calculate Token (Java example code)
HmacUtils hmacUtils = new HmacUtils(HmacAlgorithms.HMAC_SHA_1, "secret-1234567890abc");
hmacUtils.hmacHex("a54a8b77-f12d-4ac9-742d-5b2bef5c4d11"+"1612513422")
-> Token: e44a3e72aa3bd8cb903f72eacd4126682d1e7ff7
Note:
- Token generation can refer to the website: https://1024tools.com/hmac
- This request is for an automated outbound call interface and requires additional Email parameter authentication; this parameter is not required for ordinary interfaces The final request URL:
https://demo.udesk.cn/api/v1/petitions/search?AppId=a54a8b77-f12d-4ac9-742d-5b2bef5c4d11&Timestamp=1612513422&Token=e44a3e72aa3bd8cb903f72eacd4126682d1e7ff7
Open API
01 Create Outbound Call Task
Basic Information
Path: /api/v1/ads/external/callTasks?Email={Email}
Method: POST
Interface Description:
Overview
This API is used to create a new automatic outbound call task.
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks?Email=1@test.cn&AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X POST -H 'Content-Type: application/json' -d '{
"name":"test Dialing1",
"remark":"test Dialing",
"callTemplateId":5,
"ivrId":1,
"queueId":11,
"spnumberType":1,
"spnumberValue":72,
"startMode":1,
"startTime":null,
"workTimeId":31,
"priority":1,
"controlOptionList":[
1
],
"ivrMode":0,
"callType":1,
"concurrentLimit":1,
"dialParam":{
"optimizeParam":1,
"optimizeTarget":1
},
"redialSceneList":[
{
"result":"User declined",
"dealOption":1,
"redialTimes":1,
"redialGuide":1,
"guideIncrement":1,
"nextDeal":1
}
],
"taskContactBatchRelList":[
{
"callWeight":100,
"contactBatchId":3
}
]
}'
Response Example
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed":true,
"code":200,
"bizCode":"000000",
"message":"OK",
"visible":false,
"data":{
"id":80,
"name":"test Dialing1",
"remark":"test Dialing",
"callTemplateId":5,
"ivrId":1,
"queueId":11,
"spnumberType":1,
"spnumberValue":72,
"startMode":1,
"startTime":null,
"workTimeId":31,
"priority":1,
"controlOption":"1",
"controlOptionList":[
1
],
"status":1,
"ivrMode":0,
"callType":1,
"dialParam":{
"optimizeParam":1,
"optimizeTarget":1
},
"concurrentLimit":1,
"taskContactBatchRelList":[
{
"contactBatchId":3,
"callWeight":100
}
],
"redialSceneList":[
{
"result":"User declined",
"dealOption":1,
"redialTimes":1,
"redialGuide":1,
"guideIncrement":1,
"nextDeal":1
}
]
}
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Remarks |
---|---|---|---|---|
Content-Type | application/json | Yes |
Body
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
name | string | Required | Task name | mock: test | |
remark | string | Not Required | Description | ||
callTemplateId | number | Required | Outbound call template ID | mock: 1 | |
ivrId | number | Not Required | Outbound IVR ID | ||
queueId | number | Not Required | Outbound queue ID | ||
spnumberType | number | Required | Caller number type (1 - trunk number, 2 - number pool) | ||
spnumberValue | number | Required | Caller number value | ||
startMode | number | Required | Start mode (1 - manual, 2 - timed, 3 - periodic start) | ||
startTime | string | Not Required | Start time (used for timed, format: yyyy-MM-dd HH:mm:ss) | ||
workTimeId | number | Required | Work time ID | ||
priority | number | Required | Task priority | ||
controlOptionList | number[] | Not Required | Task option set | Item Type: number | |
└─ | Not Required | controlOptionList | |||
ivrMode | number | Not Required | IVR mode (0 - off, 1 - on) | ||
callType | number | Not Required | Outbound call mode (1 - predictive mode, 3 - precise mode, 6 - precise IVR mode, 7 - pure IVR mode) | ||
concurrentLimit | number | Required | Task concurrency limit | ||
dialParam | object | Not Required | Dialing setting parameters | ||
└─ optimizeParam | number | Not Required | Optimization parameter (1 - agent utilization, 2 - abandoned call rate, 3 - average agent waiting time) | ||
└─ optimizeTarget | number | Not Required | Optimization target | ||
redialSceneList | object[] | Not Required | Redial option set | Item Type: object | |
└─ result | string | Not Required | Call result (power off, empty number, suspended, busy, user rejection, unable to connect, service suspended, user busy, incorrect dialing method, inbound restriction, call transfer failure, network busy, no answer, arrears, unable to answer, number change, line fault, call back later, other) | ||
└─ dealOption | number | Required | Handling method (1 - redial) | ||
└─ redialTimes | number | Not Required | Redial attempts | ||
└─ redialGuide | number | Not Required | Time interval (minutes) | ||
└─ guideIncrement | number | Not Required | Interval increment (minutes) | ||
└─ nextDeal | number | Required | Subsequent processing (1 - next contact's phone) | ||
└─ type | number | Required | Call result type (1 - invalid call, 2 - failed call, 3 - label) | ||
taskContactBatchRelList | object[] | Not Required | Contact batch set | Item Type: object | |
└─ callWeight | number | Not Required | Call weight | ||
└─ contactBatchId | number | Not Required | Contact batch ID |
Response Data
Name | Type | Required | Default | Remark | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | Business code (not in use) | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility (not in use) | ||
data | object | Not Required | Result | ||
├─ id | number | Required | Task ID | ||
├─ name | string | Required | Task name | ||
├─ remark | string | Not Required | Description | ||
├─ callTemplateId | number | Required | Call template ID | ||
├─ ivrId | number | Not Required | IVR ID | ||
├─ queueId | number | Not Required | Queue ID | ||
├─ spnumberType | number | Required | Caller number type (1 - Trunk number, 2 - Number pool) | ||
├─ spnumberValue | number | Required | Caller number value | ||
├─ startMode | number | Required | Start mode (1 - Manual, 2 - Timed, 3 - Periodic) | ||
├─ startTime | null | Not Required | Start time (used for timing, format: yyyy-MM-dd HH:mm:ss) | ||
├─ workTimeId | number | Required | Work time ID | ||
├─ priority | number | Required | Task priority | ||
├─ controlOption | string | Not Required | Task options | ||
├─ controlOptionList | number[] | Not Required | Task options (enumerated integer array, 1 - Stop automatically if no contacts) | Item Type: number | |
├─ | Not Required | Task option enum values | |||
├─ status | number | Required | Status (1 - Paused, 2 - Running, 3 - Stopped, 4 - Pausing, 5 - Stopping) | ||
├─ ivrMode | number | Required | IVR mode (0 - Off, 1 - On) | ||
├─ callType | number | Required | Call mode (1 - Predictive mode, 3 - Precision mode, 6 - Precision IVR mode, 7 - Pure IVR mode) | ||
├─ dialParam | object | Not Required | Dialing settings parameters | ||
├─ optimizeParam | number | Not Required | Optimization parameter (1 - Agent utilization, 2 - Abandon call rate, 3 - Average agent wait time) | ||
├─ optimizeTarget | number | Not Required | Optimization target | ||
├─ concurrentLimit | number | Not Required | Task concurrency limit | ||
├─ taskContactBatchRelList | object[] | Not Required | Contact batch collection | Item Type: object | |
├─ contactBatchId | number | Not Required | Contact batch ID | ||
├─ callWeight | number | Not Required | Call weight | ||
├─ redialSceneList | object[] | Not Required | Redial option collection | Item Type: object | |
├─ result | string | Not Required | Call result (Off, No answer, Out of service, Busy, User rejection, Unable to connect, Service suspended, User busy, Incorrect dialing method, Call-in restriction, Call transfer failed, Network busy, No answer, Arrears, Unable to answer, Number change, Line fault, Call back later, Other) | ||
├─ dealOption | number | Required | Handling method (1 - Redial) | ||
├─ redialTimes | number | Not Required | Redial attempts | ||
├─ redialGuide | number | Not Required | Time interval (minutes) | ||
├─ guideIncrement | number | Not Required | Interval increment (minutes) | ||
├─ nextDeal | number | Not Required | Subsequent processing (1 - Next contact phone) | ||
├─ type | string | Not Required | Call result type (1 - Invalid call, 2 - Call failure, 3 - Label) | ||
├─ valid | string | Not Required | Validity (default is invalid -2) | ||
├─ labelInfos | string[] | Not Required |
02 Edit Outbound Call Task
Basic Information
Path: /api/v1/ads/external/callTasks/{id}
Method: PUT
Interface Description:
Overview
Modify Automatic Outbound Call Task Data
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/80?Email=1@test.cn&AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X PUT -H 'Content-Type: application/json' -d '{
"name":"test Dialing1",
"remark":"test Dialing",
"callTemplateId":5,
"ivrId":1,
"queueId":11,
"spnumberType":1,
"spnumberValue":72,
"startMode":1,
"startTime":null,
"workTimeId":31,
"priority":1,
"controlOptionList":[
1
],
"ivrMode":0,
"callType":1,
"concurrentLimit":1,
"dialParam":{
"optimizeParam":1,
"optimizeTarget":1
},
"redialSceneList":[
{
"result":"User declined",
"dealOption":1,
"redialTimes":1,
"redialGuide":1,
"guideIncrement":1,
"nextDeal":1
}
],
"taskContactBatchRelList":[
{
"callWeight":100,
"contactBatchId":3
}
]
}'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed":true,
"code":200,
"bizCode":"000000",
"message":"OK",
"visible":false,
"data":{
"id":80,
"name":"test Dialing1",
"remark":"test Dialing",
"callTemplateId":5,
"ivrId":1,
"queueId":11,
"spnumberType":1,
"spnumberValue":72,
"startMode":1,
"startTime":null,
"workTimeId":31,
"priority":1,
"controlOption":"1",
"controlOptionList":[
1
],
"status":1,
"ivrMode":0,
"callType":1,
"dialParam":{
"optimizeParam":1,
"optimizeTarget":1
},
"concurrentLimit":1,
"taskContactBatchRelList":[
{
"contactBatchId":3,
"callWeight":100
}
],
"redialSceneList":[
{
"result":"User declined",
"dealOption":1,
"redialTimes":1,
"redialGuide":1,
"guideIncrement":1,
"nextDeal":1
}
]
}
}
Request Parameters
Headers
Parameter Name | Parameter Value | Mandatory | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Path Parameters
Parameter Name | Example | Notes |
---|---|---|
id | 1 | Task ID |
Body
Name | Type | Required | Default | Remark | Additional Information |
---|---|---|---|---|---|
name | string | Not Required | Task name | mock: test | |
remark | string | Not Required | Description | ||
callTemplateId | number | Not Required | Outbound call template ID | mock: 1 | |
ivrId | number | Not Required | Outbound IVR ID | ||
queueId | number | Not Required | Outbound queue ID | ||
spnumberType | number | Required | Caller number type (1: Trunk number 2: Number pool) | ||
spnumberValue | number | Not Required | Caller number value | ||
startMode | number | Not Required | Start mode (1: Manual 2: Timed 3: Periodic start) | ||
startTime | string | Not Required | Start time (used for timing, format: yyyy-MM-dd HH:mm:ss) | ||
workTimeId | number | Not Required | Work time ID | ||
priority | number | Not Required | Task priority | ||
controlOptionList | number[] | Not Required | Task option set | Item type: number | |
├─ | Not Required | controlOptionList | |||
ivrMode | number | Not Required | IVR mode (0: Off 1: On) | ||
callType | number | Required | Outbound mode (1: Predictive mode 3: Precision mode 6: Precision IVR mode 7: Pure IVR mode) | ||
concurrentLimit | number | Not Required | Task concurrency limit | ||
dialParam | object | Not Required | Dialing settings parameters | ||
├─ optimizeParam | number | Not Required | Optimization parameter (1: Agent utilization 2: Abandon call rate 3: Average agent wait time) | ||
├─ optimizeTarget | number | Not Required | Optimization target | ||
redialSceneList | object[] | Not Required | Redial option set | Item type: object | |
├─ result | string | Not Required | Call result (Off, Empty number, Suspended, Busy, User rejection, Unable to connect, Service suspended, User busy, Incorrect dialing method, Inbound restriction, Call transfer failure, Network busy, No answer, Arrears, Unable to answer, Number change, Line fault, Call back later, Other) | ||
├─ dealOption | number | Not Required | Handling method (1: Redial) | ||
├─ redialTimes | number | Not Required | Redial attempts | ||
├─ redialGuide | number | Not Required | Time interval (minutes) | ||
├─ guideIncrement | number | Not Required | Interval increment (minutes) | ||
├─ nextDeal | number | Not Required | Subsequent processing (1: Next contact's phone number) | ||
├─ type | string | Not Required | Call result type (1: Invalid call 2: Call failure 3: Tag) | ||
taskContactBatchRelList | object[] | Not Required | Contact batch set | Item type: object | |
├─ callWeight | number | Not Required | Call weight | ||
├─ contactBatchId | number | Required | Contact batch ID |
Response Data
Name | Type | Required | Default | Remark | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | Business code (not in use) | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility (not in use) | ||
data | object | Not required | Result | ||
├─ id | number | Required | Task ID | ||
├─ name | string | Required | Task name | ||
├─ remark | string | Not required | Description | ||
├─ callTemplateId | number | Required | Call template ID | ||
├─ ivrId | number | Not required | IVR ID | ||
├─ queueId | number | Not required | Queue ID | ||
├─ spnumberType | number | Required | Caller number type (1 trunk number 2 number pool) | ||
├─ spnumberValue | number | Required | Caller number value | ||
├─ startMode | number | Required | Start mode (1 manual 2 timed 3 periodic) | ||
├─ startTime | null | Not required | Start time (used for timed tasks, format: yyyy-MM-dd HH:mm:ss) | ||
├─ workTimeId | number | Required | Work time ID | ||
├─ priority | number | Required | Task priority | ||
├─ controlOption | string | Not required | Task options | ||
├─ controlOptionList | number[] | Not required | Task options (enumerated integer array, 1 stop if no contacts) | item type: number | |
├─ | Not required | Task option enum values | |||
├─ status | number | Required | Status (1 paused 2 running 3 stopped 4 pausing 5 stopping) | ||
├─ ivrMode | number | Required | IVR mode (0 off 1 on) | ||
├─ callType | number | Required | Call mode (1 predictive mode 3 precision mode 6 precision IVR mode 7 pure IVR mode) | ||
├─ dialParam | object | Not required | Dialing settings | ||
├─ optimizeParam | number | Not required | Optimization parameter (1 agent utilization 2 abandoned call rate 3 average agent wait time) | ||
├─ optimizeTarget | number | Not required | Optimization target | ||
├─ concurrentLimit | number | Not required | Task concurrency limit | ||
├─ taskContactBatchRelList | object[] | Not required | Contact batch collection | item type: object | |
├─ contactBatchId | number | Not required | Contact batch ID | ||
├─ callWeight | number | Not required | Call weight | ||
├─ redialSceneList | object[] | Not required | Redial option collection | item type: object | |
├─ result | string | Not required | Call result (powered off, empty number, suspended, busy, user rejection, unable to connect, service suspended, user busy, incorrect dialing method, inbound restriction, call transfer failure, network busy, no answer, arrears, unable to answer, number change, line fault, call back later, other) | ||
├─ dealOption | number | Required | Handling method (1 redial) | ||
├─ redialTimes | number | Not required | Redial attempts | ||
├─ redialGuide | number | Not required | Time interval (minutes) | ||
├─ guideIncrement | number | Not required | Interval increment (minutes) | ||
├─ nextDeal | number | Not required | Subsequent processing (1 next contact phone) |
03 Start Outbound Call Task
Basic Information
Path: /api/v1/ads/external/callTasks/status/{id}/executing
Method: PUT
Interface Description:
Overview
This API endpoint is used to start an outbound call task.
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/status/1/executing?Email=1@test.cn&AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X PUT -H 'Content-Type: application/json'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed":true,
"code":200,
"bizCode":"000000",
"message":"OK",
"visible":false
}
Request Parameters
Headers
Parameter Name | Parameter Value | Mandatory | Example | Notes |
---|---|---|---|---|
Content-Type | application/x-www-form-urlencoded | Yes |
Path Parameters
Parameter Name | Example | Notes |
---|---|---|
id | 1 | Task ID |
Response Data
Name | Type | Mandatory | Default Value | Notes | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | Business code (not in use) | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility (not in use) |
04 Pause Outbound Call Task
Basic Information
Path: /api/v1/ads/external/callTasks/status/{id}/pause
Method: PUT
Interface Description:
Overview
This API endpoint is used to pause an outbound call task.
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/status/1/pause?Email=1@test.cn&AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X PUT -H 'Content-Type: application/json'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed":true,
"code":200,
"bizCode":"000000",
"message":"OK",
"visible":false
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/x-www-form-urlencoded | Yes |
Path Parameters
Parameter Name | Example | Notes |
---|---|---|
id | 1 | Task ID |
Response Data
Name | Type | Required | Default | Notes | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | Business code (not in use) | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility (not in use) |
Basic Information
Path: /api/v1/ads/external/callTasks/status/{id}/stop
Method: PUT
Interface Description:
Overview
Stop Outbound Call Task
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/status/1/stop?Email=1@test.cn&AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X PUT -H 'Content-Type: application/json'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed":true,
"code":200,
"bizCode":"000000",
"message":"OK",
"visible":false
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/x-www-form-urlencoded | Yes |
Path Parameters
Parameter Name | Example | Notes |
---|---|---|
id | 1 | Task ID |
Response Data
Name | Type | Required | Default | Notes | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | Business code (not in use) | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility (not in use) |
06 Creating a Contact Form
Basic Information
Path: /api/v1/ads/external/contactBatchs
Method: POST
Interface Description:
Overview
Creating a Contact Ticket
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/ads/external/contactBatchs?Email=1@test.cn&AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X POST -H 'Content-Type: application/json' -d '{
"name":"Test Dial 1",
"remark":"Test Dial",
"focus":"Tag"
}'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed":true,
"code":200,
"bizCode":"000000",
"message":"OK",
"visible":false,
"data":{
"id":80,
"name":"Test Dial 1",
"remark":"Test Dial",
"focus":"Tag",
"status":3
}
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Body
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
name | string | Required | Contact form name | ||
remark | string | Not Required | Note | ||
focus | string | Not Required | Label | ||
callTaskId | string | Required | Outbound task ID |
Response Data
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | Business code (not in use) | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility (not in use) | ||
data | object | Not Required | Result | ||
├─ id | string | Required | Contact form ID | ||
├─ name | string | Required | Contact form name | ||
├─ remark | string | Not Required | Remarks | ||
├─ focus | string | Not Required | Tags | ||
├─ status | string | Required | Status (1: waiting, 2: importing, 3: completed) |
07 Import Contact Numbers
Basic Information
Path: /api/v1/ads/external/contactBatchs/syncNumber
Method: POST
Interface Description:
Overview
Import Contact Numbers Interface (Single Limit of 50 Entries)
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/ads/external/contactBatchs/syncNumber?Email=1@test.cn&AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X POST -H 'Content-Type: application/json' -d '{
"contactBatchId":1,
"dealType": 1,
"encryptionFlag": 1,
"algorithmType": 1,
"secretKey": "MTIzNDU2",
"encryptionRange": ["name,mobile"],
"numberList":[
{
"name":"test 1",
"mobile":"13900000000",
"companyName":"test company 1",
"remark":"Note1",
"variates":[{"key":"Weather","type":"string","value":"New York"}]
},
{
"name":"test 2",
"mobile":"1390000001",
"companyName":"test company 2",
"remark":"Note2",
"variates":[{"key":"Weather","type":"string","value":"New York"}]
}
]
}'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed":true,
"code":200,
"bizCode":"000000",
"message":"OK",
"visible":false,
"data":{
"contactBatchId":1,
"successCount":1,
"failedCount":1,
"failedNumberList":[
{
"name":"test 2",
"mobile":"1390000001",
"companyName":"test company 2",
"remark":"Note2",
"variates":[{"key":"Weather","type":"string","value":"New York"}],
"failedReason":"Invalid number"
}
]
}
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Body
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
contactBatchId | number | Required | Contact form ID | ||
dealType | number | Optional | Duplicate processing type (1 global, 2 all tasks, 3 current task, 4 no duplicate check) | ||
encryptionFlag | number | Required | 0 | Whether to encrypt (1 yes, 0 no) | |
algorithmType | number | Optional | Encryption algorithm (1 AES, 2 DES) | ||
secretKey | string | Optional | Encryption key (requires base64 encryption) | ||
encryptionRange | list | Optional | Encryption fields | ||
numberList | object[] | Required | Number list collection | Item type: object | |
├─ name | string | Required | Contact name | ||
├─ mobile | string | Required | Mobile number | ||
├─ companyName | string | Optional | Company | ||
├─ remark | string | Optional | Remarks | ||
├─ variates | object[] | Optional | Custom variables | Item type: object | |
├─ key | string | Optional | Variable | ||
├─ type | string | Optional | Variable type | ||
├─ value | string | Optional | Variable value |
Response Data
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | Business code (not in use) | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility (not in use) | ||
data | object | Not Required | Result | ||
├─ contactBatchId | number | Required | Contact form ID | ||
├─ successCount | number | Required | Number of successfully imported numbers | ||
├─ failedCount | number | Required | Number of failed imports | ||
├─ failedNumberList | object[] | Not Required | Set of failed import numbers | Item Type: object | |
├─ name | string | Not Required | Name | ||
├─ mobile | string | Not Required | Number | ||
├─ companyName | string | Not Required | Company | ||
├─ remark | string | Not Required | Remarks | ||
├─ variates | string[] | Not Required | Custom variables (format: [{"key":"weather","type":"string","value":"Beijing"}]) | Item Type: string | |
├─ failedReason | string | Not Required | Reason for failure | ||
├─ dealType | number | Not Required | Duplicate handling type (1 global, 2 all tasks, 3 current task, 4 no duplicate check) | ||
├─ encryptionFlag | number | Required | Encryption flag | ||
├─ algorithmType | number | Not Required | Encryption type | ||
├─ encryptionRange | list | Not Required | Encryption fields | ||
├─ encryptionField | string | Not Required | Encryption field |
08 Call Record Inquiry
Basic Information
Path: /api/v1/petitions/search
Method: POST
Interface Description:
Overview
The call record query supports querying by time range, call type, and call ID. The query time range cannot exceed 7 days; the larger the time range, the longer the query time, so it's advisable to minimize the query range.
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/petitions/search?AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X POST -H 'Content-Type: application/json' -d '{
"pageNum": 1,
"pageSize": 1,
"startTime": "2021-06-26 00:00:28",
"endTime": "2021-06-26 10:00:28",
"category": 2,
"callId": "d44539e0-3d41-4854-83da-d22a0d251304"
}'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"paging": {
"pageNum": 1,
"pageSize": 1,
"total": 1
},
"data": [
{
"id": 16938727,
"callId": "d44539e0-3d41-4854-83da-d22a0d251304",
"category": 2,
"customerNumber": "18710180975",
"beginAt": "2021-06-26 00:09:28",
"endAt": "2021-06-26 00:09:51",
"defeatCause": null,
"displayNumber": "04536341334",
"agentName": "test ",
"customerRingingTime": 0,
"talkRecord": "https://s4-ccps-pri-std.obs.cn-north-4.myhuaweicloud.com/c055e127-95d0-44f0-7564-5f570d410b68/cc_recordings/20210626000945_d44539e0-3d41-4854-83da-d22a0d251304_a5138e4d-5eec-4d5f-bc1d-6cf9c5a0eacf_18710180975.mp3?AWSAccessKeyId=KNERXMMZRQZ7UHV2OSEN&Expires=1656173390&Signature=Pb%2BSiPvi9GtFvLIm98nyJV0CHZE%3D",
"outLineNumber": "",
"talkTime": 5,
"followUpCall": "None",
"queueName": "Liu Yong - Queue",
"queueResult": "Queue Success",
"ringResult": "agent Answer",
"seqRing": "0",
"outCallRingTime": null,
"outCallDefeatCause": null,
"hangupBy": "Agent",
"callResult": "agent Answer",
"agentInfo": {
"id": 10001,
"name": "test ",
"employeeId": "Agent-001",
"number": "99674238501001"
},
"talkInfo": null,
"ivrInfo": null,
"phoneInfo": null,
"queueInfo": null,
"surveryList": [
"Evaluated-1-12"
]
}
]
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Body
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
pageNum | number | Not Required | Page number | ||
pageSize | number | Not Required | Rows per page | ||
startTime | string | Not Required | Start time, for example: 2021-02-24 18:50:00 | ||
endTime | string | Not Required | End time, for example: 2021-02-24 19:50:00 | ||
category | number | Not Required | Call type 1: Outgoing 2: Incoming | ||
callId | string | Not Required | Unique call identifier |
Response Data
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code. 200 for success | ||
bizCode | string | Required | bizcode | ||
message | string | Required | Message | ||
visible | boolean | Required | visible | ||
paging | object | Required | Paging information | ||
├─ pageNum | number | Required | Page number | ||
├─ pageSize | number | Required | Rows per page | ||
├─ total | number | Required | Total count | ||
data | object[] | Not Required | Result data | Item type: object | |
├─ id | number | Required | Unique sequence | ||
├─ callId | string | Required | Call ID | ||
├─ category | number | Required | Call type 1: Outgoing 2: Incoming | ||
├─ customerNumber | string | Not Required | Customer phone number | ||
├─ beginAt | string | Required | Call time | ||
├─ endAt | string | Required | End time | ||
├─ displayNumber | string | Not Required | Relay number | ||
├─ agentName | string | Not Required | Agent name | ||
├─ customerRingingTime | number | Not Required | Customer ringing duration | ||
├─ talkRecord | string | Not Required | Call recording | ||
├─ outLineNumber | string | Not Required | External line number | ||
├─ talkTime | number | Not Required | Call duration in seconds | ||
├─ followUpCall | string | Not Required | Follow-up call | ||
├─ queueName | string | Not Required | Queue name | ||
├─ queueResult | string | Not Required | Queue result | ||
├─ ringResult | string | Not Required | Ring result | ||
├─ seqRing | string | Not Required | Sequential ring | ||
├─ outCallRingTime | string | Not Required | Outbound call ringing duration | ||
├─ outCallDefeatCause | string | Not Required | Outbound call failure reason | ||
├─ hangupBy | string | Not Required | Hang-up party | ||
├─ callResult | string | Not Required | Call result | ||
├─ agentInfo | object | Not Required | Agent information | ||
├─ id | number | Not Required | Agent ID | ||
├─ name | string | Not Required | Agent name | ||
├─ employeeId | string | Not Required | Agent employee ID | ||
├─ number | string | Not Required | Agent extension | ||
├─ talkInfo | object | Not Required | Call information | ||
├─ beginAt | string | Not Required | Start time | ||
├─ endAt | string | Not Required | End time | ||
├─ record | string | Not Required | Record | ||
├─ talkTime | number | Not Required | Call duration | ||
├─ hangupBy | string | Not Required | Hang-up party | ||
├─ numOfAgentHold | number | Not Required | Number of agent holds | ||
├─ numOfAgentSilence | string | Not Required | Number of agent silences | ||
├─ numOfAgentToIvr | number | Not Required | Number of agent transfers to IVR | ||
├─ field_10numOfAgentTransfer | number | Not Required | Number of agent transfers | ||
├─ numOfAgentAdvisory | number | Not Required | Number of agent consultations | ||
├─ numOfAgentThird | number | Not Required | Number of agent three-way calls | ||
├─ agentEvents | string[] | Not Required | Agent call events | Item type: string | |
├─ | Not Required | ||||
├─ category | number | Not Required | Call type | ||
├─ ivrInfo | object | Not Required | IVR information | ||
├─ record | string | Not Required | IVR call recording | ||
├─ variables | string[] | Not Required | IVR variable list | Item type: string | |
├─ | Not Required | ||||
├─ viewCallVariablesList | string[] | Not Required | IVR variables | Item type: string | |
├─ | Not Required | ||||
├─ lables | string[] | Not Required | IVR label list | Item type: string | |
├─ | Not Required | ||||
├─ ivrTimes | number | Not Required | IVR duration | ||
├─ process | object[] | Not Required | IVR event process | Item type: object | |
├─ seq | number | Not Required | Sequence number | ||
├─ beginAt | string | Not Required | Entry time | ||
├─ endAt | string | Not Required | Exit time | ||
├─ ivrName | string | Not Required | Node name | ||
├─ ivrLog | string | Not Required | Node log | ||
├─ phoneInfo | object | Not Required | Customer phone information | ||
├─ number | string | Not Required | Phone number | ||
├─ province | string | Not Required | Province | ||
├─ city | string | Not Required | City | ||
├─ operator | string | Not Required | Operator | ||
├─ queueInfo | object | Not Required | Queue information | ||
├─ enterQueue | number | Not Required | Entry queue node | ||
├─ enterRule | string | Not Required | Entry queue rule | ||
├─ enterEvent | string | Not Required | Entry queue event | ||
├─ repeatCusterRule | string | Not Required | Repeat customer rule | ||
├─ queueType | string | Not Required | Queue type | ||
├─ queueId | number | Not Required | Queue ID | ||
├─ queueName | string | Not Required | Queue name | ||
├─ customerLevel | number | Not Required | Customer level | ||
├─ callLevel | number | Not Required | Call level | ||
├─ enterAt | string | Not Required | Entry time | ||
├─ queueTime | number | Not Required | Queue duration | ||
├─ assignAt | string | Not Required | Assignment time | ||
├─ assignRule | string | Not Required | Assignment rule | ||
├─ continuousRingTime | number | Not Required | Continuous ringing duration | ||
├─ lastAgentRingTime | number | Not Required | Last agent ringing duration | ||
├─ numOfSeqRing | number | Not Required | Number of sequential rings | ||
├─ seqRingEvent | string | Not Required | Sequential ring event | ||
├─ queueResult | string | Not Required | Queue result | ||
├─ ringResult | string | Not Required | Ring result | ||
├─ surveryList | string[] | Not Required | Satisfaction survey information | Item type: string | |
├─ | Not Required | ||||
├─ messageUrl | string | Not Required | Voicemail | ||
├─ adTaskName | string | Not Required | Automatic dialing task name | ||
├─ externFlag | string | Not Required | Whether to transfer to an external line | ||
├─ validFlag | string | Not Required | Call validity (0: no judgment, 1: valid, 2: invalid) | ||
├─ viewCallVariablesList | string[] | Not Required | IVR variables | Item type: string | |
├─ | Not Required | ||||
├─ allRecordUrlList | object[] | Not Required | All recordings | Item type: object | |
├─ recordUrl | string | Not Required | Recording URL | ||
├─ recordType | string | Not Required | Type | ||
├─ totalIvrTime | number | Not Required | Total IVR duration |
09 Call Details Inquiry
Basic Information
Path: /api/v1/petitions/callId
Method: GET
Interface Description:
Overview
Query Details of Call Record
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/petitions/callId?callId=d44539e0-3d41-4854-83da-d22a0d251304&AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"data": {
"id": 16938727,
"callId": "d44539e0-3d41-4854-83da-d22a0d251304",
"category": 2,
"customerNumber": "18710180975",
"beginAt": "2021-06-26 00:09:28",
"endAt": "2021-06-26 00:09:51",
"defeatCause": null,
"displayNumber": "04536341334",
"agentName": "test ",
"customerRingingTime": 0,
"talkRecord": "https://s4-ccps-pri-std.obs.cn-north-4.myhuaweicloud.com/c055e127-95d0-44f0-7564-5f570d410b68/cc_recordings/20210626000945_d44539e0-3d41-4854-83da-d22a0d251304_a5138e4d-5eec-4d5f-bc1d-6cf9c5a0eacf_18710180975.mp3?AWSAccessKeyId=KNERXMMZRQZ7UHV2OSEN&Expires=1656173390&Signature=Pb%2BSiPvi9GtFvLIm98nyJV0CHZE%3D",
"outLineNumber": "",
"talkTime": 5,
"followUpCall": "None",
"queueName": "test -Queue",
"queueResult": "Queue Success",
"ringResult": "agent Answer",
"seqRing": "0",
"outCallRingTime": null,
"outCallDefeatCause": null,
"hangupBy": "Agent",
"callResult": "agent Answer",
"agentInfo": {
"id": 781,
"name": "test ",
"employeeId": "Agent-001",
"number": "98674238501001"
},
"talkInfo": {
"beginAt": "2021-06-26 00:09:45",
"endAt": "2021-06-26 00:09:51",
"record": "https://s4-ccps-pri-std.obs.cn-north-4.myhuaweicloud.com/c055e127-95d0-44f0-7564-5f570d410b68/cc_recordings/20210626000945_d44539e0-3d41-4854-83da-d22a0d251304_a5138e4d-5eec-4d5f-bc1d-6cf9c5a0eacf_18710180975.mp3?AWSAccessKeyId=KNERXMMZRQZ7UHV2OSEN&Expires=1656173390&Signature=Pb%2BSiPvi9GtFvLIm98nyJV0CHZE%3D",
"talkTime": 5,
"hangupBy": "Agent",
"numOfAgentHold": 0,
"numOfAgentSilence": 0,
"numOfAgentToIvr": 0,
"numOfAgentTransfer": 0,
"numOfAgentAdvisory": 0,
"numOfAgentThird": 0,
"agentEvents": [],
"category": 0
},
"ivrInfo": {
"record": null,
"variables": null,
"lables": null,
"ivrTimes": 30,
"process": [
{
"seq": 1,
"beginAt": "2021-06-26 00:09:28",
"endAt": "2021-06-26 00:09:58",
"ivrName": null,
"ivrLog": null
}
]
},
"phoneInfo": {
"number": "18710710970",
"province": "New York",
"city": "New York",
"operator": null
},
"queueInfo": {
"enterQueue": null,
"enterRule": null,
"enterEvent": null,
"repeatCusterRule": "",
"queueType": "Queue",
"queueId": 2411,
"queueName": "test -Queue",
"customerLevel": null,
"callLevel": null,
"enterAt": "2021-06-26 00:09:31",
"queueTime": 14,
"assignAt": "2021-06-26 00:09:45",
"assignRule": null,
"continuousRingTime": null,
"lastAgentRingTime": 15,
"numOfSeqRing": 0,
"seqRingEvent": null,
"queueResult": "Queue Success",
"ringResult": "agent Answer"
},
"surveryList": [
"Evaluated-1-12"
]
}
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Query
Parameter Name | Required | Example | Notes |
---|---|---|---|
callId | Yes | d44539e0-3d41-4854-83da-d22a0d251304 |
Response Data
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code. 200 for success | ||
bizCode | string | Required | bizcode | ||
message | string | Required | Message | ||
visible | boolean | Required | visible | ||
data | object | Not Required | Result | ||
├─ id | number | Required | Unique sequence | ||
├─ callId | string | Required | Call ID | ||
├─ category | number | Required | Call type 1: Outgoing 2: Incoming | ||
├─ customerNumber | string | Not Required | Customer phone number | ||
├─ beginAt | string | Required | Call time | ||
├─ endAt | string | Required | End time | ||
├─ displayNumber | string | Not Required | Relay number | ||
├─ agentName | string | Not Required | Agent name | ||
├─ customerRingingTime | number | Not Required | Customer ringing duration | ||
├─ talkRecord | string | Not Required | Call recording | ||
├─ outLineNumber | string | Not Required | External line number | ||
├─ talkTime | number | Not Required | Call duration in seconds | ||
├─ followUpCall | string | Not Required | Follow-up call | ||
├─ queueName | string | Not Required | Queue name | ||
├─ queueResult | string | Not Required | Queuing result | ||
├─ ringResult | string | Not Required | Ringing result | ||
├─ seqRing | string | Not Required | Sequential ring | ||
├─ outCallRingTime | string | Not Required | Outbound ringing duration | ||
├─ outCallDefeatCause | string | Not Required | Outbound failure reason | ||
├─ hangupBy | string | Not Required | Hang-up party | ||
├─ callResult | string | Not Required | Call result | ||
├─ agentInfo | object | Not Required | Agent information | ||
├─ id | number | Not Required | Agent ID | ||
├─ name | string | Not Required | Agent name | ||
├─ employeeId | string | Not Required | Agent employee ID | ||
├─ number | string | Not Required | Agent extension | ||
├─ talkInfo | object | Not Required | Call information | ||
├─ beginAt | string | Not Required | Call start time, format: yyyy-mm-dd HH:mm:ss | ||
├─ endAt | string | Not Required | Call end time | ||
├─ record | string | Not Required | Call recording | ||
├─ talkTime | number | Not Required | Call duration | ||
├─ hangupBy | string | Not Required | Hang-up party | ||
├─ numOfAgentHold | number | Not Required | Number of agent holds | ||
├─ numOfAgentSilence | number | Not Required | Number of agent silences | ||
├─ numOfAgentToIvr | number | Not Required | Number of agent transfers to IVR | ||
├─ numOfAgentTransfer | number | Not Required | Number of agent transfers | ||
├─ numOfAgentAdvisory | number | Not Required | Number of agent consultations | ||
├─ numOfAgentThird | number | Not Required | Number of agent three-party calls | ||
├─ agentEvents | string[] | Not Required | Agent call events | Item type: string | |
├─ | Not Required | Agent event | |||
├─ ivrInfo | object | Not Required | Call IVR information | ||
├─ record | string | Not Required | IVR call recording | ||
├─ variables | string[] | Not Required | Call record variable collection | Item type: string | |
├─ | Not Required | Variable | |||
├─ labels | string[] | Not Required | Call record label collection | Item type: string | |
├─ | Not Required | Label | |||
├─ ivrTimes | number | Not Required | IVR dwell time | ||
├─ process | object | Not Required | IVR event process | ||
├─ beginAt | string | Not Required | IVR start time, format: yyyy-MM-dd HH:mm:ss | ||
├─ endAt | string | Not Required | IVR end time, same format as above | ||
├─ ivrName | string | Not Required | VR name | ||
├─ ivrLog | string | Not Required | IVR log | ||
├─ phoneInfo | object | Not Required | |||
├─ number | string | Not Required | Number | ||
├─ province | string | Not Required | Province | ||
├─ city | string | Not Required | City | ||
├─ operator | string | Not Required | Operator | ||
queueInfo | object | Not Required | |||
├─ enterQueue | number | Not Required | Enter queue node | ||
├─ enterRule | string | Not Required | Enter queue rule | ||
├─ enterEvent | string | Not Required | Enter queue event | ||
├─ repeatCusterRule | string | Not Required | Repeat customer rule | ||
├─ queueType | string | Not Required | Queue type | ||
├─ queueId | number | Not Required | Queue ID | ||
├─ queueName | string | Not Required | Queue name | ||
├─ customerLevel | number | Not Required | Customer level | ||
├─ callLevel | number | Not Required | Call level | ||
├─ enterAt | string | Not Required | Enter queue time | ||
├─ queueTime | number | Not Required | Queue duration | ||
├─ assignAt | string | Not Required | Assignment time | ||
├─ assignRule | string | Not Required | Assignment rule | ||
├─ continuousRingTime | number | Not Required | Continuous ringing duration | ||
├─ lastAgentRingTime | number | Not Required | Last agent ringing duration | ||
├─ numOfSeqRing | number | Not Required | Number of sequential rings | ||
├─ seqRingEvent | string | Not Required | Sequential ring event | ||
├─ queueResult | string | Not Required | Queue result | ||
├─ ringResult | string | Not Required | Ring result | ||
├─ surveryList | string[] | Not Required | Satisfaction survey information | Item type: string | |
├─ | Not Required | Detailed satisfaction survey data | |||
├─ messageUrl | string | Not Required | Voicemail | ||
├─ adTaskName | string | Not Required | Automatic call task name | ||
├─ externFlag | string | Not Required | Whether to transfer to an external line | ||
├─ validFlag | string | Not Required | Call validity, 0: no judgment, 1: valid, 2: invalid | ||
├─ viewCallVariablesList | string[] | Not Required | IVR variables | Item type: string | |
├─ | Not Required | ||||
├─ allRecordUrlList | object[] | Not Required | All recordings | Item type: object | |
├─ recordUrl | string | Not Required | Recording URL | ||
├─ recordType | string | Not Required | Type | ||
├─ totalIvrTime | number | Not Required | Total IVR duration |
10 Add Restricted Numbers
Basic Information
Path: /api/v1/calllimit/{callType}/numbers
Method: POST
Interface Description:
Overview
Adding Restricted Call Numbers
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/calllimit/in/numbers?AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X POST -H 'Content-Type: application/json' -d '{
"numberInputModel": 1,
"numbers": [
"17000000000"
],
"limitType": "forever"
}'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"data": {
"totalSize": 1,
"repeatSize": 1,
"repeatList": [
"17000000000"
]
}
}
Request Parameters
Headers
Parameter Name | Parameter Value | Mandatory | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Path Parameters
Parameter Name | Example | Notes |
---|---|---|
callType | in | Call type: in - incoming, out - outgoing |
Body
Name | Type | Mandatory | Default | Notes | Additional Info |
---|---|---|---|---|---|
numberInputModel | number | Required | Number input method, default to 1 | ||
numbers | string[] | Required | Array of numbers | Item Type: string | |
├─ | Optional | Individual number | |||
limitType | string | Required | Type of limit: forever (permanent), minute, hour, day, week, month, year | ||
limitTime | number | Optional | Duration of the limit (required if limitType is not 'forever') | ||
limitReason | string | Optional | Reason for the limit |
Response Data
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Not Required | Success flag | ||
code | number | Not Required | Result code | ||
bizCode | string | Not Required | bizcode | ||
message | string | Not Required | Message | ||
visible | boolean | Not Required | Visibility | ||
data | object | Required | |||
├─ totalSize | number | Required | Total count | ||
├─ repeatSize | number | Required | Number of duplicates in the database | ||
├─ repeatList | string[] | Required | Duplicate set | Item type: string | |
├─ | Not Required | Duplicate number |
11 Call Number Inquiry for Call Restrictions
Basic Information
Path: /api/v1/calllimit/{callType}/numbers/search
Method: GET
Interface Description:
Overview
Query for restricted call numbers with support for pagination.
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/calllimit/{callType}/numbers/search?AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd&pageNum=1&pageSize=20'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"paging": {
"pageNum": 1,
"pageSize": 20,
"total": 1
},
"data": [
{
"id": 100,
"number": "18710180977",
"numberInputModel": 1,
"limitType": "foever",
"limitTime": null,
"unlimitTime": null,
"limitReason": null,
"createdAt": "2021-07-17 19:11:16",
"updatedAt": "2021-07-17 19:11:20",
"createdUserId": null,
"updatedUserId": null
}
]
}
Request Parameters
Path Parameters
Parameter Name | Example | Remarks |
---|---|---|
callType | in | in: Incoming call out: Outgoing call |
Query
Parameter Name | Required | Example | Remarks |
---|---|---|---|
pageNum | No | 1 | Page number |
pageSize | No | 20 | Rows per page |
keyword | No | 1871018 | Keyword (number), supports fuzzy search |
Response Data
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | bizCode | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility | ||
paging | object | Required | Paging information | ||
├─ pageNum | number | Required | Page number | ||
├─ pageSize | number | Required | Rows per page | ||
├─ total | number | Required | Total count | ||
data | object[] | Required | Restricted number data | Item type: object | |
├─ id | number | Required | Unique identifier | ||
├─ number | string | Required | Number | ||
├─ createdAt | string | Required | Creation time | ||
├─ limitType | string | Required | Limit type: Forever - forever , Minute - minute , Hour - hour , Day - day , Week - week , Month - month , Year - year | ||
├─ unlimitTime | string | Optional | Time to lift the restriction | ||
├─ limitReason | string | Required | Reason for the restriction |
12 Get Phone Number Details by Mobile Number
Basic Information
Path: /api/v1/calllimit/{callType}/tel/{number}
Method: GET
Interface Description:
Overview
Retrieve the details of a phone number by the mobile number.
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/calllimit/in/tel/17000000000?AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"data": {
"id": 100,
"number": "17000000000",
"numberInputModel": 1,
"limitType": "forever",
"limitTime": null,
"unlimitTime": null,
"limitReason": null,
"createdAt": "2021-07-17 19:11:16",
"updatedAt": "2021-07-17 19:11:20",
"createdUserId": null,
"updatedUserId": null
}
}
Request Parameters
Path Parameters
Parameter Name | Example | Remarks |
---|---|---|
callType | in | Call type: in - incoming, out - outgoing |
number | 17000000000 | Phone number |
Response Data
Name | Type | Required | Default | Notes | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | bizCode | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility | ||
data | object | Required | Data | ||
├─ id | number | Required | Unique identifier | ||
├─ number | string | Required | Number | ||
├─ numberInputModel | number | Required | Number input mode 1:Manual input 2:Batch import 3:Regex input | ||
├─ limitType | string | Required | Limit type Permanent:forever Minute:minute Hour:hour Day:day Week:week Month:month Year:year | ||
├─ limitTime | number | Required | Limit duration | ||
├─ unlimitTime | string | Required | Time to lift the limit | ||
├─ limitReason | string | Required | Reason for the limit | ||
├─ createdAt | string | Required | Creation time | ||
├─ updateAt | string | Required | Update time | ||
├─ createdUserId | string | Required | Creator | ||
├─ updateUserId | string | Required | Updater |
13 Modify Restricted Number Information by Phone Number
Basic Information
Path: /api/v1/calllimit/{callType}/tel/{number}
Method: PUT
Interface Description:
Overview
Modify restricted number information via mobile phone number
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/calllimit/in/tel/17000000000?AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X PUT -H 'Content-Type: application/json' -d '{
"limitType": "day",
"limitTime": 1,
"limitReason":"testing"
}'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false,
"data": {
"number": "17000000000",
"limitType": "day",
"limitTime": 1,
"limitReason": "testing"
}
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Path Parameters
Parameter Name | Example | Notes |
---|---|---|
callType | in | Call type: in for inbound, out for outbound |
number | 17000000000 | The phone number |
Body
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
limitType | string | Required | - | Type of Limit: forever, minute, hour, day, week, month, year | - |
limitTime | number | Optional | - | Duration of the Limit | - |
limitReason | string | Optional | - | Reason for the Limit | - |
Response Data
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Not Required | Success flag | ||
code | number | Not Required | Result code | ||
bizCode | string | Not Required | bizcode | ||
message | string | Not Required | Message | ||
visible | boolean | Not Required | Visibility | ||
data | object | Not Required | |||
├─ number | string | Not Required | Number | ||
├─ limitType | string | Not Required | Limit type: Permanent - forever, Minute - minute, Hour - hour, Day - day, Week - week, Month - month, Year - year | ||
├─ limitTime | number | Not Required | Limit duration | ||
├─ limitReason | string | Not Required | Reason for the limit |
14 Delete Restricted Number Information by Phone Number
Basic Information
Path: /api/v1/calllimit/{callType}/tel/{number}
Method: DELETE
Interface Description:
Overview
Remove restricted number information by phone number
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/calllimit/in/tel/17000000000?AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X DELETE
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false
}
Request Parameters
Headers
Parameter Name | Parameter Value | Required | Example | Notes |
---|---|---|---|---|
Content-Type | application/x-www-form-urlencoded | Yes |
Path Parameters
Parameter Name | Example | Notes |
---|---|---|
callType | in | Call type: in for incoming, out for outgoing |
number | 18920765652 | Number ID |
Response Data
Name | Type | Required | Default | Notes | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | bizCode | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility |
15 Batch Delete Restricted Numbers by Phone
Basic Information
Path: /api/v1/calllimit/{callType}/tel/batch-delete
Method: PUT
Interface Description:
Overview
Batch delete restricted numbers by phone number
Example
Request
$ curl 'https://demo.udesk.cn/api/v1/calllimit/in/tel/batch-delete?AppId=1234567890abc&Timestamp=1496631984&Token=4c1947cb3d87743b613f3a4843ae74306529d4fd' -i -X PUT -H 'Content-Type: application/json' -d '{
"numbers": [
"17000000000"
]
}'
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 522
{
"succeed": true,
"code": 200,
"bizCode": "000000",
"message": "OK",
"visible": false
}
Request Parameters
Headers
Parameter Name | Parameter Value | Mandatory | Example | Notes |
---|---|---|---|---|
Content-Type | application/json | Yes |
Path Parameters
Parameter Name | Example | Notes |
---|---|---|
callType | in | Call type "in": inbound, "out": outbound |
Body
Name | Type | Required | Default | Remarks | Additional Information |
---|---|---|---|---|---|
numbers | string[] | Required | Multiple number IDs | Item Type: string | |
├─ | Not Required | Number |
Response Data
Name | Type | Required | Default | Notes | Additional Information |
---|---|---|---|---|---|
succeed | boolean | Required | Success flag | ||
code | number | Required | Result code | ||
bizCode | string | Required | bizCode | ||
message | string | Required | Message | ||
visible | boolean | Required | Visibility |