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

Modifying a Holiday for an Outbound Campaign

Prerequisites

  • You have applied for a developer account.
  • The ID of the outbound campaign to be modified has been obtained.
  • The ID of the holiday to be modified has been obtained.

Scenario

This interface is invoked to modify a holiday for a specified outbound campaign.

Method

This interface supports only the PUT method.

URI

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

id

Integer

Yes

Holiday ID.

2

name

String

Yes

Holiday name.

The name must be unique and can contain a maximum of 30 characters.

3

type

Integer

Yes

Holiday type.

The options are as follows:

1: set by week

2: set by date

3: repeat by date

4

week

String

No

Day of week. This parameter is mandatory when type is set to 1.

The options are as follows:

1: Monday

2: Tuesday

3: Wednesday

4: Thursday

5: Friday

6: Saturday

7: Sunday

If multiple days are selected, separate them with commas (,). For example, 6,7 indicates Saturday and Sunday.

5

beginTime

String

No

Start time. This parameter is mandatory when type is set to 2 or 3.

When type is 2, the data format is yyyy-MM-dd.

When type is 3, the data format is MM-dd.

6

endTime

String

No

End time. This parameter is mandatory when type is set to 2 or 3.

When type is 2, the data format is yyyy-MM-dd.

When type is 3, the data format is MM-dd.

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

returnCode

String

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

For details, see Table 5.

4

returnDesc

String

Description.

Triggered Event

None

Error Codes

Table 5 Error code description

No.

Error Code

Description

1

0200001

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

2

0200007

The outbound campaign does not exist.

3

0200013

The holiday name already exists.

4

0200014

The holiday does not exist.

5

0200030

The time format is incorrect.

6

02000001

Empty parameter.

7

02000002

The parameter contains invalid characters.

8

02000003

The parameter length cannot exceed the maximum length.

9

02000004

The parameter length cannot be less than the minimum length.

10

02000005

The parameter length must be within the specified range.

11

02000006

Incorrect parameter type.

12

02000007

Incorrect parameter value.

13

02000008

Parameter conversion error. Check the request parameters.

14

02000009

Incorrect parameter combination. Check the request parameters.

15

02000010

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

16

02000011

The number of parameters cannot exceed the specified number.

Example

  • The following provides an example of the request body of this interface:
    {
        "id": 1318795089,
          "name": "Mid-Autumn Festival",
        "type": 2,
        "week": null,
        "beginTime": "2018-09-22",
        "endTime": "2018-09-24"
    }
  • The following provides an example of the response body of this interface:
    {
        "resultCode": "0200000",
        "resultDesc": ""
    }