Create or Update Available Periods

Required plan: Emerging

Description #

Creates or updates an available period for the authenticated account.

This can be used in conjunction with the Batch endpoint to update multiple periods at once.

URL format #

{data_center_url}/v1/available_periods

Example Request #

POST /v1/available_periods HTTP/1.1
Host: {data_center_url}
Authorization: Bearer {ACCESS_TOKEN}
Content-Type: application/json; charset=utf-8

{
  "available_period_id": "qTtZdczOccgaPncGJaCiLg",
  "start": "2024-07-28T15:30:00Z",
  "end": "2024-07-28T17:00:00Z"
}

Example Response #

HTTP/1.1 202 Accepted

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.

available_period_id required  #

The String that uniquely identifies the available period. The first request made for an available_period_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.

start required  #

The start time can be provided as a simple Time string or an object with two attributes, time and tzid:

{
  "time": "2024-07-28T17:00:00Z",
  "tzid": "Europe/Paris"
}

The time attribute specifies the Time to use as the start of the available period. Regardless of the tzid used, this value is always provided in UTC time so as to not be ambiguous.

The tzid attribute specifies a String representing a known time zone identifier from the IANA Time Zone Database.

Common examples are:

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

When provided, specifies the tzid to use for the start time of the available period.

If not provided, the tzid attribute of the event is used if specified, otherwise Etc/UTC is used.

end required  #

The end time can be provided as a simple Time string or an object with two attributes, time and tzid:

{
  "time": "2024-07-28T17:00:00Z",
  "tzid": "Europe/Paris"
}

The time attribute specifies the Time to use as the end time of the event. Regardless of the tzid used, this value is always provided in UTC time so as to not be ambiguous. Also, it must be later in time than the start of the event. The tzid attribute specifies a String representing a known time zone identifier from the IANA Time Zone Database. Common examples are:

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

When provided, specifies the tzid to use for the end time of the event.

If not provided, the tzid attribute of the event is used if specified, otherwise Etc/UTC is used.

tzid optional  #

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

Common examples are:

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

When provided, specifies the default tzid to use for the start and end times of the available period if they do not specify their own.

If not provided, Etc/UTC is used by default.