Read Availability Rule

Required plan: Emerging

Description #

Retrieves an availability rule.

URL format #

{data_center_url}/v1/availability_rules/{availability_rule_id}

Example Request #

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

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.

availability_rule_id required  #

The String that uniquely identifies the availability rule. The first request made for an availability_rule_id will create an available period for the account and subsequent requests will update its details.

Usually this will be your own internal ID for the available period, encoded as an ASCII-only String of up to 64 characters.

Example Response #

HTTP/1.1 200 Success

{
  "availability_rule": {
    "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"
      }
    ]
  }
}

Response parameters #

availability_rule_id  #

The String that uniquely identifies the availability rule. The first request made for an availability_rule_id will create an available period for the account and subsequent requests will update its details.

Usually this will be your own internal ID for the available period, encoded as an ASCII-only String of up to 64 characters.

tzid  #

A String representing a known time zone identifier from the IANA Time Zone Database.

Common examples are:

  • Etc/UTC
  • Europe/Paris
  • America/Chicago
calendar_ids  #

An Array specifying the calendars that should impact the user’s availability. When provided at least one calendar must be specified.

weekly_periods  #

An Array of weekly recurring periods for the availability rule.

weekly_period.day  #

A String the week day this period applies to.

Valid options are:

  • sunday
  • monday
  • tuesday
  • wednesday
  • thursday
  • friday
  • saturday
weekly_period.start_time  #

A String the time of day the period should start expressed as a 24hr clock string, eg: 09:30.

weekly_period.end_time  #

A String the time of day the period should end expressed as a 24hr clock string, eg: 16:30.