Find employee by username
Use case
In this example, we will review how to find an employee by username.
Use case data
API parameters with values
We will search for the employee with the test.employee@bank.com
username.
...api/v1/employees/username?username=test.employee@bank.com
Sample API call
To find an employee by username
, make the following API call.
Sample request
Below is an example request of the API call to retrieve customer data.
curl --location 'https://auth-api.sandbox.tuumplatform.com/api/v1/employees/username?username=test.employee%40bank.com' \
--header 'x-channel-code: BACKOFFICE' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiT2ZmaWNlciBUZXN0IiwiZW1wbG95ZWVJZCI6IklELTEwMDAiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHBpcnlEVGltZSI6IjIwMjUtMDEtMDZUMjI6MzA6MjIiLCJleHAiOjE3MzYyMDI2MjIsInJvbGVzIjpbIkFETUlOIl19.N67SgRQZXpJHFCh-Ea6oAyQjlq86kl8vUkEyokn6bDw' \
--data ''
Sample response
Below you find an example response body to the API call above.
Response
{
"errors": null,
"validationErrors": null,
"data": {
"employeeId": "ID-1183",
"firstName": "Test",
"lastName": "Employee",
"username": "test.employee@bank.com",
"email": "test.employee@bank.com",
"authenticationMethod": "PASSWORD",
"defaultTenantCode": "MB",
"roles": [
"CUSTOMER_SERVICE"
],
"tenants": [
{
"tenantEmployeeId": "ID-1213",
"defaultTenant": true,
"tenantId": "ID-1000",
"tenantCode": "MB",
"roles": [
"CUSTOMER_SERVICE"
]
}
],
"externalId": null,
"lastLogin": "2024-11-25T12:28:04.635156Z",
"blockedUntil": null,
"failedAttempts": 0
}
}
Result
The result of the API call is the dataset of a particular employee.