staff.employee

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
id (accepted)integerEmployees user id - Used in database
Required if there is no eid specified
eid (accepted)integerUnique user id
log_data (accepted)varchar
status (accepted)enum (0, 1, -1, -2, deleted, all)

CREATE

ParametersTypeDescription
token (required)Valid token
eid (accepted)varcharEid
status (accepted)enum (0, 1, -1, -2)-1 disabled,
0 deactivated,
1 activated
group (accepted)enum (2, 3, 4, 5, 6, 7)2: manager
3: supervisor
4: scheduler
5: employee
email (accepted)emailUsers email address
nick_name (accepted)varcharNick name
birth_day (accepted)integerEmployees birth day
birth_month (accepted)integerEmployees birth month
cell_phone (accepted)phoneCell phone number
wage (accepted)integerWage
home_phone (accepted)phoneHome phone number
address (accepted)varcharAddress
city (accepted)varcharCity
state (accepted)varcharState
job_title (accepted)varcharJob title
middle_name (accepted)varcharMiddle name
gender (accepted)varcharUser gender
zip (accepted)varcharZIP code
notes (accepted)varcharNotes
smsgateway (accepted)integerSMS gateway
password (accepted)min length 6Users password
username (accepted)min length 3Users username
send_activation (accepted)enum (0,1)0: Do not send activation
1: Send activation
facebook (accepted)varcharFacebook app user
google (accepted)varcharGoogle app user
ldap (accepted)varcharLdap
language (accepted)varcharUsers language
skills (accepted)varcharUsers skills
timezone_id (accepted)integerTime Zone id
location (accepted)integerLocation id
undertime (accepted)integerUser under time
overtime (accepted)integerUser overtime
daily_overitme (accepted)integerDaily overtime
max_days_row (accepted)integerMaximum days in a row
pref_shift_autoconfirm (accepted)enum (-1, 1, -2)
pref_vacation_max_days (accepted)integerMaximum vacation days
custom (accepted)enum (Array)
positions (accepted)enum (Array)Employee positions
monthly_overtime (accepted)integerMonthly overtime
monthly_undertime (accepted)integerMonthly undertime
pref_mtimebshifts (accepted)enum (0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48)Minimum time between shifts in hours
work_start_date (accepted)dateWork start date
fname (accepted)varcharFirst name
lname (accepted)varcharLast name
name (required)varcharFull name

UPDATE

