List Availability Rules

Required plan: Emerging

Description #

Retrieves all availability rules saved against an account.

URL format #

{data_center_url}/v1/availability_rules

Example Request #

GET /v1/availability_rules HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {ACCESS_TOKEN}

Example Response #

HTTP/1.1 200 Success

{
  "availability_rules": [
    {
      "availability_rule_id": "default",
      "tzid": "America/Chicago",
      "calendar_ids": [
        "cal_n23kjnwrw2_jsdfjksn234"
      ],
      "weekly_periods": [
        {
          "day": "monday",
          "start_time": "09:30",
          "end_time": "12:30"
        },
        {
          "day": "wednesday",
          "start_time": "09:30",
          "end_time": "12:30"
        }
      ]
    }
  ]
}

Request parameters #

data_center_url required

The URL for the data center you want to communicate with. Possible choices are:

  • api-au.cronofy.com - πŸ‡¦πŸ‡Ί Australia
  • api-ca.cronofy.com - πŸ‡¨πŸ‡¦ Canada
  • api-de.cronofy.com - πŸ‡©πŸ‡ͺ Germany
  • api-sg.cronofy.com - πŸ‡ΈπŸ‡¬ Singapore
  • api-uk.cronofy.com - πŸ‡¬πŸ‡§ United Kingdom
  • api.cronofy.com - πŸ‡ΊπŸ‡Έ United States

Find out more about Cronofy's data centers.

Response parameters #

availability_rules  #

An array of Availability Rules. See Read Availability Rule for details of the Availability Rule parameters.