Query Information of Multiple Business Hours

Query the detailed information of multiple business hours at the same time.

Request URL

GET {base_url}/{api_path}/businesshour/query?access_token={access_token}

Request parameters

Parameter Required Type Description
ids Yes String The unique ID(s) of business hours.
Note:

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
data Array<Business_Hour> The detailed information of the queried 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.
office_times Array<Time_Period> The list of office time periods.
reset_times Array<Time_Period> The list of break time periods.
time_condition_switch Integer Whether the advanced time condition is enabled.
  • 0: Disabled.
  • 1: Enabled.
remark String The remark for the business hour.
Time_Period
Parameter Type Description
value String The time period, in the format HH:MM-HH:MM.

Example

Request example

GET /openapi/v1.0/businesshour/query?ids=1&access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

Response example

HTTP/1.1 200 OK
{
  "errcode": 0,
  "errmsg": "SUCCESS",
  "submsg": "",
  "data": [
    {
      "id": 1,
      "office_times": [
        {
          "value": "09:00-18:00"
        }
      ],
      "reset_times": [
        {
          "value": "12:00-13:00"
        }
      ],
      "days_of_week": "mon tue wed thu fri",
      "time_condition_switch": 0,
      "months": "",
      "days": "",
      "remark": "",
      "timezone_id": 1
    }
  ]
}