The administrator can add new users to the system. All new users will belong to the same vendor. The process of a new user registration is similar to a new administrator registration. You should use the API authorization to work with new users. User access to the service can be controlled by setting the "Active" flag.
A role can be set for each user:
| Role | Description |
|---|---|
| Administrator | Access to everything |
| Supervisor | Access to everything except user management and viewing access codes |
| Product manager | Access to product and feature management |
| Sales manager | Access to order and customer management |
| Developer | Access to Software Protection |
Get a list of users
Authorization is required. There are no input parameters.
GET /v1.0/users
Pagination and sorting are available for the query. Available sorting fields: name (LastName, FirstName). The default values for sorting and pagination are: sortby=name&direction=asc&offset=0&limit=100.
The query has an optional parameter archived=false (archived=true) - it is used to display non-archived records (archived records). By default, the query displays all records - both archived and non-archived.
Returns users array:
{
"users": [
{
"_id": 10026,
"confirmed": true,
"email": "1111@gmail.com",
"status": true,
"userdetails": {
"_id": 10027,
"firstname": "MD",
"lastname": "BDev",
"lastvisitdate": 0,
"archived": false,
"archivationdate: 0,
"role": {
"_id": 5,
"createorders": false,
"createproducts": false,
"createusers": false,
"manageprotect": true,
"nameeng": "Developer"
},
"settings": {
"language": 0
}
}}]}
Get a list of roles
Authorization is required. There are no input parameters.
GET /v1.0/users/roles
Returns roles array:
{
"roles": [
{
"_id": 2,
"createorders": true,
"createproducts": true,
"createusers": false,
"manageprotect": true,
"nameeng": "Supervisor",
"readvendorbalance": true
},
{
"_id": 3,
"createorders": false,
"createproducts": true,
"createusers": false,
"manageprotect": false,
"nameeng": "Product manager",
"readvendorbalance": false
},
{
"_id": 4,
"createorders": true,
"createproducts": false,
"createusers": false,
"manageprotect": false,
"nameeng": "Sales manager",
"readvendorbalance": false
},
{
"_id": 5,
"createorders": false,
"createproducts": false,
"createusers": false,
"manageprotect": true,
"nameeng": "Developer",
"readvendorbalance": false
}]}
Create a new user
Authorization is required. RAW JSON input parameters:
{
"username" : "1111@gmail.com",
"roleId" : 5,
"password": "Eklmn63158515Eklmn",
"passwordConfirm" : "Eklmn63158515Eklmn",
"firstName": "My First Name",
"lastName": "My Last Name",
"companyName": "Aktiv",
"phone" : "+49 (0xx) xxxx-xxxx"
}
POST /v1.0/users
Returns the user element:
{
"user": {
"_id": 10065,
"confirmed": false,
"email": "test@gmail.com",
"status": true,
"userdetails": {
"_id": 10067,
"firstname": "Test",
"lastname": "Test",
"lastvisitdate": 0,
"archived": false,
"archivationdate: 0,
"role": {
"_id": 5,
"createorders": false,
"createproducts": false,
"createusers": false,
"manageprotect": true,
"nameeng": "Developer"
},
"settings": {
"language": 0
}
}
}
}
Change user data
Authorization is required. RAW JSON input parameters:
{
"roleId" : 5,
"firstName": "My First Name",
"lastName": "My Last Name",
"userIsActive": "false",
"archived": false
}
PUT /v1.0/users/{id}
Returns the user element:
{
"user": {
"_id": 10065,
"confirmed": false,
"email": "test@gmail.com",
"status": true,
"userdetails": {
"_id": 10067,
"firstname": "Test",
"lastname": "Test",
"lastvisitdate": 0,
"archived": false,
"archivationdate: 0,
"role": {
"_id": 5,
"createorders": false,
"createproducts": false,
"createusers": false,
"manageprotect": true,
"nameeng": "Developer"
},
"settings": {
"language": 0
}
}
}
}