This section contains API details that are common to every API’s resource, method and action.

Request Headers

Header Description Notes
Authorization Contains token string to allow request authentication and authorization.  
If-Match This parameter allows you to specify a version of the data object to retrieve. If this parameter is not specified, the latest version of the data object is retrieved.. Allows optimization of backend, networking and client resource utilization.

Response Headers

Header Description Notes
ac-revision This parameter specifies the version of the data object retrieved. You can use the If-Match parameter in the request to retrieve a specifc version using this parameter's value..  

Query Parameters

Name Description Type Required Notes
v API version Double Required Validation fail error code: 400
select Dynamic selection of the response fields. YOGA 'gdata' dialect. Optional Validation error: 400 Non-existing field: no error, blank in response. Supported fields: any in response body

Path Parameters

Parameter Description Type Notes
accountId LP site ID string Validation fail error code: 400

Entity Structure

Attribute Description Required Type Notes
name Workday Object's name Yes String This must be a unique nameMax length: 50
description Workday Object's description Yes String Max length: 200
deleted whether the items is deleted or not No Boolean
isDefault Whether the object is set as the default object for the account Yes Boolean
events A list of events listing the object's attributes/options Yes Array
start A set of attributes defining the start time and date of the object Yes Object
  • This array receives two possible fields:
    -dateTime
    -timezone
  • Valid formats are either without hours (yyyy-MM-dd) or with hours (yyyy-MM-dd'T'HH:mm:ss). If no hour specific, 24/7 is assumed.
  • Start date must be up to 7 days from today.
  • The start date must be at the same day defined in the recurrence value, e.g. if the start date is May 1st and the recurrence is Wednesday, then you must make sure that May 1st is actually a Wednesday as well. If this is not followed, the reccurence day will be set according to the day of the start date (the reccurence value will be ignored), e.g. if you set the start date to May 1st which is a Wendesady but set the recurrence value to Thursday, Wednesday will be used instead.
  • The timezone field for both the start and end array must match.
  • Only Conversational Cloud supported timezones may be used.
end A set of attributes defining the end time and date of the object Yes Object
  • This array receives two possible fields:
    -dateTime
    -timezone
  • Valid formats are either without hours (yyyy-MM-dd) or with hours (yyyy-MM-dd'T'HH:mm:ss). If no hour is specified, 24/7 is assumed.
  • The maximum length of a workday must be 24 hours. You can define 24 hour shifts in one of the following ways: start: "2018-03-27" end: "2018-03-28", or: start: "2018-03-27T00:00" end: "2018-03-27T23:59"
  • The timezone field for both the start and end array must match.
  • Only Conversational Cloud supported timezones may be used.
recurrence This is mandatory for the workdays object but only one value is supported. A special occasion object will have an empty field, since it does not reoccur. Yes Array The recurrence must comply with the following pattern: "^(RRULE:FREQ=WEEKLY;BYDAY=)(SU|MO|TU|WE|TH|FR|SA)$"

Workday object description

     {
  "name": "Workdays 1",
  "description": "Description for workdays 1",
  "deleted": false,
  "isDefault": false,
  "events": [
    {
      "start": {
        "dateTime": "2018-03-27T06:00:00",
        "timeZone": "Europe/Zurich"
      },
      "end": {
        "dateTime": "2018-03-27T13:00:00",
        "timeZone": "Europe/Zurich"
      },
      "recurrence": [
        "RRULE:FREQ=WEEKLY;BYDAY=SU"
      ]
    }
  ]
}