Export Holidays
Export holidays to a CSV file.
Steps to export holidays
Request URL
GET {base_url}/{api_path}/holidays/export?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| format | Yes | String | The format of the exported file. 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. |
| sort_by | No | String | Define the sorting field. Valid value: |
| order_by | No | String | Define the display order. Valid value:
|
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.
|
| download_url | String | The download URL of the exported file. |
| file_name | String | The name of the exported file. |
Example
Request example
GET /openapi/v1.0/holidays/export?format=csv&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": "",
"file_name": "PBX-holiday.csv",
"download_url": "/api/download/PBX-holiday.csv"
}
Download the exported file
After obtaining the download URL, combine it with the {base_url} and append the{access_token}
parameter to form the complete download link. Use the link to download the exported
file.Download link format
{base_url}/{download_resource_url}?access_token={access_token}
Download link example
https://yeastardocs.example.yeastarcloud.comapi/download/PBX-holiday.csv?access_token=6LPooUthiIfL0yYvnljDHCyca2SB3atI