Api doc


SDK's


Api Modules

availability.approve

Request employee availability approval



Supported Methods:

GET
Params
  • token (Required): valid token
  • type (Required): enum (future, weekly)
  • user: integer


UPDATE
Params
  • token (Required): valid token
  • user (Required): integer
  • type (Required): enum (future, weekly)
  • action (Required): enum (approve, reject)
  • start_time: time
  • end_time: time
  • day: enum (1, 2, 3, 4, 5, 6, 7)
  • start_date: date
  • id: integer


CREATE
Params
  • token (Required): valid token
  • comment: varchar
  • user: integer


Documentation

GET
Request employee availability approval.
Level 3 is required.

--

Parameters:

  1. "type": required //Type (enum[future,weekly])
  2. /* future: Future availability
  3.   * weekly: Weekly availability */
  4. "user": accepted //User id (integer)
  5. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "method":"GET",
  3. "module":"availability.approve",
  4. "request":{
  5. "type":"future"
  6. }
  7. }

Example Response:

  1. {
  2. "status":1,
  3. "data":[
  4. {
  5. "id":"29",
  6. "user":"1054",
  7. "date":"1341388817",
  8. "name":"Dylan D."
  9. },
  10. {
  11. "id":"35",
  12. "user":"3984",
  13. "date":"1341388818",
  14. "name":"Alan F."
  15. },
  16. {
  17. "id":"47",
  18. "user":"3012",
  19. "date":"1341388819",
  20. "name":"Peter G."
  21. }
  22. ],
  23. "token":"xxxxxxx"
  24. }

---

CREATE
Create future availability that needs approval.
Level 5 is required (all users can fetch this module)

--

Parameters:

  1. "start_date": required //Start date (date)
  2. "user": accepted //User id (integer)
  3. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "method":"CREATE",
  3. "module":"availability.approve",
  4. "request":{
  5. "user":52,
  6. "start_date":"27-07-2012"
  7. }
  8. }

Example Response:

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

---

UPDATE
Update future availability.
Level 3 is required.

--

Parameters:

  1. "user": required //User id (integer)
  2. "type": required //Type (enum[future,weekly])
  3. /* future: Future availability
  4.   * weekly: Weekly availability */
  5. "action": required //Action (enum[approve,reject])
  6. /* approve: Approve availability
  7.   * reject: Reject availability */
  8. "start_time": accepted //Start time (time)
  9. "end_time": accepted //End time (time)
  10. "day": accepted //Day of the week (enum[1,2,3,4,5,6,7])
  11. /* 1: Sunday
  12.   * 2: Monday
  13.   * 3: Tuesday
  14.   * 4: Wednesday
  15.   * 5: Thursday
  16.   * 6: Friday
  17.   * 7: Saturday */
  18. "start_date": accepted //Start date (date)

Example Request:

  1. {
  2. "method":"UPDATE",
  3. "module":"availability.approve",
  4. "request":{
  5. "user":52,
  6. "type":"future",
  7. "action":"approve"
  8. }
  9. }

Example Response:

  1. {
  2. "status":1,
  3. "data":"Availability Approved",
  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