Edit a Business Hour
Update the configuration of a business hour.
Request URL
POST {base_url}/{api_path}/businesshour/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of the business hour. Note: You can query
the business hour ID using the Query Business Hour List
interface. |
| months | No | String | The months during which the business hour applies. Note:
Valid value:
|
| days_of_week | No | String | The days of the week on which the business hour applies. Note:
Valid value:
|
| days | No | String | The days of the month on which the business hour applies. Note: This parameter takes effect only when the advanced time
condition is enabled ( time_condition_switch is
1).Valid value:
|
| office_times | No | Array<Time_Periods> | The list of office time periods. |
| reset_times | No | Array<Time_Periods> | The list of break time periods. |
| time_condition_switch | No | Integer | Whether to enable the advanced time condition. Valid value:
|
| remark | No | String | The remark for the business hour. |
- Time_Periods
-
Parameter Type Description value String The time period in the format HH:MM-HH:MM. Note: The end time must be later than the start time.
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/businesshour/update?access_token=Y7Vg2HxvPjdeiSPuj7qmyyG9d4QHfewi HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
"id": 2,
"remark": "shanghai"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"submsg": ""
}