Query Business Hour List
Query the business hour list.
Request URL
GET {base_url}/{api_path}/businesshour/list?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| page | No | Integer | Define which page is displayed. |
| page_size | No | Integer | Define how many records per page. |
| sort_by | No | String | Define the sorting field. Valid value: |
| order_by | No | String | Define the display order. Valid value:
|
| timezone_id | No | Integer | The ID of the time zone. Note: You can obtain time zone ID
using the Query Time Zone List list. |
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.
|
| total_number | Integer | The total number of business hours records. |
| data | Array<Business_Hour> | The list of business hours. |
- Business_Hour
-
Parameter Type Description id Integer The unique ID of the business hour. timezone_id Integer The ID of the associated time zone. months String The months during which the business hour applies. all: Every month.jan: January.feb: February.mar: March.apr: April.may: May.jun: June.jul: July.aug: August.sep: September.oct: October.nov: November.dec: December.
days_of_week String The days of the week on which the business hour applies. all: Every day.sun: Sunday.mon: Monday.tue: Tuesday.wed: Wednesday.thu: Thursday.fri: Friday.sat: Saturday.
days String The days of the month on which the business hour applies. all: Every day of the month.1-31: The specified day or days of the month.
time_condition_switch Integer Whether the advanced time condition is enabled. 0: Disabled.1: Enabled.
remark String The remark for the business hour.
Example
Request example
GET /openapi/v1.0/businesshour/list?page=1&page_size=2&order_by=desc&access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"submsg": "",
"total_number": 1,
"data": [
{
"id": 1,
"days_of_week": "mon tue wed thu fri",
"time_condition_switch": 0,
"months": "",
"days": "",
"remark": "",
"timezone_id": 1
}
]
}