This endpoint returns a list of all dependants for an employee. The returned list will be determined by the permissions/access of the API client.
GET
Request
Url Params
userAccountId | int |
Authorization
The following authorization header is required. The authorisation header should be set to a 'Bearer Token' type
Token |
Response
The response will return an array of 0 to n JSON objects. Each JSON object in the array contains the following properties:
userAccountId | string | the user account id of the requested user | ||
tenantId | int | the id of the tenant which the user belongs to | ||
tenantName | string | the sub domain name of the tenant the user belongs to | ||
hasPersonDetails | bool | the requested use has a person details record | ||
dependants | [repeated] | |||
id | int | the id of the dependant | ||
typeId | int | the type id of the dependant within the tenant | ||
type | ||||
id | int | the id of the dependant type | ||
systemId | int | the id of the dependant type at platform level | ||
displayName | string | the display name of the dependant type | ||
orderPriority | int | order priority of dependant type | ||
inUse | bool | indicates that dependant type is in use for this tenant | ||
limit | int | the usage limit for this dependant type (on the tenant) | ||
salutationId | int | the salutation id of the dependant | ||
salutation | string | the salutation text of the dependant | ||
foreNames | string | the forenames of the dependant | ||
middleNames | string | the middle names of the dependant | ||
surname | string | the surname of the dependant | ||
dateOfBirth | date | the date of birth of the user | ||
genderId | int | the gender id of the dependant | ||
gender | string | gender text of the dependant | ||
registerDisabled | bool | indicates if the dependant is registered as disabled | ||
inFullTimeEducation | bool | indicates if dependant is in full time education | ||
saved | bool | [na] | ||
userAccountId | string | [future use] | ||
lastUpdated | date | When the record was last updated |
Permissions
The API Client requires at least readonly permission to "User Dependants" and access to the user(s) to successfully retrieve any results (See Admin User Roles for more details). Only tenants that the API client has access to will be returned.
Examples
C# Example
var client = new HttpClient(); var request = new HttpRequestMessage(HttpMethod.Get, "https://{platform API url}/api/admin/dependant/list/get/{userAccountId}"); request.Headers.Add("Authorization", "Bearer {access token}"); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); Console.WriteLine(await response.Content.ReadAsStringAsync());
cURL Example
curl --location 'https://{platform API url}/api/admin/dependant/list/get/{userAccountId}}' \ --header 'Authorization: Bearer {access token}'