Query Time Zone List

Query time zone list.

Request URL

GET {base_url}/{api_path}/timezone/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:

  • id
  • name
order_by No String Define the display order.

Valid value:

  • asc: Ascending order
  • desc: Descending order
search_value No String Keyword used to filter time zones by name.
timezone_type No String Define the time zone type.

Valid value:

  • global
  • custom

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 time zones.
data Array <Time_Zone> The basic information of each time zone.
Time_Zone
Parameter Type Description
id Integer Time zone ID.
name String Time zone name configured on PBX.
timezone String Time zone information, including the UTC offset and identifier.
timezone_name String Time zone display name.
enable_dst Integer Whether daylight saving time is enabled.
  • 0: Disabled.
  • 1: Enabled.
timezone_type String Time zone type.
  • global
  • custom
feature_code String The feature code used to switch or subscribe to the Business Hours and Holidays status associated with the time zone.

Examples

Request example

GET /openapi/v1.0/timezone/list?access_token=UIFGAl0HUpg8i78V0Z6nCx5YghKqE235 HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK
{
    "errcode": 0,
    "total_number": 2,
    "data": [
        {
            "id": 1,
            "name": "global_timezone",
            "timezone": "UTC+8 Asia/Shanghai",
            "timezone_name": "8 China (Beijing)",
            "enable_dst": 0,
            "timezone_type": "global",
            "feature_code": "*99"
        },
        {
            "id": 2,
            "name": "Japan",
            "timezone": "UTC+9 Asia/Tokyo",
            "timezone_name": "9 Japan (Tokyo)",
            "enable_dst": 0,
            "timezone_type": "custom",
            "feature_code": "*991"
        }
    ]
}