GET api/Department/Get?departmentName={departmentName}&departmentId={departmentId}

Gets a single 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:

  • GET api/Department/Get?departmentName=Finance
  • GET api/Department/Get?departmentId=4

Body Parameters

None.

Response Information

Resource Description

JsonResponseModelOfDepartment
NameDescriptionTypeMandatory when
ResponseCode

integer

ResponseMessage

string

Data

Department

Response Formats

application/json, text/json

Sample:
{
  "ResponseCode": 200,
  "ResponseMessage": "Department Finance.",
  "Data": {
    "Id": 1,
    "Name": "Finance",
    "Description": "Financial division",
    "DepartmentManagerAbbreviation": "CFO",
    "MemberAbbreviations": [
      "ACC",
      "BA",
      "CFO"
    ]
  }
}

text/xml

Sample:
<JsonResponseModelOfDepartmentCyyWUdKo xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RGS.API.Models">
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/QAP.API.ModelsForClient">
    <d2p1:DepartmentManagerAbbreviation>CFO</d2p1:DepartmentManagerAbbreviation>
    <d2p1:Description>Financial division</d2p1:Description>
    <d2p1:Id>1</d2p1:Id>
    <d2p1:MemberAbbreviations xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:string>ACC</d3p1:string>
      <d3p1:string>BA</d3p1:string>
      <d3p1:string>CFO</d3p1:string>
    </d2p1:MemberAbbreviations>
    <d2p1:Name>Finance</d2p1:Name>
  </Data>
  <ResponseCode>200</ResponseCode>
  <ResponseMessage>Department Finance.</ResponseMessage>
</JsonResponseModelOfDepartmentCyyWUdKo>

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)