Contents
Modify Calendar Body
Method
PUT
Syntax
/grs/v1/tenant/{tenantId}/package/{packageId}/businesscalendarbody/{calendarId}
Request Body
{
"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
}
}
Response Body
{
"calendarId": "Calendar_117",
"name": "Dad's Dating Calendar",
"locked": false,
"lockOwner": null,
"weekStarts": 4,
"weekEnds": 5,
"dayStartsHour": 14,
"dayStartsMin": 30,
"dayEndsHour": 23,
"dayEndsMin": 30,
"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
}
}
HTTP Status Codes
- 201 Created—Response body provided
- 401 Unauthorized—APIToken not valid
- 403 Forbidden—User does not have permission for the specified tenant, or does not have proper permission to perform this operation.
- 412 Precondition Failed—Calendar was not locked first
- 422 Unprocessable Entity—Field Validation Error
Repeated for each field:
- 1002—fixedDate—fixedDate must be specified with type of FIXED
- 1003—annualMonth—Invalid value. Must be between 1 and 12
- 1004—annualDay—Invalid value. Must be between 1 and 31.
- 1005—relativeType—Invalid value, must be EVERY, FIRST, SECOND, THIRD, FOURTH, or LAST
- 1006—relativeDayOfWeek—Invalid value. Must be between 1 and 7
- 1007—relativeMonth—Invalid value. Must be between 1 and 12
- 1008—timeChangeStartHour—Invalid value. Must be between 0 and 23
- 1009—timeChangeStartMin—Invalid value. Must be between 0 and 59
- 1010—timeChangeStopHour—Invalid value. Must be between 0 and 23
- 1011—timeChangeStopMin—Invalid value. Must be between 0 and 59
- 503—Service Unavailable
Notes
User must have CALENDAR_MODIFY permission. User must have LOCK. User should pass in structure containing entire calendar body (exceptions). This is a complete replacement of current calendar body (not just changes). Updated structure is returned in response
This page was last edited on May 16, 2017, at 08:20.
Comments or questions about this documentation? Contact us for support!