Api doc


SDK's


Api Modules

group.account

Group Account Management - Manage individual group account



Supported Methods:

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


UPDATE
Params
  • token (Required): valid token
  • id (Required): integer
  • name: varchar
  • is_parent: integer
  • parent: varchar


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


CREATE
Params
  • token (Required): valid token
  • name: min length 3
  • administrator: min length 3
  • password: min length 6
  • email: email
  • domain: min length 3
  • clone: integer
  • clone_positions: enum (0, 1)
  • clone_settings: enum (0, 1)
  • clone_training: enum (0, 1)
  • submaster: enum (0, 1)


Documentation

GET
Retrieves an individual group account.
Level 3 is required

--

Parameters:

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

Example Request:

  1. {
  2. "method":"GET",
  3. "module":"group.account",
  4. "request":{
  5. "id":"56"
  6. }
  7. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "details":{
  5. "id":"56",
  6. "settings":{
  7. "admin_past_edit":"0",
  8. "book_days_off":"1",
  9. "book_days_off_adv":"1",
  10. "book_days_off_max":"11",
  11. "confirm_trade_before":"1",
  12. "confirm_trade_after":"1",
  13. "sms":"1",
  14. "email":"1",
  15. "pm":"1",
  16. "visible_staff":"1",
  17. "visible_staff_details":"1",
  18. "visible_coworkers":"1",
  19. "trade_shifts":"1",
  20. "coworkers_contacts":"0",
  21. "future_avail":"1",
  22. "weekly_avail":"1",
  23. "visible_overview":"0",
  24. "visible_own":"1",
  25. "timeout":"0",
  26. "message_wall_on":"0",
  27. "message_wall_emp":"0",
  28. "message_wall_comments":"1",
  29. "message_wall_uploads":"1",
  30. "on_now":"0",
  31. "shift_confirm":"1",
  32. "shift_drop":"0",
  33. "shift_autoconfirm":"0",
  34. "timeclock":"1",
  35. "tc_terminal_lock":"1",
  36. "tc_round_to":"-1",
  37. "tc_round_to_in":"-1",
  38. "tc_round_to_out":"-1",
  39. "tc_clock_in_timeframe":"-1",
  40. "tc_autoclockout":"0",
  41. "tc_webcam":"0",
  42. "tc_empl_import":"0",
  43. "tc_empl_addtime":"1",
  44. "24hr":"0",
  45. "draft":"1",
  46. "date":"M j, Y",
  47. "startday":"1",
  48. "currency":"1",
  49. "viewadvance":"-1",
  50. "login_splogo":"1",
  51. "scosting":"3",
  52. "start_day":"1",
  53. "end_day":"7",
  54. "start_time":"0",
  55. "end_time":"0",
  56. "overtime":"40",
  57. "timezone":"-05:00,1"
  58. },
  59. "staff":[
  60. {
  61. "id":"564",
  62. "name":"Alan Ford"
  63. },
  64. {
  65. "id":"5122",
  66. "name":"Bob Rock"
  67. }
  68. ],
  69. "locations":[
  70. {
  71. "id":"0",
  72. "name":"none"
  73. },
  74. {
  75. "id":"477",
  76. "name":"Test"
  77. }
  78. ],
  79. "positions":[
  80. {
  81. "id":"3213",
  82. "name":"Meeting",
  83. "l_name":"null",
  84. "l_id":"null"
  85. }
  86. ]
  87. }
  88. },
  89. "token":"xxxxxxx"
  90. }

---

CREATE
Creates an individual group account.
Level 3 is required

--

