Api doc


SDK's


Api Modules

schedule.vacations

Returns a list of vacations.



Supported Methods:

GET
Params
  • token (Required): valid token
  • start_date: date
  • end_date: date
  • mode: enum (manage, requested, upcoming, all_requested)
  • user_id: integer
  • sortby: enum (employee_start, vacation_start)
  • deleted: integer
  • force_user_timezone: enum (0, 1)
  • location: integer
  • position: integer


Documentation

GET
Retrieves a list of vacations.
Level 5 is required

--

Parameters:

  1. "start_date": accepted //Start date (date)
  2. "end_date": accepted //End date (date)
  3. "mode": accepted //Mode (enum[manage,requested,upcoming])
  4. /* manage: Manage vacations
  5.   * requested: Requested vacations
  6.   * upcoming: Upcoming vacations */
  7. "user_id": accepted //Employee id (integer)
  8. "sortby": accepted /*Sort by (enum [employee_start, vacation_start])
  9.   *employee_start - Employee start date
  10.   *vacation_start - Vacation start day */
  11. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"schedule.vacations",
  3. "method":"GET",
  4. "request":{
  5. "start_day":"May 10,2012",
  6. "end_date":"May 15, 2012",
  7. "mode":"manage"
  8. }
  9. }

Example Response:

  1. {
  2. "status":1,
  3. "data":[
  4. {
  5. "id":"249",
  6. "store":"11",
  7. "date":"1336609553",
  8. "requested_on":{
  9. "id":"1107",
  10. "month":"5",
  11. "day":"10",
  12. "year":"2012",
  13. "weekday":"Thu",
  14. "mname":"May",
  15. "week":"19",
  16. "dayid":5,
  17. "formatted":"May 10, 2012"
  18. },
  19. "approved_on":"1336609556",
  20. "status":"1",
  21. "admin":"2",
  22. "comments":"",
  23. "notes":"",
  24. "start_day":{
  25. "id":"1110",
  26. "month":"5",
  27. "day":"13",
  28. "year":"2012",
  29. "weekday":"Sun",
  30. "mname":"May",
  31. "week":"19",
  32. "dayid":1,
  33. "formatted":"May 13, 2012"
  34. },
  35. "end_day":{
  36. "id":"1116",
  37. "month":"5",
  38. "day":"19",
  39. "year":"2012",
  40. "weekday":"Sat",
  41. "mname":"May",
  42. "week":"20",
  43. "dayid":7,
  44. "formatted":"May 19, 2012"
  45. },
  46. "employee":"5112",
  47. "employee_name":"Vikodin Ovisnic",
  48. "total_days":6
  49. },
  50. {
  51. "id":"250",
  52. "store":"11",
  53. "date":"1336610951",
  54. "requested_on":{
  55. "id":"1107",
  56. "month":"5",
  57. "day":"10",
  58. "year":"2012",
  59. "weekday":"Thu",
  60. "mname":"May",
  61. "week":"19",
  62. "dayid":5,
  63. "formatted":"May 10, 2012"
  64. },
  65. "approved_on":"1336611136",
  66. "status":"1",
  67. "admin":"2",
  68. "comments":"test",
  69. "notes":"",
  70. "start_day":{
  71. "id":"1111",
  72. "month":"5",
  73. "day":"14",
  74. "year":"2012",
  75. "weekday":"Mon",
  76. "mname":"May",
  77. "week":"20",
  78. "dayid":2,
  79. "formatted":"May 14, 2012"
  80. },
  81. "end_day":{
  82. "id":"1111",
  83. "month":"5",
  84. "day":"14",
  85. "year":"2012",
  86. "weekday":"Mon",
  87. "mname":"May",
  88. "week":"20",
  89. "dayid":2,
  90. "formatted":"May 14, 2012"
  91. },
  92. "employee":"5118",
  93. "employee_name":"Ian-SP22",
  94. "total_days":0
  95. },
  96. {
  97. "id":"266",
  98. "store":"11",
  99. "date":"1336655769",
  100. "requested_on":{
  101. "id":"1107",
  102. "month":"5",
  103. "day":"10",
  104. "year":"2012",
  105. "weekday":"Thu",
  106. "mname":"May",
  107. "week":"19",
  108. "dayid":5,
  109. "formatted":"May 10, 2012"
  110. },
  111. "approved_on":"1336656213",
  112. "status":"1",
  113. "admin":"2",
  114. "comments":"",
  115. "notes":"",
  116. "start_day":{
  117. "id":"1111",
  118. "month":"5",
  119. "day":"14",
  120. "year":"2012",
  121. "weekday":"Mon",
  122. "mname":"May",
  123. "week":"20",
  124. "dayid":2,
  125. "formatted":"May 14, 2012"
  126. },
  127. "end_day":{
  128. "id":"1111",
  129. "month":"5",
  130. "day":"14",
  131. "year":"2012",
  132. "weekday":"Mon",
  133. "mname":"May",
  134. "week":"20",
  135. "dayid":2,
  136. "formatted":"May 14, 2012"
  137. },
  138. "employee":"1064",
  139. "employee_name":"1338891764_Alicia M.",
  140. "total_days":0
  141. },
  142. {
  143. "id":"239",
  144. "store":"11",
  145. "date":"1336341769",
  146. "requested_on":{
  147. "id":"1104",
  148. "month":"5",
  149. "day":"7",
  150. "year":"2012",
  151. "weekday":"Mon",
  152. "mname":"May",
  153. "week":"19",
  154. "dayid":2,
  155. "formatted":"May 7, 2012"
  156. },
  157. "approved_on":"1336341774",
  158. "status":"1",
  159. "admin":"2",
  160. "comments":"",
  161. "notes":"",
  162. "start_day":{
  163. "id":"1112",
  164. "month":"5",
  165. "day":"15",
  166. "year":"2012",
  167. "weekday":"Tue",
  168. "mname":"May",
  169. "week":"20",
  170. "dayid":3,
  171. "formatted":"May 15, 2012"
  172. },
  173. "end_day":{
  174. "id":"1112",
  175. "month":"5",
  176. "day":"15",
  177. "year":"2012",
  178. "weekday":"Tue",
  179. "mname":"May",
  180. "week":"20",
  181. "dayid":3,
  182. "formatted":"May 15, 2012"
  183. },
  184. "employee":"4949",
  185. "employee_name":"Eric Owens",
  186. "total_days":0
  187. },
  188. {
  189. "id":"247",
  190. "store":"11",
  191. "date":"1336346341",
  192. "requested_on":{
  193. "id":"1104",
  194. "month":"5",
  195. "day":"7",
  196. "year":"2012",
  197. "weekday":"Mon",
  198. "mname":"May",
  199. "week":"19",
  200. "dayid":2,
  201. "formatted":"May 7, 2012"
  202. },
  203. "approved_on":"1336611139",
  204. "status":"1",
  205. "admin":"0",
  206. "comments":"Deleted employee test",
  207. "notes":"",
  208. "start_day":{
  209. "id":"1112",
  210. "month":"5",
  211. "day":"15",
  212. "year":"2012",
  213. "weekday":"Tue",
  214. "mname":"May",
  215. "week":"20",
  216. "dayid":3,
  217. "formatted":"May 15, 2012"
  218. },
  219. "end_day":{
  220. "id":"1112",
  221. "month":"5",
  222. "day":"15",
  223. "year":"2012",
  224. "weekday":"Tue",
  225. "mname":"May",
  226. "week":"20",
  227. "dayid":3,
  228. "formatted":"May 15, 2012"
  229. },
  230. "employee":"5143",
  231. "employee_name":"1336346233_BB Tester",
  232. "total_days":0
  233. },
  234. {
  235. "id":"251",
  236. "store":"11",
  237. "date":"1336611264",
  238. "requested_on":{
  239. "id":"1107",
  240. "month":"5",
  241. "day":"10",
  242. "year":"2012",
  243. "weekday":"Thu",
  244. "mname":"May",
  245. "week":"19",
  246. "dayid":5,
  247. "formatted":"May 10, 2012"
  248. },
  249. "approved_on":"1336611267",
  250. "status":"1",
  251. "admin":"2",
  252. "comments":"ss",
  253. "notes":"",
  254. "start_day":{
  255. "id":"1112",
  256. "month":"5",
  257. "day":"15",
  258. "year":"2012",
  259. "weekday":"Tue",
  260. "mname":"May",
  261. "week":"20",
  262. "dayid":3,
  263. "formatted":"May 15, 2012"
  264. },
  265. "end_day":{
  266. "id":"1112",
  267. "month":"5",
  268. "day":"15",
  269. "year":"2012",
  270. "weekday":"Tue",
  271. "mname":"May",
  272. "week":"20",
  273. "dayid":3,
  274. "formatted":"May 15, 2012"
  275. },
  276. "employee":"5118",
  277. "employee_name":"Ian-SP22",
  278. "total_days":0
  279. }
  280. ],
  281. "token":"xxxxxxx"
  282. }