Api doc


SDK's


Api Modules

reports.employee



Supported Methods:

GET
Params
  • token (Required): valid token
  • start_date (Required): date
  • end_date (Required): date
  • type (Required): enum (attendance, vacations, availability, unavailability, hourly-availability, vacation-summary)
  • location: integer
  • schedule: varchar
  • employee: varchar
  • skill: varchar
  • fm: integer
  • remote_site: integer
  • leave_type: integer


Documentation

GET
Retrieves a list of employee's reports.
Level 5 is required

--

Parameters:

  1. "start_date": required //Start date (date)
  2. "end_date": required //End date (date)
  3. "type": required //Report type (enum[attendance, vacations, availability,
  4. // unavailability])
  5. /* attendance: Attendance report
  6.   * vacations: Vacations report
  7.   * availability: Availability report
  8.   * unavailability: Unavailability report */
  9. "location": accepted //Location id (integer)
  10. "schedule": accepted //Schedule id (integer)
  11. "employee": accepted //Employee id (varchar)
  12. /* Array of employees ids (eg. "234,563,770") */
  13. "skill": accepted //Skill id (integer)
  14. "fm": accepted /*Force mater database (integer)
  15.   *0: do not force master
  16.   *1: force master
  17.   *Results will be the same with or without this param
  18.   *The difference is that it forces data writing into
  19.   *the master database before slave database*/
  20.  
  21. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "method":"GET",
  3. "module":"reports.employee",
  4. "request":{
  5. "start_date":"Dec 15, 2012",
  6. "end_date":"Dec 16, 2012",
  7. "type":"availability",
  8. "employee": 250832
  9. }
  10. }

Example Response:

  1. {
  2.    "status":1,
  3.    "data":{
  4.       "statuses":{
  5.          "1":"All Day",
  6.          "2":"Available",
  7.          "3":"On Vacation",
  8.          "4":"Not Available"
  9.       },
  10.       "dates":[
  11.          {
  12.             "id":1326,
  13.             "date":{
  14.                "id":1326,
  15.                "month":12,
  16.                "day":15,
  17.                "wday":6,
  18.                "year":2012,
  19.                "weekday":"Sat",
  20.                "mname":"Dec",
  21.                "week":51,
  22.                "dayid":7,
  23.                "timeid":1,
  24.                "formatted":"Dec 15, 2012",
  25.                "time":"00:00",
  26.                "timestamp":1355526000,
  27.                "hours":0,
  28.                "minutes":0,
  29.                "seconds":0,
  30.                "date":"2012-12-15 00:00:00",
  31.                "day_of_year":"349",
  32.                "sp_wday":7
  33.             },
  34.             "formatted":"Dec 15, 2012"
  35.          },
  36.          {
  37.             "id":1327,
  38.             "date":{
  39.                "id":1327,
  40.                "month":12,
  41.                "day":16,
  42.                "wday":0,
  43.                "year":2012,
  44.                "weekday":"Sun",
  45.                "mname":"Dec",
  46.                "week":51,
  47.                "dayid":1,
  48.                "timeid":1,
  49.                "formatted":"Dec 16, 2012",
  50.                "time":"00:00",
  51.                "timestamp":1355612400,
  52.                "hours":0,
  53.                "minutes":0,
  54.                "seconds":0,
  55.                "date":"2012-12-16 00:00:00",
  56.                "day_of_year":"350",
  57.                "sp_wday":1
  58.             },
  59.             "formatted":"Dec 16, 2012"
  60.          }
  61.       ],
  62.       "users":[
  63.       ]
  64.    },
  65.    "token":"xxxxxxx"
  66. }

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