Removes employee with given ID from a tribe.
curl --request POST \
--url 'URL/api/employees/unassign/tribe/200' \
--header 'authorization: Bearer TOKEN' \
--header 'content-type: application/json' \
--data '{
"tribe_id": 5
}'
ROLE_USER
role for unassigning self, ROLE_TRIBE_MASTER
role for unassigning other users.
JSON object containing one field.
{
"tribe_id": 5
}
tribe_id
- tribe ID
JSON array containing Employee objects. Content of each JSON object depends on users role.
Sample result for highest role:
[
{
"id": 200,
"name": "John",
"lastName": "Smith",
"photo": "https://sample.tld/photo.png",
"phone": "123456789",
"position": {
"id": 1,
"name": "Backend developer",
"createdAt": 1234567890,
"updatedAt": 1234567890,
"employeeCount": 15,
"strategy": { ... }
},
"level": {
"id": 1,
"name": "Senior",
"createdAt": 1234567890,
"updatedAt": 1234567890,
"employeeCount": 15,
"priority": 5,
"strategy": { ... }
},
"tribe": {
"id": 1,
"name": "Tribe name",
"description": "Tribe description"
},
"remote": true,
"city": "Wrocław",
"email": "jsmith@example.com",
"manager": false,
"licencePlate": "ABCD123",
"gender": 0,
"freeToday": false,
"roles": [ "ROLE_USER" ],
"worktime": 28800,
"jobTimeValue": 28800,
"childCare": 0,
"hiredAt": "2019-01-01",
"hiredTo": null,
"dateOfBirth": "1997-10-21",
"contract": {
"id": 1,
"name": "CoE"
},
"privatePhone": "1234567890",
"emergencyFirstName": "John",
"emergencyLastName": "Doe",
"emergencyAddress": "",
"emergencyPhone": "1234567890",
"togglApiKey": "ABCDEFGHIJKLM",
"locked": false,
"slackStatus": 1,
"agreementsRequired": false,
"hasSetPin": true,
"language": "pl"
},
...
]
Fields for ROLE_USER
and above:
id
- Employee's IDname
- Employee's namelastName
- Employee's last namephoto
- URL address to photophone
- public (company) phone numberposition
- object describing Employee's positionid
- Position IDname
- Position namecreatedAt
- creation timestampupdatedAt
- last update timestampemployeeCount
- count of employees using this positionstrategy
- object describing leveling strategy of this position
level
- object describing Employee's levelid
- Level IDname
- Level namecreatedAt
- creation timestampupdatedAt
- last update timestampemployeeCount
- count of employees using this levelpriority
- order of displaying levels in one strategystrategy
- object describing leveling strategy of this level
tribe
- object describing Employee's tribeid
- Tribe IDname
- Tribe namedescription
- Tribe description
remote
- iftrue
, Employee is working remotelycity
- city where Employee is workingemail
- Employee's e-mail addressmanager
-true
if Employee has roleROLE_MANAGER
or abovelicencePlate
- licence plate of Employee's cargender
- 0 if male, 1 if femalefreeToday
-true
if Employee has a free day todayroles
- array containing all of Employee's roles
Fields for ROLE_MANAGER
and above:
worktime
- Worktime in seconds per dayjobTimeValue
- Worktime in seconds per daychildCare
- if1
, user can use child care hours.
Fields for ROLE_HR
and above:
hiredAt
-YYYY-MM-DD
-formatted date when Employee started workhiredTo
-YYYY-MM-DD
-formatted date when Employee ends work in companydateOfBirth
-YYYY-MM-DD
-formatted Employee's birthdaycontract
- object describing Employee's contractid
- Contract IDname
- Contract name ("CoE", "CLC LUMP SUM", "CLC HOURLY", "B2B LUMP SUM" or "B2B HOURLY")
privatePhone
- Employee's private phone number
Fields for ROLE_TRIBE_MASTER
and above:
emergencyFirstName
- Name of contact person in the event of an accidentemergencyLastName
- Last name of contact person in the event of an accidentemergencyAddress
- (deprecated; empty string, will be removed)emergencyPhone
- Phone number of contact person in the event of an accident
Fields for ROLE_SUPER_ADMIN
:
togglApiKey
- API token for communications with Toggllocked
- iftrue
, user has failed PIN authorization three timesslackStatus
- current status of Slack integration (0 - user has not been asked for integration yet; 1 - user was asked and decided not to enable integration or disabled it after integration; 2 - user decided to integrate and Adventure is waiting for token from Toggl; 3 - integration is fully enabled)agreementsRequired
- iftrue
, there are some agreements that user must accepthasSetPin
- iftrue
, user has set PINlanguage
- language used by user; either "pl" or "en".