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

Querying Outbound Call Data File Import Results

Scenario

This interface is invoked to query outbound call data import results, including the results of importing a local file and importing a file from the file server.

Usage Description

  • Prerequisites
    • You have applied for a developer account.
    • A valid import task exists.

Method

This interface supports only the POST method.

URI

https://ip:port/rest/isales/v1/openapi/campaigns/{vdnId}/calldatafile/queryDataImportTask/{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

String

Yes

Outbound campaign task ID.

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

offset

Integer

Yes

Parameter for determining the start page of the query.

Value of offset = Value of limit x (Value of page – 1)

page indicates the start page to be queried.

2

limit

Integer

Yes

Number of query records on each page.

The value ranges from 1 to 100.

Response Description

Table 4 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 5.

2

resultDesc

String

Description.

3

result

List<DataImportTask>

File import tasks of the current outbound campaign.

4

count

Integer

Total number of results.

5

returnCode

String

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

For details, see Table 6.

6

returnDesc

String

Description.

Table 5 Parameter description of DataImportTask

No.

Parameter

Type

Description

1

id

String

File import task ID.

2

beginTime

String

Import start time.

3

endTime

String

Import end time.

4

status

String

Task status. The options are 0 (preparing for import), 1 (importing), 2 (imported), and 3 (import failed).

5

succNum

Integer

Number of successful records.

6

repeatNum

Integer

Number of duplicate records.

7

failNum

Integer

Number of failed records.

8

errMsg

Integer

Exception cause.

Triggered Event

None

Error Codes

Table 6 Error code description

No.

Error Code

Description

1

0200001

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

2

0200006

The parameter contains invalid characters.

3

02000001

Empty parameter.

4

02000002

The parameter contains invalid characters.

5

02000003

The parameter length cannot exceed the maximum length.

6

02000004

The parameter length cannot be less than the minimum length.

7

02000005

The parameter length must be within the specified range.

8

02000006

Incorrect parameter type.

9

02000007

Incorrect parameter value.

10

02000008

Parameter conversion error. Check the request parameters.

11

02000009

Incorrect parameter combination. Check the request parameters.

12

02000010

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

13

02000011

The number of parameters cannot exceed the specified number.

Example

  • The following provides an example of the request body of this interface:
    {
        "limit":10,
        "offset":0,
    	  "importTaskIds":["164698362894300182038011895728"]
    }
  • The following provides an example of the response body of this interface:
    {
    	"result": [
    		{
    			"succNum": 0,
    			"failNum": 0,
    			"errMsg": "",
    			"id": "164698362894300182038011895728",
    			"beginTime": "2022-03-11T07:27:09.000+00:00",
    			"endTime": "2022-03-11T07:27:09.000+00:00",
    			"repeatNum": 0,
    			"status": "2"
    		}
    	],
    	"returnCode": "0200000",
    	"resultCode": "0200000",
    	"resultDesc": "success",
    	"returnDesc": "success"
    }