ParametersTypeDescription
token (required)Valid token
id (required)integerEmployee id
eid (accepted)varcharEid
status (accepted)enum (0, 1, -1)-1 disabled,
0 deactivated,
1 activated
group (accepted)enum (2, 3, 4, 5, 6, 7)2: manager
3: supervisor
4: scheduler
5: employee
name (accepted)varcharEmployee name
first_name (accepted)varcharFirst name
middle_name (accepted)varcharMiddle name
last_name (accepted)varcharLast name
email (accepted)emailEmployees email address
nick_name (accepted)varcharNick name
birth_day (accepted)integerBirth day
birth_month (accepted)integerBirth month
cell_phone (accepted)phoneCell phone number
wage (accepted)integerWage
p_email (accepted)enum (0, 1)
p_phone (accepted)enum (0, 1)
pref_caltime (accepted)enum (0, 1)
home_phone (accepted)phoneHome phone
address (accepted)varcharAddress
city (accepted)varcharCity
state (accepted)varcharState
job_title (accepted)varcharJob title
zip (accepted)varcharZIP code
gender (accepted)varcharUsers gender
notes (accepted)varcharNotes
smsgateway (accepted)integerGateway for sms notifications
password (accepted)integerPassword: 6 characters min
username (accepted)integerUsername: 3 characters min
addschedule (accepted)varcharAssigns position(s) to a staff member.
String of Position (Schedule) IDs, separated with comma.
Example: 138641,138642,143893
removeschedule (accepted)varcharUnassigns position(s) from a staff member.
String of Position (Schedule) IDs, separated with comma.
Example: 138641,138642,143893
addskill (accepted)integer
removeskill (accepted)integer
send_activation (accepted)enum (0,1)0: Do not send activation
1: Send activation
language (accepted)varcharLanguage
custom (accepted)enum (Array)
timezone_id (acceptedintegerTime Zone id
undertime (accepted)integerUndertime
overtime (accepted)integerOvertime
daily_overtime (accepted)integerDaily overtime
max_days_row (accepted)integerMax days in a row
pref_shift_autoconfirm (accepted)enum (-1, 1, -2)
pref_vacation_max_days (accepted)integerMaximum vacation days
location (accepted)integerLocation
monthly_overtime (accepted)integerMonthly overtime
monthly_undertime (accepted)integerMonthly undertime
pref_mtimebshifts (accepted)enum (0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48)Minimum time between shifts in hours
work_start_date (accepted)dateUsers work start date
settings (accepted)varchar

DELETE

ParametersTypeDescription
token (required)Valid token
id (required)integerEmployee id

DOCUMENTATION

GET
Returns employee info. You have to specify employees id or eid.
Level 5 is required

--

Example Request:

{
   "module":"staff.employee",
   "method":"GET",
   "request":{
      "id":"5140"
   }
}

Example Response:

{
   "status":1,
   "data":{
      "id":"5140",
      "language":null,
      "eid":"",
      "name":"John Smith",
      "username":"john",
      "email":"[email protected]",
      "group":"5",
      "status":"0",
      "wage":"",
      "nick_name":"",
      "birth_day":"0",
      "birth_month":"0",
      "cell_phone":"",
      "home_phone":"",
      "avatar":"",
      "address":"",
      "city":"",
      "state":"",
      "zip":"",
      "notes":"",
      "ical":"ics file url",
      "timezone":"-05:00,1",
      "timezone_name":"America\/New_York",
      "group_name":"Employee",
      "status_name":"Not Activated",
      "schedules":{
         "32408":"Admin\/meetings"
      }
   },
   "token":"xxxxxxx"
}

CREATE
Creates new employee.
Level 3 is required

--

Example Request:

{
   "module":"staff.employee",
   "method":"CREATE",
   "request":{
      "name":"John Smith"
   }
}

Example Response:

{
   "status":1,
   "data":{
      "id":"5141",
      "language":null,
      "eid":"",
      "name":"Marc Smith",
      "username":"111222333",
      "email":"",
      "group":"5",
      "status":"0",
      "wage":"",
      "nick_name":"",
      "birth_day":"0",
      "birth_month":"0",
      "cell_phone":"",
      "home_phone":"",
      "avatar":"",
      "address":"",
      "city":"",
      "state":"",
      "zip":"",
      "notes":"",
      "ical":"ics file url",
      "timezone":"-05:00,1",
      "timezone_name":"America\/New_York",
      "group_name":"Employee",
      "status_name":"Not Activated",
   },
   "token":"xxxxxxx"
}

UPDATE
Updates employees account.
Level 3 is required

--
Example Request:

{
   "module":"staff.employee",
   "method":"UPDATE",
   "request":{
      "id":"5141",
      "email":"[email protected]"
   }
}

Example Response:

{
   "status":1,
   "data":{
      "id":"5141",
      "language":null,
      "eid":"",
      "name":"[email protected]",
      "username":"111222333",
      "email":"",
      "group":"5",
      "status":"0",
      "wage":"",
      "nick_name":"",
      "birth_day":"0",
      "birth_month":"0",
      "cell_phone":"",
      "home_phone":"",
      "avatar":"",
      "address":"",
      "city":"",
      "state":"",
      "zip":"",
      "notes":"",
      "ical":"ics file url",
      "timezone":"-05:00,1",
      "timezone_name":"America\/New_York",
      "group_name":"Employee",
      "status_name":"Not Activated",
   },
   "token":"xxxxxxx"
}

DELETE
Deletes employees account.
Level 3 is required

--

Example Request:

{
   "module":"staff.employee",
   "method":"DELETE",
   "request":{
      "id":"165"
   }
}

Example Response:

{
   "status":1,
   "data":"User deleted",
   "token":"xxxxxxx"
}