Api doc


SDK's


Api Modules

staff.employee



Supported Methods:

GET
Params
  • token (Required): valid token
  • id: integer
  • eid: varchar
  • log_data: varchar
  • status: enum (0, 1, -1, -2, deleted, all)


CREATE
Params
  • token (Required): valid token
  • eid: varchar
  • status: enum (0, 1, -1, -2)
  • group: enum (2, 3, 4, 5, 6, 7)
  • email: email
  • nick_name: varchar
  • birth_day: integer
  • birth_month: integer
  • cell_phone: phone
  • wage: integer
  • home_phone: phone
  • address: varchar
  • city: varchar
  • state: varchar
  • job_title: varchar
  • middle_name: varchar
  • gender: varchar
  • zip: varchar
  • notes: varchar
  • smsgateway: integer
  • password: min length 6
  • username: min length 3
  • send_activation: enum (1)
  • facebook: varchar
  • google: varchar
  • ldap: varchar
  • language: varchar
  • skills: varchar
  • timezone_id: integer
  • location: integer
  • undertime: integer
  • overtime: integer
  • daily_overtime: integer
  • max_days_row: integer
  • pref_shift_autoconfirm: enum (-1, 1, -2)
  • pref_vacation_max_days: integer
  • custom: enum (Array)
  • positions: enum (Array)
  • monthly_overtime: integer
  • monthly_undertime: integer
  • pref_mtimebshifts: enum (0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48)
  • work_start_date: date
  • fname: varchar
  • lname: varchar
  • name: varchar


UPDATE
Params
  • token (Required): valid token
  • id (Required): integer
  • eid: varchar
  • status: enum (0, 1, -1, -2)
  • group: enum (2, 3, 4, 5, 6, 7)
  • name: varchar
  • first_name: varchar
  • middle_name: varchar
  • last_name: varchar
  • email: email
  • nick_name: varchar
  • birth_day: integer
  • birth_month: integer
  • cell_phone: phone
  • wage: integer
  • p_email: enum (0, 1)
  • p_phone: enum (0, 1)
  • pref_caltime: enum (10, 20)
  • home_phone: phone
  • address: varchar
  • city: varchar
  • state: varchar
  • job_title: varchar
  • middle_name: varchar
  • gender: varchar
  • zip: varchar
  • notes: varchar
  • smsgateway: integer
  • password: min length 6
  • username: min length 3
  • addschedule: varchar
  • removeschedule: varchar
  • addskill: integer
  • removeskill: integer
  • send_activation: enum (1)
  • language: varchar
  • custom: enum (Array)
  • timezone_id: integer
  • undertime: integer
  • overtime: integer
  • daily_overtime: integer
  • max_days_row: integer
  • pref_shift_autoconfirm: enum (-1, 1, -2)
  • pref_vacation_max_days: integer
  • location: integer
  • monthly_overtime: integer
  • monthly_undertime: integer
  • pref_mtimebshifts: enum (0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48)
  • work_start_date: date
  • settings: varchar


DELETE
Params
  • token (Required): valid token
  • id (Required): integer


Documentation

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

--

Parameters:

  1. "id": accepted /*Employees user id - Used in database (integer)
  2.   *Required if there is no eid specified*/
  3. "eid": accepted /*Unique user id (varchar)
  4.   *Required if there is no id specified*/
  5. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"staff.employee",
  3. "method":"GET",
  4. "request":{
  5. "id":"5140"
  6. }
  7. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":"5140",
  5. "language":null,
  6. "eid":"",
  7. "name":"John Smith",
  8. "username":"john",
  9. "email":"john@shiftplanning.com",
  10. "group":"5",
  11. "status":"0",
  12. "wage":"",
  13. "nick_name":"",
  14. "birth_day":"0",
  15. "birth_month":"0",
  16. "cell_phone":"",
  17. "home_phone":"",
  18. "avatar":"",
  19. "address":"",
  20. "city":"",
  21. "state":"",
  22. "zip":"",
  23. "notes":"",
  24. "ical":"ics file url",
  25. "timezone":"-05:00,1",
  26. "timezone_name":"America\/New_York",
  27. "group_name":"Employee",
  28. "status_name":"Not Activated",
  29. "schedules":{
  30. "32408":"Admin\/meetings"
  31. }
  32. },
  33. "token":"xxxxxxx"
  34. }

---

CREATE
Creates new employee.
Level 3 is required

--

