REST API: List Schedule Calendars

Last Updated: November 07, 2016

Description

Retrieves a list of schedule calendars associated with your employees, with filters to narrow down the results.

Resource Information

HTTP Method GET
Endpoint https://rest.tsheets.com/api/v1/schedule_calendars
Authentication Token header required. See authentication section
Request format Everything is handled through the request uri on a GET.
Response format json
Response object Schedule Calendar

Available Filters

ids:
optional
Integer. Comma separated list of one or more schedule calendar ids you'd like to filter on. Only schedule calendars with an id set to one of these values will be returned.
modified_before:
optional
String (ISO8601 format). Only schedule calendars modified before this date/time will be returned (i.e. 2004-02-12T15:19:21+00:00).
modified_since:
optional
String (ISO8601 format). Only schedule calendars modified since this date/time will be returned (i.e. 2004-02-12T15:19:21+00:00).
supplemental_data:
optional
String. 'yes' or 'no'. Default is 'yes'. Indicates whether supplemental data should be returned.
per_page:
optional
Integer. Represents how many results you'd like to retrieve per request (page). Default is 50. Max is 50.
page:
optional
Integer. Represents the page of results you'd like to retrieve. Default is 1.

Examples

Retrieve a list of all schedule calendars.

## REQUEST
curl -H "Authorization: Bearer <Access-Token>" -i "https://rest.tsheets.com/api/v1/schedule_calendars"

## RESPONSE
HTTP/1.1 200 OK
Content-Type: application/json

{
 "results": {
  "schedule_calendars": {
   "72595": {
    "id": 72595,
    "name": "Schedule Calendar Name",
    "last_modified": "2015-07-15T19:31:57+00:00",
    "created": "2015-07-15T19:08:33+00:00"
   },
   "72597": {
    "id": 72597,
    "name": "Schedule Calendar Name2",
    "last_modified": "2015-07-15T19:33:57+00:00",
    "created": "2015-07-15T19:08:33+00:00"
   }
  }
 }
}
    

Retrieve schedule calendars that have been modified since July 15, 2015 at 7:32pm.

## REQUEST
## Note that instead of a plus, we're using '%2B', the url-encoded equivalent - to prevent the + getting replaced by a space.
curl -H "Authorization: Bearer <Access-Token>" -i "https://rest.tsheets.com/api/v1/schedule_calendars?modified_since=2015-07-15T19:32:00%2B00:00"

## RESPONSE
HTTP/1.1 200 OK
Content-Type: application/json

{
 "results": {
  "schedule_calendars": {
   "72595": {
    "id": 72595,
    "name": "Schedule Calendar Name",
    "last_modified": "2015-07-15T19:33:57+00:00",
    "created": "2015-07-15T19:08:33+00:00"
   }
  }
 }
}