Create or Update Available Periods BETA

Description

Creates or updates an available period for the authenticated account.

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

URL format

api.cronofy.com/v1/available_periods

Example Request

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

{
  "available_period_id": "qTtZdczOccgaPncGJaCiLg",
  "start": "2019-05-22T15:30:00Z",
  "end": "2019-05-22T17:00:00Z"
}

Example Response

HTTP/1.1 202 Accepted

Request parameters

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": "2019-05-22T17: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": "2019-05-22T17: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.

Search