SUPPORTED METHODS:
GET
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
id (accepted) | integer | Employees user id - Used in database Required if there is no eid specified |
eid (accepted) | integer | Unique user id |
log_data (accepted) | varchar | |
status (accepted) | enum (0, 1, -1, -2, deleted, all) |
CREATE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
eid (accepted) | varchar | Eid |
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) | Users email address | |
nick_name (accepted) | varchar | Nick name |
birth_day (accepted) | integer | Employees birth day |
birth_month (accepted) | integer | Employees birth month |
cell_phone (accepted) | phone | Cell phone number |
wage (accepted) | integer | Wage |
home_phone (accepted) | phone | Home phone number |
address (accepted) | varchar | Address |
city (accepted) | varchar | City |
state (accepted) | varchar | State |
job_title (accepted) | varchar | Job title |
middle_name (accepted) | varchar | Middle name |
gender (accepted) | varchar | User gender |
zip (accepted) | varchar | ZIP code |
notes (accepted) | varchar | Notes |
smsgateway (accepted) | integer | SMS gateway |
password (accepted) | min length 6 | Users password |
username (accepted) | min length 3 | Users username |
send_activation (accepted) | enum (0,1) | 0: Do not send activation 1: Send activation |
facebook (accepted) | varchar | Facebook app user |
google (accepted) | varchar | Google app user |
ldap (accepted) | varchar | Ldap |
language (accepted) | varchar | Users language |
skills (accepted) | varchar | Users skills |
timezone_id (accepted) | integer | Time Zone id |
location (accepted) | integer | Location id |
undertime (accepted) | integer | User under time |
overtime (accepted) | integer | User overtime |
daily_overitme (accepted) | integer | Daily overtime |
max_days_row (accepted) | integer | Maximum days in a row |
pref_shift_autoconfirm (accepted) | enum (-1, 1, -2) | |
pref_vacation_max_days (accepted) | integer | Maximum vacation days |
custom (accepted) | enum (Array) | |
positions (accepted) | enum (Array) | Employee positions |
monthly_overtime (accepted) | integer | Monthly overtime |
monthly_undertime (accepted) | integer | Monthly 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) | date | Work start date |
fname (accepted) | varchar | First name |
lname (accepted) | varchar | Last name |
name (required) | varchar | Full name |
UPDATE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
id (required) | integer | Employee id |
eid (accepted) | varchar | Eid |
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) | varchar | Employee name |
first_name (accepted) | varchar | First name |
middle_name (accepted) | varchar | Middle name |
last_name (accepted) | varchar | Last name |
email (accepted) | Employees email address | |
nick_name (accepted) | varchar | Nick name |
birth_day (accepted) | integer | Birth day |
birth_month (accepted) | integer | Birth month |
cell_phone (accepted) | phone | Cell phone number |
wage (accepted) | integer | Wage |
p_email (accepted) | enum (0, 1) | |
p_phone (accepted) | enum (0, 1) | |
pref_caltime (accepted) | enum (0, 1) | |
home_phone (accepted) | phone | Home phone |
address (accepted) | varchar | Address |
city (accepted) | varchar | City |
state (accepted) | varchar | State |
job_title (accepted) | varchar | Job title |
zip (accepted) | varchar | ZIP code |
gender (accepted) | varchar | Users gender |
notes (accepted) | varchar | Notes |
smsgateway (accepted) | integer | Gateway for sms notifications |
password (accepted) | integer | Password: 6 characters min |
username (accepted) | integer | Username: 3 characters min |
addschedule (accepted) | varchar | Assigns position(s) to a staff member. String of Position (Schedule) IDs, separated with comma. Example: 138641,138642,143893 |
removeschedule (accepted) | varchar | Unassigns 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) | varchar | Language |
custom (accepted) | enum (Array) | |
timezone_id (accepted | integer | Time Zone id |
undertime (accepted) | integer | Undertime |
overtime (accepted) | integer | Overtime |
daily_overtime (accepted) | integer | Daily overtime |
max_days_row (accepted) | integer | Max days in a row |
pref_shift_autoconfirm (accepted) | enum (-1, 1, -2) | |
pref_vacation_max_days (accepted) | integer | Maximum vacation days |
location (accepted) | integer | Location |
monthly_overtime (accepted) | integer | Monthly overtime |
monthly_undertime (accepted) | integer | Monthly 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) | date | Users work start date |
settings (accepted) | varchar |
DELETE
Parameters | Type | Description |
---|---|---|
token (required) | Valid token | |
id (required) | integer | Employee 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"
}