Search Holidays

Search for holidays.

Request URL

GET {base_url}/{api_path}/holidays/search?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.
search_value No String The keyword used to search for holidays.
sort_by No String Define the sorting field.

Valid value: id

order_by No String Define the display order.

Valid value:

  • asc: Ascending order.
  • desc: Descending order.
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.
  • 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.
total_number Integer The total number of matching holidays.
data Array<Holiday> The list of matching 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/search?page=1&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
    }
  ]
}