Edit a Holiday
Update a holiday's configuration.
Request URL
POST {base_url}/{api_path}/holidays/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of a holiday. Note: You can query holiday ID using the Search Holidays interface.
|
| name | No | String | The name of the holiday. |
| type | No | String | The recurrence type of the holiday. Valid value:
|
| month | No | String | The month of the holiday. Valid value:
|
| how_week | No | Integer | The week of the month for the holiday. Valid value:
|
| weekday | No | String | The day of the week for the holiday. Valid value:
|
| date | No | String | The date or date range of the holiday. Note: The date
must follow the system date format. You can query the system date format using the
Query PBX Information interface. |
| time_period | No | String | The time period of the holiday, in the format HH:MM-HH:MM. |
| prompt | No | String | The name of the custom prompt file to use for the holiday. Note: You can query available custom prompts using the Search Custom Prompts interface. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
Example
Request example
POST /openapi/v1.0/holidays/update?access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
"id": 1,
"name": "Christmas"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"submsg": ""
}