Parameters:

  1. "name": required //Employees name (varchar)
  2. "eid": accepted //Eid (varchar)
  3. "status": accepted //Account status (enum[-2,-1,0,1])
  4. /* -1 disabled,
  5.   * 0 deactivated,
  6.   * 1 activated */
  7. "group": accepted //Employees group (enum[2,3,4,5,6,7])
  8. /* 2: manager
  9.   * 3: supervisor
  10.   * 4: scheduler
  11.   * 5: employee */
  12. "email": accepted //Employees email address (varchar)
  13. "nick_name": accepted //Nick name (varchar)
  14. "birth_day": accepted //Employees birth day (integer)
  15. "birth_month": accepted //Employees birth month (integer)
  16. "cell_phone": accepted //Cell phone number (varchar)
  17. "wage": accepted //Wage (numeric)
  18. "home_phone": accepted //Home phone number (varchar)
  19. "address": accepted //Address (varchar)
  20. "city": accepted //City (varchar)
  21. "state": accepted //State (varchar)
  22. "zip": accepted //zip (integer)
  23. "notes": accepted //notes (varchar)
  24. "smsgateway": accepted //Gateway for sms notifications (integer)
  25. "password": accepted //Password: 6 characters min (varchar)
  26. "username": accepted //Username: 3 characters min (varchar)
  27. "send_activation": accepted //Send activation (enum[0,1])
  28. /* 0: Do not send activation
  29.   * 1: Send activation */
  30. "facebook": accepted //Facebook app user (varchar)
  31. "google": accepted //Google app user (varchar)
  32. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"staff.employee",
  3. "method":"CREATE",
  4. "request":{
  5. "name":"John Smith"
  6. }
  7. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":"5141",
  5. "language":null,
  6. "eid":"",
  7. "name":"Marc Smith",
  8. "username":"111222333",
  9. "email":"",
  10. "group":"5",
  11. "status":"0",
  12. "wage":"",
  13. "nick_name":"",
  14. "birth_day":"0",
  15. "birth_month":"0",
  16. "cell_phone":"",
  17. "home_phone":"",
  18. "avatar":"",
  19. "address":"",
  20. "city":"",
  21. "state":"",
  22. "zip":"",
  23. "notes":"",
  24. "ical":"ics file url",
  25. "timezone":"-05:00,1",
  26. "timezone_name":"America\/New_York",
  27. "group_name":"Employee",
  28. "status_name":"Not Activated",
  29. },
  30. "token":"xxxxxxx"
  31. }

---

UPDATE
Updates employees account.
Level 3 is required

--

Parameters:

  1. "id": required //Employees id (integer)
  2. "eid": accepted //Eid (varchar)
  3. "status": accepted //Account status (enum[-2,-1,0,1])
  4. /* -1 disabled,
  5.   * 0 deactivated,
  6.   * 1 activated */
  7. "group": accepted //Employees group (enum[2,3,4,5,6,7])
  8. /* 2: manager
  9.   * 3: supervisor
  10.   * 4: scheduler
  11.   * 5: employee */
  12. "name" : accepted //Name (varchar)
  13. "email": accepted //Employees email address (varchar)
  14. "nick_name": accepted //Nick name (varchar)
  15. "birth_day": accepted //Employees birth day (integer)
  16. "birth_month": accepted //Employees birth month (integer)
  17. "cell_phone": accepted //Cell phone number (varchar)
  18. "wage": accepted //Wage (numeric)
  19. "home_phone": accepted //Home phone number (varchar)
  20. "address": accepted //Address (varchar)
  21. "city": accepted //City (varchar)
  22. "state": accepted //State (varchar)
  23. "zip": accepted //zip (varchar)
  24. "note": accepted //notes (varchar)
  25. "smsgateway": accepted //Gateway for sms notifications (integer)
  26. "password": accepted //Password: 6 characters min (varchar)
  27. "username": accepted //Username: 3 characters min (varchar)
  28. "send_activation": accepted //Send activation (enum[0,1])
  29. /* 0: Do not send activation
  30.   * 1: Send activation */
  31. "addschedule": accepted //Add schedule to staff member (varchar)
  32. /* String of schedule ids, separated with ','
  33.   eg. "138641,138642,143893" */
  34. "removeschedule": accepted //Remove schedule to staff member (varchar)
  35. /* String of schedule ids, separated with ','
  36.   eg. "138641,138642,143893" */
  37. "facebook": accepted //Facebook app user (varchar)
  38. "google": accepted //Google app user (varchar)
  39. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"staff.employee",
  3. "method":"UPDATE",
  4. "request":{
  5. "id":"5141",
  6. "email":"marc@shiftplanning.com"
  7. }
  8. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":"5141",
  5. "language":null,
  6. "eid":"",
  7. "name":"marc@shiftplanning.com",
  8. "username":"111222333",
  9. "email":"",
  10. "group":"5",
  11. "status":"0",
  12. "wage":"",
  13. "nick_name":"",
  14. "birth_day":"0",
  15. "birth_month":"0",
  16. "cell_phone":"",
  17. "home_phone":"",
  18. "avatar":"",
  19. "address":"",
  20. "city":"",
  21. "state":"",
  22. "zip":"",
  23. "notes":"",
  24. "ical":"ics file url",
  25. "timezone":"-05:00,1",
  26. "timezone_name":"America\/New_York",
  27. "group_name":"Employee",
  28. "status_name":"Not Activated",
  29. },
  30. "token":"xxxxxxx"
  31. }

---

DELETE
Deletes employees account.
Level 3 is required

--

Parameters:

  1. "id": required //Employees id (integer)
  2. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"staff.employee",
  3. "method":"DELETE",
  4. "request":{
  5. "id":"165"
  6. }
  7. }

Example Response:

  1. {
  2. "status":1,
  3. "data":"User deleted",
  4. "token":"xxxxxxx"
  5. }

GET STARTED NOW

Free Trial. No Credit Card Required.

close
(e.g.+14158675309 or +1415-8675-309)

By clicking "Create my ShiftPlanning Account" you agree to the Terms of Service and Privacy Policy.

Have a promotional code?Click Here


LIVE CHAT DEMO REQUEST!

Please provide information below.

close
INSTANT DEMOSCHEDULED DEMO
Connect with a ShiftPlanning Team Member for a live demo right now!
 

RESELLER REQUEST!

Please provide information below.

close