Real-Time Sequencing ALPHA

Description

Returns an URL to a form where a user can select their preferred date and time for an sequence of events based upon live availability information.

URL format

api.cronofy.com/v1/real_time_scheduling

Example Request

POST /v1/real_time_sequencing HTTP/1.1
Host: api.cronofy.com
Content-Type: application/json; charset=utf-8

{
  "client_id": "{CLIENT_ID}",
  "client_secret": "{CLIENT_SECRET}",
  "oauth": {
    "redirect_uri": "{REDIRECT_URI}",
    "scope": "create_event",
    "state": "{STATE}"
  },
  "event": {
    "event_id": "qTtZdczOccgaPncGJaCiLg",
    "summary": "Product Manager Interview at Globex",
    "tzid": "Europe/London"
  },
  "availability": {
      "sequence":[
        {
          "sequence_id":"123",
          "ordinal":1,
          "participants":[
            {
              "members":[
                {
                  "sub":"acc_567236000909002",
                  "calendar_ids":[ "cal_n23kjnwrw2_jsdfjksn234" ]
                }
              ],
              "required":"all"
            }
          ],
          "event": {
            "event_id": "qTtZdczOccgaPncGJaCiLg",
            "summary": "Pre screen"
          },
          "required_duration":{ "minutes": 60 }
        },
        {
          "sequence_id":"456",
          "ordinal":2,
          "participants":[
            {
              "members":[
                {
                  "sub":"acc_678347111010113",
                  "available_periods": [
                    {
                      "start": "2019-03-27T09:00:00Z",
                      "end": "2019-03-27T12:00:00Z"
                    },
                    {
                      "start": "2019-03-28T10:00:00Z",
                      "end": "2019-03-28T20:00:00Z"
                    }
                  ]
                }
              ],
              "required":"all"
            }
          ],
          "event": {
            "event_id": "qTtZdczOccgaPncGJaCiLg",
            "summary": "Face to facd"
          },
          "required_duration":{ "minutes": 60 }
        }
      ],
      "available_periods": [
        {
          "start": "2019-03-27T09:00:00Z",
          "end": "2019-03-27T18:00:00Z"
        },
        {
          "start": "2019-03-28T09:00:00Z",
          "end": "2019-03-28T18:00:00Z"
        }
      ]
  },
  "target_calendars": [
    {
      "sub": "acc_567236000909002",
      "calendar_id": "cal_n23kjnwrw2_jsdfjksn234"
    }
  ],
  "callback_url": "http://www.example.com/callback"
}

Example Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "url": "{REAL_TIME_SCHEDULING_URL}"
}

Request parameters

event required  #

An object with the details of the event you wish to push into the user’s selected calendar. Details of what parameters this object can hold can be found in the create or update event documentation.

Please note that event.attendees is not supported for Real Time Scheduling.

The start and end parameters should be omited.

availability required  #

An object with the details of the availability query used to determine the available time periods for the user to choose for the sequence date and time. Details of what parameters this object can hold can be found in the Availability documentation.

availability.sequence.event required  #

An object with the details of the event you wish to push into the user’s selected calendar. Details of what parameters this object can hold can be found in the create or update event documentation.

Please note that event.attendees is not supported for Real Time Scheduling.

The start and end parameters should be omited.

Response parameters

url  #

The URL to direct the user to in order to authorize their calendar account and have the event inserted into their selected calendar.

Example callback

POST {CALLBACK_URL_PATH} HTTP/1.1
Host: {CALLBACK_URL_HOST}
Content-Type: application/json; charset=utf-8
Cronofy-HMAC-SHA256: {Base64(HmacSHA256(body_bytes, CLIENT_SECRET))}

{
  "event": {
    "event_id": "qTtZdczOccgaPncGJaCiLg",
    "start": {
      "time": "2019-03-27T11:00:00Z",
      "tzid": "Europe/London"
    },
    "end": {
      "time": "2019-03-27T13:00:00Z",
      "tzid": "Europe/London"
    },
    "summary": "Product Manager Interview at Globex"
  },
  "participants": [
    { "sub": "acc_567236000909002" }
  ],
  "sequence":[
    {
      "sequence_id":"123",
      "event": {
        "event_id": "qTtZdczOccgaPncGJaCiLg",
        "start": "2019-03-27T11:00:00Z",
        "end": "2019-03-27T12:00:00Z",
        "summary": "Pre screen"
      },
      "participants":[ { "sub":"acc_567236000909002" } ]
    },
    {
      "sequence_id":"456",
      "event": {
        "event_id": "qTtZdczOccgaPncGJaCiLg",
        "start": "2019-03-27T12:00:00Z",
        "end": "2019-03-27T13:00:00Z",
        "summary": "Face to face"
      },
      "participants":[ { "sub":"acc_678347111010113" } ]
    }
  ]
}

Request headers

Cronofy-HMAC-SHA256  #

Can optionally be used to verify that the notification was sent by Cronofy.

This HMAC uses the SHA256 algorithm, keyed with the application’s client secret, to generate a base-64 encoded hash of the request body.

Examples are available in our cronofy/notification-hmac-examples Github repository.

Request parameters

event  #

An object with the details of the end users event based on the period of time selected. Details of what parameters this object can hold can be found in the create or update event documentation.

participants  #

An array of all the participants which were selected for the events contained in the sequence based on their availability.

sequence  #

An array of available periods which match the selection made by the user in Real Time Scheduling.

sequence.sequence_id  #

A value to identify this part of the sequence.

sequence.start  #

Thestart of an available period as a Time.

sequence.end  #

Theend of an available period as a Time.

sequence.participants  #

An array of participants that are available for the given period.

sequence.participants.sub  #

The internal Cronofy ID for the account, as an ASCII-only String.

Search