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

Adding Outbound Numbers

Scenario

This interface is invoked to add outbound numbers to an outbound campaign.

Usage Description

  • Prerequisites
    • You have applied for a developer account.
    • The outbound campaign has been created.
  • Restrictions
    • The number of incomplete outbound calls in an outbound campaign cannot exceed 200,000.
    • A maximum of 20 numbers can be added to an outbound campaign task at a time, and the interface invoking time cannot be less than 1 second.
    • The called numbers added each time must be unique.
    • The called numbers added each time are not in the blacklist, or they are in the blacklist but the restriction period and maximum number of calls are set for them and not exceeded.
    • Outbound numbers cannot be added to complete tasks.
    • Outbound numbers cannot be added to ongoing tasks.

Method

This interface supports only the POST method.

URI

https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/calldata/{campaignId}

In the URL, ip indicates the IP address of the CC-iSales server, and port indicates the HTTPS port number of the CC-iSales server.

Table 1 Parameters in the URL

No.

Parameter

Type

Mandatory or Not

Description

1

vdnId

Integer

Yes

VDN ID.

The value is an integer ranging from 1 to 9999.

2

campaignId

Integer

Yes

ID of an outbound campaign.

Request Description

Table 2 Request header parameters

No.

Parameter

Type

Mandatory or Not

Description

1

Content-Type

String

Yes

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

2

Authorization

String

Yes

For details about the generation mode, see C2 Monitoring, System Outbound Call, CDR, and Knowledge Base Interface Authentication.

Table 3 Request body parameters

No.

Parameter

Type

Mandatory or Not

Description

1

callDataList

List

Yes

List of data to be added. A maximum of 20 data records are supported.

For details about the parameters of this object, see Table 4.

Table 4 Parameter description of callDataList

No.

Parameter

Type

Mandatory or Not

Description

1.1

sessionId

String

No

ID of a subscriber, which is sent back to the subscriber in the outbound call result.

The value can contain a maximum of 32 characters.

1.2

called

String

Yes

Called number.

The value can contain a maximum of 24 characters, including only digits, asterisks (*), and number signs (#).

1.3

caller

String

No

Calling number.

The number can contain a maximum of 24 characters.

1.4

customField

String

No

User-defined field. The value can contain a maximum of 200 characters and cannot contain the following special characters: `~!@#$%^&*()+=|{}'":;<>/?.\[]¥–,

1.5

recycleTime

String

No

Recycling time, in yyyy-mm-dd hh:mm:ss format.

1.6

callData

String

No

Call-associated data. The value can contain a maximum of 1024 characters.

CAUTION:
  • If an automatic outbound call involves an intelligent IVR flow, the value of this parameter must be in JSON format.

    The intelligent IVR flow invokes the JSON Data Invoking diagram element to parse and assign values to the call-associated data in JSON format. For details about the implementation and usage of the diagram element, see JSON Data Invoking.

  • The following is a JSON format example. Customize the information in italics and retain other information.

    "callData":"{\\\"fullName\\\":\\\"Lin Zihang\\\",\\\"date\\\":\\\"March 31, 2022\\\",\\\"riskName\\\":\\\"Compulsory traffic insurance\\\"}}

Response Description

Table 5 Response body parameters

No.

Parameter

Type

Description

1

resultCode

String

Error code. The value 0200000 indicates success, and other values indicate failure.

For details, see Table 7.

2

resultDesc

String

Description.

3

returnCode

String

Error code. The value 0200000 indicates success, and other values indicate failure.

For details, see Table 7.

4

returnDesc

String

Description.

5

returnObject

Object

For details, see Table 6.

Table 6 Parameter description of returnObject

No.

Parameter

Type

Description

5.1

totalSize

Integer

Total number of outbound calls that the system needs to make.

Triggered Event

None

Error Codes

Table 7 Error code description

No.

Error Code

Description

1

0200001

Parameter error. For details about the error, see resultDesc.

2

0200006

Database operation error.

3

0200007

The outbound campaign does not exist.

4

0200018

Duplicate numbers exist.

5

0200019

The number cannot be added in the current state.

6

0200020

The number quantity exceeds the upper limit 200,000.

7

0200022

The interface invoking time is short.

8

0200024

The number to be added is in the blacklist.

9

0200029

The maximum number of numbers that can be added each time is exceeded.

10

0200030

The time format is incorrect.

11

02000001

Empty parameter.

12

02000002

The parameter contains invalid characters.

13

02000003

The parameter length cannot exceed the maximum length.

14

02000004

The parameter length cannot be less than the minimum length.

15

02000005

The parameter length must be within the specified range.

16

02000006

Incorrect parameter type.

17

02000007

Incorrect parameter value.

18

02000008

Parameter conversion error. Check the request parameters.

19

02000009

Incorrect parameter combination. Check the request parameters.

20

02000010

The hour and minute parameters must be set at the same time.

21

02000011

The number of parameters cannot exceed the specified number.

Example

  • The following provides an example of the request body of this interface:
    {
        "callDataList": [
            {
                "sessionId": "00750",
                "called": "80021"
            },
            {
                "sessionId": "00850",
                "called": "80022"
            },
            {
                "sessionId": "00950",
                "called": "80023"
            },
            {
                "sessionId": "01050",
                "called": "80024"
            }
        ]
    }
  • The following provides an example of the response body of this interface:
    {
        "resultCode": "0200000",
        "resultDesc": "",
        "returnCode": "0200000",
        "returnDesc": "",
        "returnObject": {
            "totalSize": 46
        }
    }