Returns a list of specified shifts on the Current Schedule based on filtered JSON input. No filters will return all timeblocks. If the hours of a TimeBlock have been overridden, the number of hours will output as "OverrideHours"

Parameters

ParameterTypeRequiredNotes
StartDate datetime True
EndDate datetime True
UserID Array of Integers False A filter of 0 gets open timeblocks.
Categories Array of Integers False

Example Query

POST https://api.workschedule.net/WS.exe?Module=API&SessionID=123&SP=12345678&Method=getTimeBlocks

Sample JSON Input

  {
 "StartDate": "9-1-2014",
 "EndDate": "9-3-2014",
 "UserID": [3, 5]
}  

JSON Response

  {
 "ErrorMessage": "Success",
 "ItemResponses": [],
 "Items": [
  {
   "TimeBlockID": "1250",
   "StartDateTime": "1-28-2015 6:00:00 AM",
   "EndDateTime": "1-28-2015 10:30:00 AM",
   "CategoryItems": [
	{
	 "CatItemID": "7",
	 "Name": "Lakeside",
	 "CatNo": "1"
	},{
	 "CatItemID": "9",
	 "Name": "Accounting",
	 "CatNo": "2"
	},{
	 "CatItemID": "17",
	 "Name": "Billing",
	 "CatNo": "3"
	},{
	 "CatItemID": "21",
	 "Name": "Morning",
	 "CatNo": "4"
	}],
   "UserID": "5",
   "TimeOnOff": "On",
   "EmployeeName": "Thomas Bailey"
  },{
   "TimeBlockID": "1253",
   "StartDateTime": "1-28-2015 11:00:00 AM",
   "EndDateTime": "1-28-2015 6:00:00 PM",
   "CategoryItems": [
	{
	 "CatItemID": "1",
	 "Name": "Main",
	 "CatNo": "1"
	},{
	 "CatItemID": "12",
	 "Name": "HR",
	 "CatNo": "2"
	},{
	 "CatItemID": "13",
	 "Name": "Opening",
	 "CatNo": "3"
	}],
   "UserID": "3",
   "TimeOnOff": "On",
   "EmployeeName": "Delores Iser"
  }],
 "ErrorCode": "0"
}  

Resource Information

Response Format JSON
Request Type POST