Query Holiday List
Query holiday list.
Request URL
GET {base_url}/{api_path}/holidays/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 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.
|
| total_number | Integer | The total number of holidays matching the query criteria. |
| data | Array<Holiday> | The list of holidays. |
- Holiday
-
Parameter Type Description id Integer The unique ID of the holiday. timezone_id Integer The ID of the associated time zone. name String The name of the holiday. type String The recurrence type of the holiday. date: By Date (E.g. January 1, 2025)month: By Month (E.g. January 1st Every Year)week: By Week (E.g. the Monday of the 1st Week of the Month Every Year)weekday: By Weekday (E.g. the 1st Monday of the Month Every Year)
month String The month of the holiday. jan: January.feb: February.mar: March.apr: April.may: May.jun: June.jul: July.aug: August.sep: September.oct: October.nov: November.dec: December.
how_week Integer The week of the month for the holiday. 1: The first week.2: The second week.3: The third week.4: The fourth week.5: The last week.
weekday String The day of the week for the holiday. sun: Sunday.mon: Monday.tue: Tuesday.wed: Wednesday.thu: Thursday.fri: Friday.sat: Saturday.
date String The date or date range of the holiday. time_period String The time period of the holiday.
Example
Request example
GET /openapi/v1.0/holidays/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,
"name": "Holiday",
"type": "date",
"date": "2026/12/25-2026/12/26",
"month": "",
"how_week": 0,
"weekday": "",
"time_period": "",
"timezone_id": 1
}
]
}