GetDepartmentList
Description
Returns array of Departments filtered by input parameters. When any of the parameters is missed, then the default value is used.
Input Parameters
Parameter | Description |
---|---|
| To use the Q4 API, you need to have an application key. We use this to track API usage. Currently, the use of the API is allowed only with prior permission. Requests for API keys are reviewed by staff. Please get in touch with support to get the API Key. |
| Specifies the language for which financial reports should be returned. The default value is 1 (English). |
Sample URL
https://nal.q4.local/feed/People.svc/GetDepartmentList?apiKey=BC0F9D590DE14126A1C8C175F91CFE59&languageId=1
Sample Request
var data = {
apiKey: apiKey,
languageId: 1
};
$.ajax({
type: "GET",
url: "http://www.domain.com/feed/People.svc/GetDepartmentList",
data: data,
dataType: "json",
success: OnLoadDepartmentSuccess,
error: OnLoadError
});
Sample Response
{
"GetDepartmentListResult": [{
"DepartmentId": 32,
"DepartmentName": "Management",
"LanguageId": 1,
"Rank": 0,
"RevisionNumber": 766,
"WorkflowId": "c8244d44-ab48-4532-86fe-0c2e2c898740"
},
{
"DepartmentId": 33,
"DepartmentName": "Board of Directors",
"LanguageId": 1,
"Rank": 0,
"RevisionNumber": 1207,
"WorkflowId": "75a31b9d-5394-4e78-b5a7-7cd3c7bddffe"
}
]
}