Delete categories from the company record. Only user-defined categories can be deleted.

Parameters

ParameterTypeRequiredNotes
Key integer True CatNo is the only accepted Key
KeyVal integer True The corresponding CatNo to be deleted

Example Query

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

Sample JSON Input

  [
{
 "Key": "CatNo",
 "KeyVal": "7"
},

{
 "Key": "CatNo",
 "KeyVal": "8"
}  

JSON Response

  {
 "ErrorMessage": "Success",
 "ItemResponses": [
  {
   "ErrorMessage": "Success",
   "ItemNo": "1",
   "ErrorCode": "0"
  },{
   "ErrorMessage": "Success",
   "ItemNo": "2",
   "ErrorCode": "0"
  }],
 "Items": [],
 "ErrorCode": "0"
}  

XML Response

 <WSDN>
  <ErrorMessage>Success</ErrorMessage>
  <ItemResponses>
	<ArrayItem>
	  <ErrorMessage>Success</ErrorMessage>
	  <ItemNo>1</ItemNo>
	  <ErrorCode>0</ErrorCode>
	</ArrayItem>
	<ItemResponses>
	  <ArrayItem>
		<ErrorMessage>Success</ErrorMessage>
		<ItemNo>2</ItemNo>
		<ErrorCode>0</ErrorCode>
	  </ArrayItem>
	</ItemResponses>
  </ItemResponses>
  <ErrorCode>0</ErrorCode>
</WSDN> 

Resource Information

Response Format JSON/XML
Request Type POST