Administrator endpoints
Base URL: /tenants/{tenantName}/admins
Search
Get specific administrator by id and/or reference number and/or email address.
URL: /tenants/{tenantName}/admins/search
Method: GET
Parameters:
Name | Type | Required | Description |
tenantName | String | Yes | The name of the tenant |
userId | Integer (int32) | No | The id of the administrator to retrieve |
refNum | String | No | The reference number of the administrator to retrieve |
String | No | The email address of the administrator to retrieve |
Responses:
Status code | Status Description |
200 | Successful operations |
400 | Invalid input |
401 | Unauthorised |
403 | Permission denied |
404 | Not found |
Response body
{
id: integer (Int32),
firstName: string,
lastName: string,
email: string,
gender: string,
referenceNumber: string,
groups: [ integer array ],
status: string,
mobile: string,
roles: [ string array ],
usePWA: boolean,
authenticationType: string
}
Create administrator
Creates a new administrator.
URL: /tenants/{tenantName}/admins
Method: POST
Parameters:
Name | Type | Required | Description |
tenantName | String | Yes | The name of the tenant |
Request body
{
firstName: string,
lastName: string,
email: string,
gender: string,
referenceNumber: string,
groups: [ integer array ],
status: string,
mobile: string,
roles: [ string array ],
usePWA: boolean,
authenticationType: string
}
Responses:
Status code | Status Description |
200 | Successful operations |
400 | Invalid input |
401 | Unauthorised |
403 | Permission denied |
Response body
{
id: integer (Int32),
firstName: string,
lastName: string,
email: string,
gender: string,
referenceNumber: string,
groups: [ integer array ],
status: string,
mobile: string,
roles: [ string array ],
usePWA: boolean,
authenticationType: string
}
Update administrator
Updates an existing administrator.
URL: /tenants/{tenantName}/admins/{userId}
Method: PUT
Parameters:
Name | Type | Required | Description |
tenantName | String | Yes | The name of the tenant |
userId | Integer (int32) | Yes | The id of the administrator to update |
Request body
{
firstName: string,
lastName: string,
email: string,
gender: string,
referenceNumber: string,
groups: [ integer array ],
status: string,
mobile: string,
roles: [ string array ],
usePWA: boolean,
authenticationType: string
}
Responses:
Status code | Status Description |
200 | Successful operations |
400 | Invalid input |
401 | Unauthorised |
403 | Permission denied |
404 | Not found |
Response body
{
id: integer (Int32),
firstName: string,
lastName: string,
email: string,
gender: string,
referenceNumber: string,
groups: [ integer array ],
status: string,
mobile: string,
roles: [ string array ],
usePWA: boolean,
authenticationType: string
}
Deactivate administrator
Deactivate an existing administrator, where found.
URL: /tenants/{tenantName}/admins/{userId}
Method: DELETE
Parameters:
Name | Type | Required | Description |
tenantName | String | Yes | The name of the tenant |
userId | Integer (int32) | Yes | The id of the administrator to deactivate |
Responses:
Status code | Status Description |
200 | Successful operations |
400 | Invalid input |
401 | Unauthorised |
403 | Permission denied |
404 | Not found |