User Calendar Schedules

Retrieve the user’s calendar schedules list

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/

Retrieve the user’s calendar schedules list.

Authorization Right:minimum End User.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "schedules": [
      {
         "name": "APIO Test Calendar Schedule"
      }
   ]
}
Response JSON Object:

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "allLevels": True
}
Request JSON Object:
  • allLevels (boolean) – (Optional) If true, the parent level schedules will be included within the response.

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "schedules": [
      {
         "name": "APIO Test Calendar Schedule",
         "level": "User"
      },
      {
         "name": "APIO Test Holiday Schedule",
         "level": "Group"
      }
   ]
}
Response JSON Object:
Status Codes:

Create a new user’s calendar schedule instance

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/

Create a new user’s calendar schedule instance without any periods.

Authorization Right:minimum End User.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "name": "APIO Test Calendar Schedule"
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Create a new user’s calendar schedule instance with some periods.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "name": "APIO Test Calendar Schedule",
   "periods" [
      {
         "name": "APIO Test User Period 1",
         "type": "Full days",
         "startDay": "2018-05-01",
         "stopDay": "2018-05-05"
      },
      {
         "name": "APIO Test User Period 2",
         "type": "Partial days",
         "startDay": "2018-05-07",
         "stopDay": "2018-05-12",
         "startTime": "10:30",
         "stopTime": "18:30"
      },
      {
          "name": "APIO Test User Period 4",
          "type": "Partial days",
          "startDay": "2022-05-06",
          "stopDay": "2022-05-10",
          "startTime": "10:30",
          "stopTime": "18:30",
          "recurrence": {
              "recurWeekly": {
                  "recurInterval": 1,
                  "Monday": false,
                  "Tuesday": false,
                  "Wednesday": false,
                  "Thursday": false,
                  "Friday": true,
                  "Saturday": false,
                  "Sunday": false
              },
              "recurForEver": false,
              "recurEndOccurrence": 3
          }
      }
   ]
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Retrieve a user’s calendar schedule instance

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/(string: instance_name)/

Retrieve a user’s calendar schedule instance.

Authorization Right:minimum End User.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "name": "APIO Test Calendar Schedule",
   "periods" [
      {"name": "APIO Test User Period 1"},
      {"name": "APIO Test User Period 2"},
      {"name": "APIO Test User Period 4"},
      {"name": "APIO Test User Period 5"},
      {"name": "APIO Test User Period 6"}
   ]
}
Response JSON Object:
Status Codes:

Retrieve a user’s calendar schedule instance with full period detail list.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com

{
   "full_list": true
}
Request JSON Object:
  • full_list (boolean) – Optional. Default false. To request the full period detail list. This feature is available only at User level.

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "name": "APIO Test Calendar Schedule",
   "periods" [
      {
         "name": "APIO Test User Period 1",
         "type": "Full days",
         "startDay": "2018-05-01",
         "stopDay": "2018-05-05"
      },
      {
         "name": "APIO Test User Period 2",
         "type": "Partial days",
         "startDay": "2018-05-07",
         "stopDay": "2018-05-12",
         "startTime": "10:30",
         "stopTime": "18:30"
      }
      {
          "name": "APIO Test User Period 4",
          "type": "Partial days",
          "startDay": "2022-05-06",
          "stopDay": "2022-05-10",
          "startTime": "10:30",
          "stopTime": "18:30",
          "recurrence": {
              "recurWeekly": {
                  "recurInterval": 1,
                  "Monday": false,
                  "Tuesday": false,
                  "Wednesday": false,
                  "Thursday": false,
                  "Friday": true,
                  "Saturday": false,
                  "Sunday": false
              },
              "recurForEver": false,
              "recurEndOccurrence": 3
          }
      }
   ]
}
Response JSON Object:
Status Codes:

Update a user’s calendar schedule instance

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/(string: instance_name)/

Update a user’s calendar schedule instance.

Authorization Right:minimum End User.

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com

