Create employee
Use case
In this use case, we will create a new employee with the following data set:
Use case data
API parameters with values
We will create a record for a Test Employee.
"username": "[email protected]",
"email": "[email protected]",
"firstName": "Test",
"lastName": "Employee"Test Employee is a Customer Support representative.
"roles": [
"CUSTOMER_SERVICE"
]The employee password must be 12 to 20 characters long and contain one upper-case letter, one digit, and one special character.
"password": "Vys%k6;)#,bab"The name of the tenant where new employee is created.
"tenantCode": "BANK"Sample API call
To create a new employee, make the following API call.
https://auth-api.sandbox.tuumplatform.com/api/v1/employees
Sample request
Below is an example request body of the API call for creating an employee.
{
"username": "[email protected]",
"email": "[email protected]",
"firstName": "Test",
"lastName": "Employee",
"roles": [
"CUSTOMER_SERVICE"
],
"password": "Vys%k6;)#,bab",
"tenantCode": "BANK"
}curl --location 'https://auth-api.sandbox.tuumplatform.com/api/v1/employees' \
--header 'x-channel-code: BACKOFFICE' \
--header 'x-auth-token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJuYW1lIjoiT2ZmaWNlciBUZXN0IiwiZW1wbG95ZWVJZCI6IklELTEwMDAiLCJ0ZW5hbnRDb2RlIjoiTUIiLCJleHBpcnlEVGltZSI6IjIwMjQtMTEtMjVUMTM6MDc6MTUiLCJleHAiOjE3MzI1NDAwMzUsInJvbGVzIjpbIkFETUlOIl19.zIFVF28Qu62-9V6xRJI_t1QpnWd4HdPpPSFx5FaepEM' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "[email protected]",
"email": "[email protected]",
"firstName": "Test",
"lastName": "Employee",
"roles": [
"CUSTOMER_SERVICE"
],
"password": "Vys%k6;)#,bab",
"tenantCode": "BANK"
}'Sample response
Below you find an example response body to the API call above.
Result
As a result, a new employee with the employeeId: ID-1183 was created.
Last updated
Was this helpful?