Api doc


SDK's


Api Modules

staff.employees



Supported Methods:

GET
Params
  • token (Required): valid token
  • schedule: varchar
  • location: integer
  • fm: enum (0, 1)
  • disabled: enum (0, 1)
  • inactive: enum (0, 1)
  • with_custom_fields: enum (0, 1)
  • scheduler_users: min length 1
  • check_permission: min length 1
  • with_settings: enum (0, 1)


CREATE
Params
  • token (Required): valid token


Documentation

GET
Returns array of all employees (activated, not activated). If you have specified schedule or location, it will return array of all employees related to specified schedule or location. Disabled employees can be retrieved with parameter "disabled":1, Not activated employees can be retrieved with "inactive":1
Level 5 is required

--

Parameters:

  1. "schedule": accepted //Working schedule (integer)
  2. "location": accepted //Location id (integer)
  3. "fm": accepted /*Force mater database (enum[0,1]) - internal use
  4.   *Results will be the same with or without this param
  5.   *The difference is that it forces data writing into
  6.   *the master database before slave database*/
  7. "disabled": accepted /*Retrieves just disabled employees (enum[1])
  8.   *1: Return disabled*/
  9. "inactive": accepted /*Retrieves just not activated employees (enum[1])
  10.   *1: Return inactive*/
  11. "with_custom_fields": accepted /*Retrieves custom fields (enum[0,1])
  12.   *0: Do not retrieve employee custom fields */
  13. "scheduler_users" : accepted /* Retrieves staff user can see on schedule if
  14.   *staff gallery is off (min length 1)*/
  15.  
  16. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"staff.employees",
  3. "method":"GET",
  4. "request":{
  5. "schedule":"192278";
  6. }
  7. }

Example Response:

  1. {
  2. "status":1,
  3. "data": [{
  4. "p_email": "1",
  5. "custom": {
  6. "2183": {
  7. "toggle": "0",
  8. "access": "1",
  9. "values": "",
  10. "name": "wage",
  11. "type": "1",
  12. "value": "",
  13. "text": "",
  14. "id": "2183"
  15. },
  16. "2182": {
  17. "toggle": "0",
  18. "access": "1",
  19. "values": "",
  20. "name": "email",
  21. "type": "1",
  22. "value": "",
  23. "text": "",
  24. "id": "2182"
  25. },
  26. "2181": {
  27. "toggle": "0",
  28. "access": "1",
  29. "values": "",
  30. "name": "id",
  31. "type": "1",
  32. "value": "e-id",
  33. "text": "",
  34. "id": "2181"
  35. },
  36. "2180": {
  37. "toggle": "0",
  38. "access": "1",
  39. "values": "",
  40. "name": "checkbox",
  41. "type": "4",
  42. "value": "",
  43. "text": "",
  44. "id": "2180"
  45. },
  46. "2179": {
  47. "toggle": "0",
  48. "access": "1",
  49. "values": "S,M,L,XL",
  50. "name": "T-shirt size",
  51. "type": "3",
  52. "value": "L",
  53. "text": "",
  54. "id": "2179"
  55. },
  56. "2184": {
  57. "toggle": "0",
  58. "access": "1",
  59. "values": "",
  60. "name": "Cs1",
  61. "type": "1",
  62. "value": "",
  63. "text": "",
  64. "id": "2184"
  65. }
  66. },
  67. "location": "48371",
  68. "birth_day": "0",
  69. "ical": "http://www.humanity.com/ical/7e892ad79509f8931ea9ba6bc06.ics",
  70. "nick_name": "",
  71. "group_name": "Employee",
  72. "schedules": {"192278": "Exapmle Position"},
  73. "address": "",
  74. "username": "testsp.com",
  75. "state": "",
  76. "home_phone": "",
  77. "status_name": "Activated",
  78. "wage": "",
  79. "group": "5",
  80. "cell_phone": "",
  81. "avatar_url": null,
  82. "eid": "",
  83. "notes": "",
  84. "id": "277429",
  85. "p_phone": "1",
  86. "email": "test@sp.com",
  87. "timezone": "152",
  88. "language": "",
  89. "status": "1",
  90. "city": "",
  91. "work_start_date": "2013-10-08 10:41:00",
  92. "timezone_name": "America/New_York",
  93. "last_active": "0",
  94. "zip": "",
  95. "avatar": {
  96. "medium": "http://cdn.humanity.com/app/layout/0/images/no_avatar.png",
  97. "large": "http://cdn.humanity.com/app/layout/0/images/no_avatar.png",
  98. "small": "http://cdn.humanity.com/app/layout/0/images/no_avatar.png"
  99. },
  100. "registered": "1381221699",
  101. "birth_month": "0",
  102. "name": "Example Employee"
  103. }],
  104. "token":"xxxxxxx"
  105. }

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