General Authentication
Request URL
https://ccps.s4.udesk.cn/api/v1/ads/external/{relative address}?{URL params}&Email={email}&AppId={appId}&Timestamp={timestamp}&Token={token}
The parts enclosed in brackets mean the following:
Variable | Description |
---|
relative address: Interface relative address | The relative URL of the API |
URL params: URL parameters | Parameters required for the interface request |
email: User email | User's email address |
appId: Tenant appId | Tenant appId; Acquisition method: System Management -> System Settings -> System Information |
secret: Tenant secret | Tenant secret; Acquisition method: System Management -> System Settings -> System Information |
timestamp: Timestamp | The timestamp when the request is initiated, the number of seconds since '1970-01-01 00:00:00'. Unless otherwise specified, the default expiration time is five minutes |
token: Signature | Identity authentication signature, unless otherwise specified, this parameter is required for each API request. For the detailed generation algorithm, please refer to Authentication Method |
Authentication Method
- Example
Calculate the signature:
appId:18a58d6d-2b4e-44de-5725-31b9e5dbb4b4
secret:secret-37a4123c-538f-4b91-69c1-3fd15500c9b2
timestamp:1496631984
HmacUtils hmacUtils = new HmacUtils(HmacAlgorithms.HMAC_SHA_1, "secret-37a4123c-538f-4b91-69c1-3fd15500c9b2");
hmacUtils.hmacHex("18a58d6d-2b4e-44de-5725-31b9e5dbb4b4"+"1496631984")
-> 6d9faaab002f49b2a9b8c634279a7e29414ea1cb
Request URL:
https://ccps.s4.udesk.cn/api/v1/ads/external/callTasks?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb
Interface Description
Import Contact Instructions:
- If you use the contact list and the corresponding import numbers, then by editing the outbound call task, the numbers are associated with the task.
- If you use the default contact list and the corresponding import numbers, then directly import them into the corresponding task.
Online Domain Name Instructions:
- The domain name in the document example is demo.udesk.cn. In actual docking, you need to use different domain names according to the region where the tenant is opened. For the specific domain name, you can contact the tenant opening personnel.
Create Outbound Call Task Interface
Request URL
- POST /api/v1/ads/external/callTasks/ai
Request Parameters
Parameter | Type | Nullable | Description |
---|
Email | String | true | Email address |
AppId | String | false | Tenant appId |
Timestamp | Long | false | Timestamp (e.g., current seconds, 1533092860) |
Token | String | false | Signature: Authentication signature (see general authentication instructions) |
name | String | false | Task name |
remark | String | true | Description |
callTemplateId | int | false | Outbound call template ID |
robotDefId | int | false | Outbound call robot definition ID |
spnumberType | int | false | Caller number type (1 trunk number 2 number pool) |
spnumberValue | int | false | Caller number value |
startMode | int | false | Start mode (1 manual 2 timed 3 periodic start) |
startTime | date | true | Start time (timed, format: yyyy-MM-dd HH:mm:ss) |
workTimeId | int | false | Work time ID |
priority | int | false | Task priority |
controlOptionList | Array | true | Task options (enumerated integer array, 1 stop automatically if no contacts) |
ivrMode | int | true | IVR mode (0 off 1 on) |
callType | int | true | Outbound call mode (0: AI outbound 1: predictive mode 3: precise mode 6: precise IVR 7: pure IVR 8: AI predictive outbound) |
concurrentLimit | int | false | Task concurrency limit |
dialParam | Object | true | Dialing setting parameters |
dialParam.optimizeParam | int | true | Optimization parameters (1 seat utilization 2 abandonment rate 3 average seat waiting time) |
dialParam.optimizeTarget | int | true | Optimization target |
redialSceneList | Array | true | Redial options |
redialSceneList[].type | int | false | Call result type (1 invalid call 2 call failure 3 label) |
redialSceneList[].result | String | true | Call result (power off, no answer, out of service, 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) |
redialSceneList[].dealOption | int | false | Handling method (1 redial) |
redialSceneList[].redialTimes | int | true | Redial attempts |
redialSceneList[].redialGuide | int | true | Time interval (minutes) |
redialSceneList[].guideIncrement | int | true | Interval increment (minutes) |
redialSceneList[].nextDeal | int | true | Subsequent processing (1 next contact phone) |
taskContactBatchRelList | Array | true | Contact list |
taskContactBatchRelList[].contactBatchId | int | true | Contact list ID |
taskContactBatchRelList[].callWeight | int | true | Call weight |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | false | Processing flag (not in use) |
code | String | false | Return code |
bizCode | String | false | Business code (not in use) |
message | String | false | Return message |
visible | boolean | false | Visibility (not in use) |
data | Object | true | Results |
data.id | int | false | Task ID |
data.name | String | false | Task name |
data.remark | String | true | Description |
data.callTemplateId | int | false | Call template ID |
data.robotDefId | int | false | Call robot definition ID |
data.ivrId | int | true | IVR ID |
data.queueId | int | true | Queue value |
data.spnumberType | int | false | Caller number type (1 relay number 2 number pool) |
data.spnumberValue | int | false | Caller number value |
data.startMode | int | false | Start mode (1 manual 2 timed 3 periodic start) |
data.startTime | date | true | Start time (used for timing in format yyyy-MM-dd HH:mm:ss) |
data.expireTime | date | true | Task expiration time |
data.validDuration | int | true | Call validity duration threshold |
data.workTimeId | int | false | Work time |
data.priority | int | false | Task priority |
data.controlOption | String | false | Task priority |
data.controlOptionList | Array | true | Task options (enumerated integer array, 1 stop automatically if no contact) |
data.resetOption | int | true | Reset option |
data.status | int | true | Task status |
data.totalCount | int | true | Number of customers |
data.execCount | int | true | Number of customers executed |
data.customerConnectCount | int | true | Customer answers |
data.agentConnectCount | int | true | Agent answers |
data.retryCount | int | true | Number of attempts |
data.numberFilter | int | true | Number filtering |
data.numberFilterList | Array | true | Not in use |
data.ivrMode | int | false | IVR mode (0 off 1 on) |
data.callType | int | false | Call mode (0: AI call 1: predictive mode 3: precise mode 6: precise IVR 7: pure IVR 8: AI predictive call) |
data.concurrentLimit | int | false | Task concurrency limit |
data.createdUserId | String | true | Creator ID |
data.updatedUserId | String | true | Last updater ID |
data.createdAt | String | true | Creation time |
data.contactBatchIds | String | true | Contact IDs |
data.contactBatchIdList | Array | true | Not in use |
data.taskContactBatchRelList | Array | true | Contact information |
data.taskContactBatchRelList[].callTaskId | int | true | Call task ID |
data.taskContactBatchRelList[].contactBatchId | int | true | Contact list ID |
data.taskContactBatchRelList[].contactBatchName | String | true | Contact list name |
data.taskContactBatchRelList[].callWeight | int | true | Weight |
data.taskContactBatchRelList[].status | int | true | Status |
data.taskContactBatchRelList[].importStatus | int | true | Import status (1 waiting 2 importing 3 imported) |
data.taskContactBatchRelList[].totalCount | int | true | Number of customers |
data.taskContactBatchRelList[].execCount | int | true | Number of customers executed |
data.taskContactBatchRelList[].customerConnectCount | int | true | Customer answers |
data.taskContactBatchRelList[].agentConnectCount | int | true | Agent answers |
data.taskContactBatchRelList[].retryCount | int | true | Number of attempts |
data.taskContactBatchRelList[].createdUserId | String | true | Creator ID |
data.taskContactBatchRelList[].updatedUserId | String | true | Last updater ID |
data.taskContactBatchRelList[].deleteFlag | int | true | Deletion flag (0 not deleted 1 deleted) |
data.redialSceneJson | String | true | Redial options |
data.callTemplate | Object | true | Call template |
data.callTemplate.name | String | true | Name |
data.callTemplate.remark | String | true | Remark |
data.callTemplate.numberFilter | String | true | Number filtering |
data.callTemplate.numberFilterList | Array | true | Not in use |
data.callTemplate.ivrMode | int | true | IVR mode: 0 off 1 on |
data.callTemplate.callType | int | true | Call mode (0: AI call 1: predictive mode 3: precise mode 6: precise IVR 7: pure IVR 8: AI predictive call) |
data.callTemplate.dialParamJson | String | true | Not in use |
data.callTemplate.dialParam | Object | true | Not in use |
data.callTemplate.dialParam.optimizeParam | int | true | Not in use |
data.callTemplate.dialParam.optimizeTarget | int | true | Not in use |
data.callTemplate.dialParam.callInDurationAverage | int | true | Not in use |
data.callTemplate.dialParam.callOutDurationAverage | int | true | Not in use |
data.callTemplate.dialParam.callInPerHour | int | true | Not in use |
data.callTemplate.dialParam.callPerMinute | int | true | Not in use |
data.callTemplate.dialParam.longDurationIgnore | int | true | Not in use |
data.callTemplate.concurrentLimit | int | true | Task concurrency limit |
data.callTemplate.createdUserId | String | true | Last updater ID |
data.callTemplate.updatedUserId | String | true | Creator ID |
data.callTemplate.deleteFlag | int | true | Deletion flag (0 not deleted 1 deleted) |
data.callTemplate.redialSceneJson | String | true | Redial options |
data.callTemplate.category | int | true | Category (1 automatic call 2 AI) |
data.callTemplate.ivrId | int | true | IVR ID |
data.callTemplate.queueId | int | true | Queue ID |
data.callTemplate.spnumberType | int | true | Caller number type |
data.callTemplate.spnumberValue | int | true | Caller number value |
data.callTemplate.startMode | int | true | Start mode |
data.callTemplate.startTime | date | true | Start time |
data.callTemplate.expireTime | date | true | Task expiration time |
data.callTemplate.workTimeId | int | true | Work time |
data.callTemplate.validDuration | int | true | Call validity duration threshold |
data.callTemplate.maxRingSeconds | int | true | Maximum ring duration threshold |
data.callTemplate.robotDefId | int | true | Not in use |
data.momentLimit | int | true | Not in use |
data.operatorCreateName | String | true | Operator creator name |
data.category | int | true | Category (1 automatic call 2 AI) |
data.dialParam | Object | true | Dialing setting parameters |
data.dialParam.optimizeParam | int | true | Optimization parameter (1 agent utilization 2 abandoned call rate 3 average agent waiting time) |
data.dialParam.optimizeTarget | int | true | Optimization target |
data.redialSceneList | Array | true | Redial options |
data.redialSceneList[].type | int | true | Call result type (1 invalid call 2 call failure 3 label) |
data.redialSceneList[].result | String | true | Call result (powered off, empty number, suspended, busy, user rejection, unable to connect, service suspended, user busy, incorrect dialing method, inbound restriction, failed call transfer, network busy, unanswered, arrears, unable to answer, number change, line fault, call back later, other) |
data.redialSceneList[].valid | int | true | Whether it is valid (invalid by default -2) |
data.redialSceneList[].labelInfos | Array | true | Labels |
data.redialSceneList[].dealOption | int | false | Handling method (1 redial) |
data.redialSceneList[].redialTimes | int | true | Redial attempts |
data.redialSceneList[].redialGuide | int | true | Time interval (minutes) |
data.redialSceneList[].guideIncrement | int | true | Interval increment (minutes) |
data.redialSceneList[].nextDeal | int | true | Subsequent processing (1 next contact phone) |
data.taskContactBatchRelList | Array | true | Contact list |
data.taskContactBatchRelList[].contactBatchId | int | true | Contact list ID |
data.taskContactBatchRelList[].callWeight | int | true | Call weight |
Request Example
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/ai?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{
"name":"test Dialing1",
"remark":"test Dialing",
"callTemplateId":5,
"robotDefId":300001,
"spnumberType":1,
"spnumberValue":72,
"startMode":1,
"startTime":null,
"workTimeId":31,
"priority":1,
"controlOptionList":[
1
],
"ivrMode":1,
"callType":0,
"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,
"robotDefId":300001,
"spnumberType":1,
"spnumberValue":72,
"startMode":1,
"startTime":null,
"workTimeId":31,
"priority":1,
"controlOption":"1",
"controlOptionList":[
1
],
"status":1,
"ivrMode":1,
"callType":0,
"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
}
]
}
}
Edit Outbound Call Task Interface
Request URL
- PUT /api/v1/ads/external/callTasks/{id}
Request Parameters
Parameter | Type | Nullable | Description |
---|
Email | String | true | Email |
AppId | String | false | Tenant AppId |
Timestamp | Long | false | Timestamp (e.g., current seconds, 1533092860) |
Token | String | false | Signature: Authentication signature (see general authentication instructions) |
id | int | false | Task ID |
name | String | true | Task Name |
remark | String | true | Description |
spnumberType | int | false | Caller Number Type (1 Relay Number 2 Number Pool) |
spnumberValue | int | true | Caller Number Value |
callType | int | false | Outbound Call Mode (0: AI Outbound Call 1: Predictive Mode 3: Precision Mode 6: Precision IVR 7: Pure IVR 8: AI Predictive Outbound Call) |
workTimeId | int | true | Work Time |
priority | int | true | Task Priority |
controlOptionList | Array | true | Task Options (enumerated integer array, 1 Stop Automatically if No Contacts) |
concurrentLimit | int | true | Task Concurrency Limit |
taskContactBatchRelList | Array | true | Contact List |
taskContactBatchRelList[].contactBatchId | int | true | Contact List ID |
taskContactBatchRelList[].callWeight | int | true | Call Weight |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | false | Processing Indicator (not currently used) |
code | String | false | Return Code |
bizCode | String | false | Business Code (not currently used) |
message | String | false | Return Message |
visible | boolean | false | Visibility (not currently used) |
data | Object | true | Result |
data.id | int | false | Task ID |
data.name | String | false | Task Name |
data.remark | String | true | Description |
data.callTemplateId | int | false | Outbound Call Template |
data.robotDefId | int | false | Outbound Robot Definition ID |
data.ivrId | int | true | IVR ID |
data.queueId | int | true | Queue Value |
data.spnumberType | int | false | Caller Number Type (1 Relay Number 2 Number Pool) |
data.spnumberValue | int | false | Caller Number Value |
data.startMode | int | false | Start Mode (1 Manual 2 Timed 3 Periodic Start) |
data.startTime | date | true | Start Time (Timed use yyyy-MM-dd HH:mm:ss) |
data.expireTime | date | true | Task Expiration Time |
data.validDuration | int | true | Call Validity Duration Threshold |
data.workTimeId | int | false | Work Time |
data.priority | int | false | Task Priority |
data.controlOption | String | false | Task Priority |
data.controlOptionList | Array | true | Task Options (enumerated integer array, 1 Stop Automatically if No Contacts) |
data.resetOption | int | true | Reset Option |
data.status | int | true | Task Status |
data.totalCount | int | true | Number of Customers |
data.execCount | int | true | Executed Customers |
data.customerConnectCount | int | true | Customer Answered |
data.agentConnectCount | int | true | Agent Answered |
data.retryCount | int | true | Retry Count |
data.numberFilter | int | true | Number Filter |
data.numberFilterList | Array | true | Not currently used |
data.ivrMode | int | false | IVR Mode (0 Off 1 On) |
data.callType | int | false | Outbound Call Mode (0: AI Outbound Call 1: Predictive Mode 3: Precision Mode 6: Precision IVR 7: Pure IVR 8: AI Predictive Outbound Call) |
data.concurrentLimit | int | false | Task Concurrency Limit |
data.createdUserId | String | true | Creator ID |
data.updatedUserId | String | true | Last Update User ID |
data.createdAt | String | true | Creation Time |
data.contactBatchIds | String | true | Contact IDs |
data.contactBatchIdList | Array | true | Not currently used |
data.taskContactBatchRelList | Array | true | Contact Information |
data.taskContactBatchRelList[].callTaskId | int | true | Outbound Task ID |
data.taskContactBatchRelList[].contactBatchId | int | true | Contact List ID |
data.taskContactBatchRelList[].contactBatchName | String | true | Contact List Name |
data.taskContactBatchRelList[].callWeight | int | true | Weight |
data.taskContactBatchRelList[].status | int | true | Status |
data.taskContactBatchRelList[].importStatus | int | true | Import Status (1 Waiting 2 Importing 3 Imported) |
data.taskContactBatchRelList[].totalCount | int | true | Number of Customers |
data.taskContactBatchRelList[].execCount | int | true | Executed Customers |
data.taskContactBatchRelList[].customerConnectCount | int | true | Customer Answered |
data.taskContactBatchRelList[].agentConnectCount | int | true | Agent Answered |
data.taskContactBatchRelList[].retryCount | int | true | Retry Count |
data.taskContactBatchRelList[].createdUserId | String | true | Creator ID |
data.taskContactBatchRelList[].updatedUserId | String | true | Last Update User ID |
data.taskContactBatchRelList[].deleteFlag | int | true | Delete Flag (0 Not Deleted 1 Deleted) |
data.redialSceneJson | String | true | Redial Options |
data.callTemplate | Objcet | true | Outbound Call Template |
data.callTemplate.name | String | true | Name |
data.callTemplate.remark | String | true | Remark |
data.callTemplate.numberFilter | String | true | Number Filter |
data.callTemplate.numberFilterList | Array | true | Not currently used |
data.callTemplate.ivrMode | int | true | IVR Mode: 0 Off 1 On |
data.callTemplate.callType | int | true | Outbound Call Mode (0: AI Outbound Call 1: Predictive Mode 3: Precision Mode 6: Precision IVR 7: Pure IVR 8: AI Predictive Outbound Call) |
data.callTemplate.dialParamJson | String | true | Not currently used |
data.callTemplate.dialParam | Object | true | Not currently used |
data.callTemplate.dialParam.optimizeParam | int | true | Not currently used |
data.callTemplate.dialParam.optimizeTarget | int | true | Not currently used |
data.callTemplate.dialParam.callInDurationAverage | int | true | Not currently used |
data.callTemplate.dialParam.callOutDurationAverage | int | true | Not currently used |
data.callTemplate.dialParam.callInPerHour | int | true | Not currently used |
data.callTemplate.dialParam.callPerMinute | int | true | Not currently used |
data.callTemplate.dialParam.longDurationIgnore | int | true | Not currently used |
data.callTemplate.concurrentLimit | int | true | Task Concurrency Limit |
data.callTemplate.createdUserId | String | true | Last Update User ID |
data.callTemplate.updatedUserId | String | true | Creator ID |
data.callTemplate.deleteFlag | int | true | Delete Flag (0 Not Deleted 1 Deleted) |
data.callTemplate.redialSceneJson | String | true | Redial Options |
data.callTemplate.category | int | true | Category (1 Automatic Outbound Call 2 AI) |
data.callTemplate.ivrId | int | true | IVR ID |
data.callTemplate.queueId | int | true | Queue ID |
data.callTemplate.spnumberType | int | true | Caller Number Type |
data.callTemplate.spnumberValue | int | true | Caller Number Value |
data.callTemplate.startMode | int | true | Start Mode |
data.callTemplate.startTime | date | true | Start Time |
data.callTemplate.expireTime | date | true | Task Expiration Time |
data.callTemplate.workTimeId | int | true | Work Time |
data.callTemplate.validDuration | int | true | Call Validity Duration Threshold |
data.callTemplate.maxRingSeconds | int | true | Maximum Ring Duration Threshold |
data.callTemplate.robotDefId | int | true | Not currently used |
data.momentLimit | int | true | Not currently used |
data.operatorCreateName | String | true | Operator Creator |
data.category | int | true | Category (1 Automatic Outbound Call 2 AI) |
data.dialParam | Object | true | Dialing Setting Parameters |
data.dialParam.optimizeParam | int | true | Optimization Parameter (1 Agent Utilization 2 Abandon Call Rate 3 Average Agent Wait Time) |
data.dialParam.optimizeTarget | int | true | Optimization Target |
data.redialSceneList | Array | true | Redial Options |
data.redialSceneList[].type | int | true | Call Result Type (1 Invalid Call 2 Call Failure 3 Tag) |
data.redialSceneList[].result | String | true | Call Result (Power Off, Empty Number, Out of Service, Busy, User Rejection, Unable to Connect, Service Suspended, User Busy, Incorrect Dialing Method, Call-In Restriction, Call Transfer Failure, Network Busy, No Answer, Overdue Payment, Unable to Answer, Number Change, Line Fault, Call Back Later, Other) |
data.redialSceneList[].dealOption | int | false | Handling Method (1 Red |
Start Outbound Call Task Interface
Request Address
- PUT /api/v1/ads/external/callTasks/status/{id}/executing
Request Parameters
Parameter | Type | Nullable | Description |
---|
Email | String | true | Email |
AppId | String | false | Tenant App ID |
Timestamp | Long | false | Timestamp (e.g., current seconds, 1533092860) |
Token | String | false | Signature: Identity authentication signature (see Common Authentication Instructions) |
id | int | false | Task ID |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | false | Processing identifier (not currently used) |
code | String | false | Return code |
bizCode | String | false | Business code (not currently used) |
message | String | false | Return message |
visible | boolean | false | Visibility indicator (not currently used) |
Request Example
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/status/1/executing?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X PUT -H 'Content-Type: application/json'
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
}
Stop Outbound Call Task API
Request URL
- PUT /api/v1/ads/external/callTasks/status/{id}/stop
Request Parameters
Parameter | Type | Nullable | Description |
---|
Email | String | True | Email |
AppId | String | False | Tenant AppId |
Timestamp | Long | False | Timestamp (e.g., current seconds, 1533092860) |
Token | String | False | Signature: Authentication signature (see general authentication instructions) |
id | int | False | Task ID |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | False | Processing flag (temporarily not in use) |
code | String | False | Return code |
bizCode | String | False | Business code (temporarily not in use) |
message | String | False | Return message |
visible | boolean | False | Visibility (temporarily not in use) |
Request Example
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/status/1/stop?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X PUT -H 'Content-Type: application/json'
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
}
Create Default AI Contact List Interface
Request Address
- POST /api/v1/ads/external/contactBatchs/defaultContact
Request Parameters
Parameter | Type | Nullable | Description |
---|
Email | String | true | Email |
AppId | String | false | Tenant App ID |
Timestamp | Long | false | Timestamp (e.g., current seconds, 1533092860) |
Token | String | false | Signature: Identity authentication signature (see Common Authentication Instructions) |
callTaskId | int | false | Outbound call task ID |
name | String | false | Contact list name |
remark | String | true | Remark |
focus | String | true | Focus |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | false | Processing identifier (not currently used) |
code | String | false | Return code |
bizCode | String | false | Business code (not currently used) |
message | String | false | Return message |
visible | boolean | false | Visibility indicator (not currently used) |
data | Object | true | Result |
data.id | int | false | Contact list ID |
data.callTaskId | int | false | Outbound call task ID |
data.name | String | false | Contact list name |
data.remark | String | true | Remark |
data.focus | String | true | Focus |
data.status | int | false | Status (1 waiting, 2 importing, 3 completed) |
Request Example
$ curl 'https://demo.udesk.cn/api/v1/ads/external/contactBatchs/defaultContact?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{
"callTaskId":1,
"name":"test Dialing1",
"remark":"test Dialing",
"focus":"tag"
}'
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,
"callTaskId": 1,
"name": "test Dialing1",
"remark": "test Dialing",
"focus": "tag",
"status": 3
}
}
Import Contact Number Interface (Up to 50 at a Time)
Request Address
- POST /api/v1/ads/external/contactBatchs/syncNumber
Request Parameters
Parameter | Type | Nullable | Description |
---|
Email | String | true | Email |
AppId | String | false | Tenant App ID |
Timestamp | Long | false | Timestamp (e.g., current seconds, 1533092860) |
Token | String | false | Signature: Identity authentication signature (see Common Authentication Instructions) |
contactBatchId | int | false | Contact list ID |
dealType | int | true | Duplicate handling type (1 no check 2 current task) |
startTaskFlag | int | true | Whether to start the outbound task after import completion 1: Start 0: Do not start |
encryptionFlag | int | false | Whether to encrypt (1-yes 0-no) |
algorithmType | int | true | Encryption type (1 aes 2 des) |
secretKey | String | true | Encryption key |
encryptionRange | Array | true | Encrypted fields (["name","mobile"]) |
numberList | Array | false | Number list |
numberList[].name | String | true | Contact name |
numberList[].mobile | String | false | Mobile number, phone number (landline format: 02186391234, i.e., area code + landline number, no special characters separating the area code and landline number; mobile phone number format: 18812345678) |
numberList[].companyName | String | true | Company |
numberList[].remark | String | true | Remark |
numberList[].variates | Array | true | Custom variables (format: [{"key":"weather","type":"string","value":"Beijing"}]) |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | false | Processing identifier (not currently used) |
code | String | false | Return code |
bizCode | String | false | Business code (not currently used) |
message | String | false | Return message |
visible | boolean | false | Visibility indicator (not currently used) |
data | Object | true | Result |
data.contactBatchId | int | false | Contact list ID |
data.successCount | int | false | Number of successfully imported numbers |
data.failedCount | int | false | Number of failed imported numbers |
data.dealType | int | false | Duplicate handling type |
data.failedNumberList | Array | true | Array of failed imported numbers |
data.encryptionFlag | int | false | Whether to encrypt |
data.algorithmType | int | true | Encryption type |
data.secretKey | String | true | Encryption key |
data.encryptionRange | Array | true | Encrypted fields |
data.failedNumberList[].name | String | true | Name |
data.failedNumberList[].mobile | String | true | Number |
data.failedNumberList[].companyName | String | true | Company |
data.failedNumberList[].remark | String | true | Remark |
data.failedNumberList[].variates | Array | true | Custom variables (format: [{"key":"weather","type":"string","value":"Beijing"}]) |
data.failedNumberList[].failedReason | String | true | Failure reason |
Request Example
$ curl 'https://demo.udesk.cn/api/v1/ads/external/contactBatchs/syncNumber?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -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 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": {
"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"
}
]
}
}
Create Outbound Task Interface (Simplified)
Request URL
- POST /v1/ads/callTasks/simply
Request Parameters
Parameter | Type | Nullable | Description |
---|
name | String | false | Task name |
callTemplateId | int | false | Task template ID |
priority | int | false | Task priority |
startMode | int | false | Start mode (1: Manual, 2: Scheduled, 3: Recurring) |
startTime | String | true | Start time (mandatory for scheduled start) Format: "yyyy-MM-dd HH:mm:ss" |
startDate | String | true | Start date (mandatory for recurring start) Format: "yyyy-MM-dd HH:mm:ss" |
endDate | String | true | End date (mandatory for recurring start) Format: "yyyy-MM-dd" |
startTimePoint | String | true | Start time point (mandatory for recurring start) Format: "HH:mm:ss" |
expireTime | String | true | Task end time Format: "yyyy-MM-dd HH:mm:ss" |
dealType | String | true | Duplicate handling type (1: No duplicate check, 2: Current task) |
remark | String | true | Remarks |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | false | Processing flag (not currently in use) |
code | String | false | Response code |
bizCode | String | false | Business code (not currently in use) |
message | String | false | Response message |
visible | boolean | false | Visibility flag (not currently in use) |
data | Object | true | Result |
data.taskId | Long | false | Task ID |
data.contactBatchId | Long | false | Contact list ID |
Request Example
$ curl 'https://demo.udesk.cn/api/v1/ads/callTasks/simply?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{
"callTemplateId": 148,
"name": "Test Task",
"startMode": 2,
"startTime": "2022-07-20 00:00:00",
"priority": 2,
"expireTime": "2022-07-21 23:59:59",
"remark": "Test Task"
}'
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": {
"taskId": 102321,
"contactBatchId": 562
}
}
Query Outbound Task List (Basic Version)
Request URL
- POST /v1/ads/external/callTasks/basicSearch
Request Parameters
Parameter | Type | Nullable | Description |
---|
pageNum | int | true | Page number |
pageSize | int | true | Number of items per page, default is 20 |
name | String | true | Task name |
status | int | true | Task status (1: Suspended, 2: Running, 3: Stopped, 4: Pausing, 5: Resuming, 6: Expired) |
category | int | true | Task category (1: Regular Auto Dialing, 2: AI Auto Dialing) |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | false | Processing flag (not currently in use) |
code | String | false | Response code |
bizCode | String | false | Business code (not currently in use) |
message | String | false | Response message |
visible | boolean | false | Visibility flag (not currently in use) |
paging | object | false | Pagination information |
paging.pageNum | Int | false | Page number |
paging.pageSize | Int | false | Number of rows per page |
paging.total | Int | false | Total data count |
data | Array | false | Results, empty array when there's no query result |
data.id | Long | false | Task ID |
data.name | String | false | Task name |
data.callTemplateId | Long | false | Template ID |
data.callTemplateName | String | false | Template name |
data.category | int | false | Task category (1: Regular Auto Dialing, 2: AI Auto Dialing) |
data.callType | int | false | Outbound mode (0: AI Dialing, 1: Predictive Mode, 3: Precise Mode, 6: Precise IVR, 7: Pure IVR, 8: AI Predictive Dialing) |
data.ivrId | Long | true | Outbound IVR ID |
data.queueId | Long | true | Outbound queue ID |
data.robotDefId | Long | true | Script ID |
data.status | int | false | Task status (1: Suspended, 2: Running, 3: Stopped, 4: Pausing, 5: Resuming, 6: Expired) |
Request Example
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/basicSearch?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb' -i -X POST -H 'Content-Type: application/json' -d '{
"pageNum":1,
"pageSize":1,
"status": 1,
"name": "Outbound Task",
"category": 2
}'
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,
"paging": {
"pageNum": 1,
"pageSize": 1,
"total": 1
},
"data": [
{
"id": 1158,
"name": "Outbound Task Test",
"callTemplateId": 204,
"callTemplateName": "Outbound Template",
"category": 2,
"callType": 0,
"ivrId": null,
"queueId": null,
"robotDefId": 10,
"status": 1
}
]
}
Outbound Task Status Query Interface
Request URL
- GET /v1/ads/external/callTasks/{id}/status
Request Parameters
Parameter | Type | Nullable | Description |
---|
id | Long | false | Task ID (path parameter) |
Response Parameters
Parameter | Type | Nullable | Description |
---|
succeed | boolean | false | Processing flag (not currently in use) |
code | String | false | Response code |
bizCode | String | false | Business code (not currently in use) |
message | String | false | Response message |
visible | boolean | false | Visibility flag (not currently in use) |
data | Object | true | Result, empty when there's no data |
data.name | String | false | Task name |
data.status | int | false | Task status (1: Suspended, 2: Running, 3: Stopped, 4: Pausing, 5: Resuming, 6: Expired) |
Request Example
$ curl 'https://demo.udesk.cn/api/v1/ads/external/callTasks/1/status?AppId=18a58d6d-2b4e-44de-5725-31b9e5dbb4b4&Timestamp=1496631984&Token=6d9faaab002f49b2a9b8c634279a7e29414ea1cb'
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": {
"name": "Outbound Task Test",
"status": 1
}
}