DELETE api/Department/Delete?departmentName={departmentName}&departmentId={departmentId}

Deletes a department

Request Information

URI Parameters

NameDescriptionTypeMandatory when
departmentName

string

departmentId

integer

URI Parameters are mutually exclusive (i.e. only one parameter should be specified when calling this API)

For example:

  • DELETE api/Department/Delete?departmentName=Finance
  • DELETE api/Department/Delete?departmentId=4

Body Parameters

None.

Response Information

Resource Description

JsonResponseModelOfString
NameDescriptionTypeMandatory when
ResponseCode

integer

ResponseMessage

string

Data

string

Response Formats

application/json, text/json

Sample:
{
  "ResponseCode": 200,
  "ResponseMessage": "Department deleted.",
  "Data": "Finance"
}
{
  "ResponseCode": 200,
  "ResponseMessage": "Department deleted.",
  "Data": "1"
}

text/xml

Sample:
<JsonResponseModelOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RGS.API.Models">
  <Data>Finance</Data>
  <ResponseCode>200</ResponseCode>
  <ResponseMessage>Department deleted.</ResponseMessage>
</JsonResponseModelOfstring>
<JsonResponseModelOfstring xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RGS.API.Models">
  <Data>1</Data>
  <ResponseCode>200</ResponseCode>
  <ResponseMessage>Department deleted.</ResponseMessage>
</JsonResponseModelOfstring>

Error Response Causes

  • Invalid API credentials
  • No department exists with the given name (if departmentName parameter is provided)
  • No department exists with the given id (if departmentId parameter is provided)