Jump to: navigation, search

Query Business Calendar Body

Method

GET

Syntax

 
/grs/v1/tenant/{tenantId}/package/{packageId}/businesscalendarbody/{calendarId}

Request Body

N/A

Response Body

 
{   
   "calendarId":"dcc4a39b-3442-4408-a907-b85c44663681",
   "externalId":"Calendar_117",
   "name":"Dad's Dating Calendar",
   "locked":false,
   "lockOwner":null,
   "weekStarts":6,
   "weekEnds":7,
   "dayStartsHour":17,
   "dayStartsMin":30,
   "dayEndsHour":23,
   "dayEndsMin":0,
   "timeZoneId":"EST",
   "exceptions":[   
      {   
         "name":"Christmas",
         "type":"HOLIDAY",
         "placement":"FIXED",
         "fixedDate":30949200000,
         "annualMonth":0,
         "annualDay":0,
         "relativeType":null,
         "relativeDayOfWeek":0,
         "relativeMonth":0,
         "timeChangeStartHour":0,
         "timeChangeStartMin":0,
         "timeChangeStopHour":0,
         "timeChangeStopMin":0
      },
      {   
         "name":"It's New Year's Day",
         "type":"HOLIDAY",
         "placement":"ANNUAL",
         "fixedDate":null,
         "annualMonth":1,
         "annualDay":1,
         "relativeType":null,
         "relativeDayOfWeek":0,
         "relativeMonth":0,
         "timeChangeStartHour":0,
         "timeChangeStartMin":0,
         "timeChangeStopHour":0,
         "timeChangeStopMin":0
      },
      {   
         "name":"Thanksgiving",
         "type":"HOLIDAY",
         "placement":"RELATIVE",
         "fixedDate":null,
         "annualMonth":0,
         "annualDay":0,
         "relativeType":"FOURTH",
         "relativeDayOfWeek":5,
         "relativeMonth":11,
         "timeChangeStartHour":0,
         "timeChangeStartMin":0,
         "timeChangeStopHour":0,
         "timeChangeStopMin":0
      },
      {   
         "name":"My Dad's birthday !",
         "type":"HOLIDAY",
         "placement":"ANNUAL",
         "fixedDate":null,
         "annualMonth":5,
         "annualDay":20,
         "relativeType":null,
         "relativeDayOfWeek":0,
         "relativeMonth":0,
         "timeChangeStartHour":0,
         "timeChangeStartMin":0,
         "timeChangeStopHour":0,
         "timeChangeStopMin":0
      },
      {   
         "name":"A Time Change",
         "type":"TIME_CHANGE",
         "placement":"ANNUAL",
         "fixedDate":null,
         "annualMonth":1,
         "annualDay":9,
         "relativeType":null,
         "relativeDayOfWeek":0,
         "relativeMonth":0,
         "timeChangeStartHour":12,
         "timeChangeStartMin":30,
         "timeChangeStopHour":16,
         "timeChangeStopMin":22
      },
      {   
         "name":"tc3",
         "type":"TIME_CHANGE",
         "placement":"FIXED",
         "fixedDate":1428984000000,
         "annualMonth":0,
         "annualDay":0,
         "relativeType":null,
         "relativeDayOfWeek":0,
         "relativeMonth":0,
         "timeChangeStartHour":1,
         "timeChangeStartMin":33,
         "timeChangeStopHour":7,
         "timeChangeStopMin":33
      },
      {   
         "name":"TC2",
         "type":"TIME_CHANGE",
         "placement":"RELATIVE",
         "fixedDate":null,
         "annualMonth":0,
         "annualDay":0,
         "relativeType":"EVERY",
         "relativeDayOfWeek":1,
         "relativeMonth":1,
         "timeChangeStartHour":3,
         "timeChangeStartMin":0,
         "timeChangeStopHour":19,
         "timeChangeStopMin":0
      }
   ]
}

HTTP Status Codes

  • 200 OK—Response body provided
  • 401 Unauthorized—APIToken not valid
  • 403 Forbidden—User does not have permission for the specified tenant ID, or does not have the correct permission for this operation.
  • 404 Not Found—could not find specified calendar ID
  • 503—Service Unavailable

Notes

For exceptions, the following applies:
type

  • HOLIDAY (entire day is non-work)
  • TIME_CHANGE (working range specified)

placement

  • FIXED - A single date (Jan 1, 2015)
    • fixedDate contains timestamp
  • ANNUAL - Same day each year (Dec 25)
    • annualMonth: 1-12
    • annualDay: 1-31
  • RELATIVE - 1st Thursday of each month
    • relativeType
      • EVERY
      • FIRST
      • SECOND
      • THIRD
      • FOURTH
      • LAST
    • relativeDayOfWeek: 1-7 (1=Sun)
      • relativeMonth: 1-31, 0 if all months

For TIME_CHANGE:

  • timeChangeStartHour: 0-23
  • timeChangeStartMin: 0-59
  • timeChangeStopHour: 0-23
  • timeChangeStopMin: 0-59

Feedback

Comment on this article:

blog comments powered by Disqus
This page was last modified on May 16, 2017, at 00:20.