Api doc


SDK's


Api Modules

schedule.tradelist

List of available trades.



Supported Methods:

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


Documentation

GET
Returns a list of all employees and their shifts, which can be traded. You have to specify the traded shift id.
Level 5 is required.

--

Parameters:

  1. "id": required //shift id - Used in database (integer)
  2. "swap": accepted /* (integer) if is empty or 0 response will be
  3.   list of potential acceptors, if is any other
  4.   integer >0 response will be potential acceptors
  5.   with all their shifts, which can be traded. */
  6. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "module":"schedule.tradelist",
  3. "method":"GET",
  4. "request":{
  5. "id":"16211316",
  6. "swap":"1"
  7. }
  8. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "250825":{
  5. "name":"Conrad",
  6. "shifts":{
  7. "15330036":{
  8. "start":"Nov 15, 2012 10:00am",
  9. "end":"Nov 16, 2012 10:00am",
  10. "name":null
  11. },
  12. "15330026":{
  13. "start":"Nov 14, 2012 8:00am",
  14. "end":"Nov 14, 2012 4:00pm",
  15. "name":null
  16. }
  17. }
  18. },
  19. "250828":{
  20. "name":"Fry",
  21. "shifts":{
  22. "15330048":{
  23. "start":"Nov 19, 2012 8:00am",
  24. "end":"Nov 19, 2012 4:00pm",
  25. "name":null
  26. },
  27. "15330052":{
  28. "start":"Nov 20, 2012 8:00am",
  29. "end":"Nov 20, 2012 4:00pm",
  30. "name":null
  31. "15330069":{
  32. "start":"Nov 23, 2012 8:00am",
  33. "end":"Nov 23, 2012 4:00pm",
  34. "name":null
  35. }
  36. }
  37. },
  38. "253877":{
  39. "name":"Hypnotoad",
  40. "shifts":{
  41. "15330073":{
  42. "start":"Nov 24, 2012 8:00am",
  43. "end":"Nov 24, 2012 4:00pm",
  44. "name":null
  45. },
  46. "15330069":{
  47. "start":"Nov 23, 2012 8:00am",
  48. "end":"Nov 23, 2012 4:00pm",
  49. "name":null
  50. }
  51. }
  52. },
  53. "265842":{
  54. "name":"Jhfesgquewg",
  55. "shifts":{
  56. "15329998":{
  57. "start":"Nov 7, 2012 10:00am",
  58. "end":"Nov 8, 2012 2:30am",
  59. "name":null
  60. },
  61. "15330036":{
  62. "start":"Nov 15, 2012 10:00am",
  63. "end":"Nov 16, 2012 10:00am",
  64. "name":null
  65. }
  66. }
  67. },
  68. "250827":{
  69. "name":"Leela",
  70. "shifts":{
  71. "15330018":{
  72. "start":"Nov 12, 2012 10:00am",
  73. "end":"Nov 13, 2012 10:00am",
  74. "name":null
  75. },
  76. "15330061":{
  77. "start":"Nov 21, 2012 10:00am",
  78. "end":"Nov 22, 2012 2:30am",
  79. "name":null
  80. },
  81. "15331064":{
  82. "start":"Nov 28, 2012 10:00am",
  83. "end":"Nov 29, 2012 2:30am",
  84. "name":null
  85. },
  86. "16116934":{
  87. "start":"Nov 9, 2012 4:00pm",
  88. "end":"Nov 9, 2012 6:00pm",
  89. "name":null
  90. }
  91. }
  92. },
  93. "250830":{
  94. "name":"Zoidberg",
  95. "shifts":{
  96. "15330009":{
  97. "start":"Nov 10, 2012 8:00am",
  98. "end":"Nov 10, 2012 4:00pm",
  99. "name":null
  100. },
  101. "15330036":{
  102. "start":"Nov 15, 2012 10:00am",
  103. "end":"Nov 16, 2012 10:00am",
  104. "name":null
  105. }
  106. }
  107. }
  108. },
  109. "token":"xxxxxxx"
  110. }

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