{
   "name": "APIO Test Calendar Schedule New"
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Update a user’s calendar schedule instance with period list (1. update an existing one, 2. delete an existing one, 3. create a new one).

Example request:

PUT /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com

{
   "name": "APIO Test Calendar Schedule New",
   "periods" [
      {
         "name": "APIO Test User Period 1",
         "newName": "APIO Test User Updated Period 1",
         "startDay": "2018-05-10",
         "stopDay": "2018-05-20"
      },
      {
         "name": "APIO Test User Period 2",
         "delete": true
      },
      {
         "name": "APIO Test User Period 3",
         "type": "Partial days",
         "startDay": "2018-05-10",
         "stopDay": "2018-05-15",
         "startTime": "12:00",
         "stopTime": "14:00"
      }
   ]
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Delete user’s calendar schedules list

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/

Delete a user’s calendar schedules list.

Authorization Right:minimum End User.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "schedules": [
      {
         "name": "APIO Test Calendar Schedule New"
      }
   ]
}
Request JSON Object:

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:

Delete a user’s calendar schedule instance

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/(string: instance_name)/

Delete a user’s calendar schedule instance.

Authorization Right:minimum End User.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule%20New/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes:

Calendar Schedule Periods

Add public holidays for user’s calendar schedule

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/(string: instance_name)/public_holidays/

Add all public holidays for a specific year and country to group’s calendar schedule instance.

Authorization Right:minimum End User.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/public_holidays/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "country": "BE",
   "year": 2019,
   "type": "public"
}
Request JSON Object:
  • country (string) – The country of the public holidays to add.

  • year (integer) – The year of the public holidays to add, in 4 digits format.

  • type (string) – The type of the holidays to add. Allowed values “public”.

Status Codes:

Create a new user’s calendar schedule period instance

POST /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/(string: instance_name)/

Create a new user’s calendar schedule period instance.

Authorization Right:minimum End User.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "name": "APIO Test User Period 1",
   "type": "Full days",
   "startDay": "2018-05-01",
   "stopDay": "2018-05-05",
   "recurrence": {
      "recurWeekly": {
          "recurInterval": 1,
          "Monday": false,
          "Tuesday": false,
          "Wednesday": false,
          "Thursday": false,
          "Friday": true,
          "Saturday": false,
          "Sunday": false
      },
      "recurForEver": false,
      "recurEndOccurrence": 3
   }
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Retrieve a user’s calendar schedule period instance

GET /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/(string: instance_name)/(string: sub_instance_name)/

Retrieve a user’s calendar schedule period instance.

Authorization Right:minimum End User.

Example request:

GET /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/ HTTP/1.1
Host: example.com

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{
   "name": "APIO Test User Period 1",
   "type": "Full days",
   "startDay": "2018-05-01",
   "stopDay": "2018-05-05",
   "recurrence": {
      "recurWeekly": {
          "recurInterval": 1,
          "Monday": false,
          "Tuesday": false,
          "Wednesday": false,
          "Thursday": false,
          "Friday": true,
          "Saturday": false,
          "Sunday": false
      },
      "recurForEver": false,
      "recurEndOccurrence": 3
   }
}
Response JSON Object:
Status Codes:

Update a user’s calendar schedule period instance

PUT /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/(string: instance_name)/(string: sub_instance_name)/

Update a user’s calendar schedule period instance.

Authorization Right:minimum End User.

Example request:

POST /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/APIO%20Test%20User%20Period%201/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

{
   "name": "APIO Test User Updated Period 1",
   "startDay": "2018-05-10",
   "stopDay": "2018-05-20",
   "recurrence": {
      "recurWeekly": {
          "recurInterval": 1,
          "Monday": false,
          "Tuesday": false,
          "Wednesday": false,
          "Thursday": false,
          "Friday": true,
          "Saturday": false,
          "Sunday": false
      },
      "recurForEver": false,
      "recurEndOccurrence": 3
   }
}
Request JSON Object:

Example response:

Response:

Similar to GET instance method response.

Status Codes:

Delete a user’s calendar schedule period instance

DELETE /api/v1/tenants/(string: tenant_id)/groups/(string: group_id)/users/(string: user_id)/calendar_schedules/(string: instance_name)/(string: sub_instance_name)/

Delete a user’s calendar schedule period instance.

Authorization Right:minimum End User.

Example request:

DELETE /api/v1/tenants/foo/groups/foogroup/users/foouser/calendar_schedules/APIO%20Test%20Calendar%20Schedule/APIO%20Test%20User%20Period%201/ HTTP/1.1
Host: example.com
Content-Type: "application/json"

Example response:

HTTP/1.1 200 OK
Content-Type: "application/json"

{}
Status Codes: