Updated on 2025-11-13 GMT+08:00

Adding Outbound Numbers (V2)

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.
    • For the same outbound campaign task, 20 records are added each time by default. You can change the value of isales.api.calldata.max to change the number of records added each time. The interface invoking time cannot be less than 1 second. It is recommended that the value be less than or equal to 2000 and the value of isales.api.uncomplate.count be set to false. Otherwise, the interface invoking may take more than 1 second.
    • The called numbers to be added each time under the same session ID must be unique.
    • The called numbers to be added each time are not in the blocklist. If a blocklisted number is added, a failure message is displayed when the interface for adding outbound numbers sends a request to the server.

Method

This interface supports only the POST method.

URL

https://ip:port/rest/isales/v2/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

Value Type

Mandatory

Description

1

vdnId

Integer

Yes

VCC 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

Value Type

Mandatory

Description

1

Content-Type

String

Yes

The value is fixed at 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.

3

locale

String

No

i18n (internationalization, Language International Code), for example, zh_CN indicates Chinese and en_US indicates English. The default value is zh_CN.

Table 3 Request body parameters

No.

Parameter

Value Type

Mandatory

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.

2

batchId

String

No

Batch ID.

Table 4 Parameter description of callDataList

No.

Parameter

Value Type

Mandatory

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

List

Yes

Customer number information.

1.3

caller

String

No

Calling number.

The value 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 number of 1024 characters. The JSON format is recommended.

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 (Expired and Not Recommended).

  • 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\\\"}"

1.7

priority

String

No

The priority can be set. The value ranges from 1 to 5. The default value is 3. The value 1 indicates the highest priority, and the value 5 indicates the lowest priority. When an outbound call task is executed, the outbound call data is extracted by priority.

Table 5 Parameter description of called

No.

Parameter

Value Type

Mandatory

Description

1.2.1

calledNo

String

Yes

Called number of a customer.

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

1.2.2

delayTime

String

No

Call interval of each customer number, in seconds. The value ranges from 0 to 86400, and the default value is 0.

1.2.3

type

String

No

Customer number type.

  • This parameter is mandatory when Policy Type under OUTBOUND CALL RESULT POLICY is set to Contact Policy during outbound campaign addition.
  • This parameter is mandatory when Call Mode under CALL POLICY is set to By round during outbound campaign addition.

    The value is customized and can contain a maximum of 20 characters, excluding special characters.

Response Description

Table 6 Response body parameters

No.

Parameter

Value Type

Description

1

resultCode

String

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

For details, see Table 9.

2

resultDesc

String

Description.

3

returnCode

String

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

For details, see Table 9.

4

returnDesc

String

Description.

5

returnObject

Object

For details, see Table 7.

Table 7 Parameter description of returnObject

No.

Parameter

Value Type

Description

5.1

totalSize

Integer

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

5.1

datalist

Object

For details, see Table 8.

Table 8 Parameter description of datalist

No.

Parameter

Value Type

Description

5.1

called

String

New outbound number.

5.1

dataId

String

New outbound number and its data ID.

Triggered Event

None

Error Codes

Table 9 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 blocklist.

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:
    {
      "batchId": "174667380880136549777962146073", 
      "callDataList": [
            {
                "sessionId": "123456789",
                "called": [
                    {
                        "calledNo": "88888888",
                        "delayTime": "0",
                        "type": "SI"
                    },
                    {
                        "calledNo": "99999999",
                        "delayTime": "1",
                        "type": "SI"
                    }
                ]
            },
            {
                "sessionId": "987654322",
                "called": [
                    {
                        "calledNo": "66666666",
                        "delayTime": "0",
                        "type": "SI"
                    }
                ],
                "priority": "5"
            }
        ]
    }
  • The following provides an example of the response body of this interface:
    {
      "returnCode": "0200000",
      "returnObject": {
        "totalSize": 2,
        "dataIdList": [
          {
            "called": "88880399",
            "dataId": "1803096731904991234"
          },
          {
            "called": "88880399",
            "dataId": "1803096731997265922"
          }
        ]
      },
      "resultCode": "0200000",
      "resultDesc": "create data succeeded",
      "returnDesc": "create data succeeded"
    }