Parameters:

  1. "name": accepted //Name (varchar) - min: 3
  2. "administrator": accepted //Administrator (varchar) - min: 3
  3. "password": accepted //Password (varchar) - min: 6
  4. "email": accepted //Email (varchar)
  5. "domain": accepted //Domain (varchar) - min: 3
  6. "clone": accepted //Clone account - by id (integer)
  7. "clone_positions": accepted //Clone positions (enum[0,1])
  8. /* 0: Do not clone positions
  9.   * 1: Clone positions */
  10. "clone_settings": accepted //Clone setings (enum[0,1])
  11. /* 0: Do not clone settings
  12.   * 1: Clone settings */
  13. "clone_training": accepted //Clone training (enum[0,1])
  14. /* 0: Do not clone training
  15.   * 1: Clone training */
  16. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "method":"CREATE",
  3. "module":"group.account",
  4. "request":{
  5. "name":"Group",
  6. "clone_positions":"1",
  7. "clone_settings":"1"
  8. }
  9. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "details":{
  5. "id":"57",
  6. "settings":{
  7. "admin_past_edit":"0",
  8. "book_days_off":"1",
  9. "book_days_off_adv":"1",
  10. "book_days_off_max":"11",
  11. "confirm_trade_before":"1",
  12. "confirm_trade_after":"1",
  13. "sms":"1",
  14. "email":"1",
  15. "pm":"1",
  16. "visible_staff":"1",
  17. "visible_staff_details":"1",
  18. "visible_coworkers":"1",
  19. "trade_shifts":"1",
  20. "coworkers_contacts":"0",
  21. "future_avail":"1",
  22. "weekly_avail":"1",
  23. "visible_overview":"0",
  24. "visible_own":"1",
  25. "timeout":"0",
  26. "message_wall_on":"0",
  27. "message_wall_emp":"0",
  28. "message_wall_comments":"1",
  29. "message_wall_uploads":"1",
  30. "on_now":"0",
  31. "shift_confirm":"1",
  32. "shift_drop":"0",
  33. "shift_autoconfirm":"0",
  34. "timeclock":"1",
  35. "tc_terminal_lock":"1",
  36. "tc_round_to":"-1",
  37. "tc_round_to_in":"-1",
  38. "tc_round_to_out":"-1",
  39. "tc_clock_in_timeframe":"-1",
  40. "tc_autoclockout":"0",
  41. "tc_webcam":"0",
  42. "tc_empl_import":"0",
  43. "tc_empl_addtime":"1",
  44. "24hr":"0",
  45. "draft":"1",
  46. "date":"M j, Y",
  47. "startday":"1",
  48. "currency":"1",
  49. "viewadvance":"-1",
  50. "login_splogo":"1",
  51. "scosting":"3",
  52. "start_day":"1",
  53. "end_day":"7",
  54. "start_time":"0",
  55. "end_time":"0",
  56. "overtime":"40",
  57. "timezone":"-05:00,1"
  58. },
  59. "staff":[
  60. {
  61. "id":"564",
  62. "name":"Alan Ford"
  63. },
  64. {
  65. "id":"5122",
  66. "name":"Bob Rock"
  67. }
  68. ],
  69. "locations":[
  70. {
  71. "id":"0",
  72. "name":"none"
  73. },
  74. {
  75. "id":"477",
  76. "name":"Test"
  77. }
  78. ],
  79. "positions":[
  80. {
  81. "id":"3213",
  82. "name":"Meeting",
  83. "l_name":"null",
  84. "l_id":"null"
  85. }
  86. ]
  87. }
  88. },
  89. "token":"xxxxxxx"
  90. }

---

UPDATE
Updates an individual group account.
Level 3 is required

--

Parameters:

  1. "id": required //Account id (integer)
  2. "name": accepted //Name (varchar) - min: 3
  3. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "method":"UPDATE",
  3. "module":"group.account",
  4. "request":{
  5. "id":"57",
  6. "name":"John Smith"
  7. }
  8. }

Example Response:

  1. {
  2. "method":"GET",
  3. "module":"group.account",
  4. "request":{
  5.  
  6. }
  7. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "details":{
  5. "id":"57",
  6. "settings":{
  7. "admin_past_edit":"0",
  8. "book_days_off":"1",
  9. "book_days_off_adv":"1",
  10. "book_days_off_max":"11",
  11. "confirm_trade_before":"1",
  12. "confirm_trade_after":"1",
  13. "sms":"1",
  14. "email":"1",
  15. "pm":"1",
  16. "visible_staff":"1",
  17. "visible_staff_details":"1",
  18. "visible_coworkers":"1",
  19. "trade_shifts":"1",
  20. "coworkers_contacts":"0",
  21. "future_avail":"1",
  22. "weekly_avail":"1",
  23. "visible_overview":"0",
  24. "visible_own":"1",
  25. "timeout":"0",
  26. "message_wall_on":"0",
  27. "message_wall_emp":"0",
  28. "message_wall_comments":"1",
  29. "message_wall_uploads":"1",
  30. "on_now":"0",
  31. "shift_confirm":"1",
  32. "shift_drop":"0",
  33. "shift_autoconfirm":"0",
  34. "timeclock":"1",
  35. "tc_terminal_lock":"1",
  36. "tc_round_to":"-1",
  37. "tc_round_to_in":"-1",
  38. "tc_round_to_out":"-1",
  39. "tc_clock_in_timeframe":"-1",
  40. "tc_autoclockout":"0",
  41. "tc_webcam":"0",
  42. "tc_empl_import":"0",
  43. "tc_empl_addtime":"1",
  44. "24hr":"0",
  45. "draft":"1",
  46. "date":"M j, Y",
  47. "startday":"1",
  48. "currency":"1",
  49. "viewadvance":"-1",
  50. "login_splogo":"1",
  51. "scosting":"3",
  52. "start_day":"1",
  53. "end_day":"7",
  54. "start_time":"0",
  55. "end_time":"0",
  56. "overtime":"40",
  57. "timezone":"-05:00,1"
  58. },
  59. "staff":[
  60. {
  61. "id":"564",
  62. "name":"Alan Ford"
  63. },
  64. {
  65. "id":"5122",
  66. "name":"Bob Rock"
  67. }
  68. ],
  69. "locations":[
  70. {
  71. "id":"0",
  72. "name":"none"
  73. },
  74. {
  75. "id":"477",
  76. "name":"Test"
  77. }
  78. ],
  79. "positions":[
  80. {
  81. "id":"3213",
  82. "name":"Meeting",
  83. "l_name":"null",
  84. "l_id":"null"
  85. }
  86. ]
  87. }
  88. },
  89. "token":"xxxxxxx"
  90. }

---

DELETE
Deletes an individual group account.
Level 3 is required

--

Parameters:

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

Example Request:

  1. {
  2. "method":"DELETE",
  3. "module":"group.account",
  4. "request":{
  5. "id":"147"
  6. }
  7. }

Example Response:

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