Api doc


SDK's


Api Modules

staff.login



Supported Methods:

GET
Params
  • username (Required): varchar
  • password (Required): varchar
  • remember: enum (1)
  • log_data: varchar


Documentation

GET
Sends user login information. Returns status, data and token.

--

Parameters:

  1. "username": required //Staff member username (varchar)
  2. "password": required //Staff member password (varchar)
  3. "remember": accepted //Remember (enum[1])
  4. /* 1: Remember user */

Example Request:

  1. {
  2. "module":"staff.login",
  3. "method":"GET",
  4. "request":{
  5. "username":"ryan@humanity.com",
  6. "password":"nicetry"
  7. }
  8. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "employee":{
  5. "id":"1",
  6. "eid":"357",
  7. "name":"John Smith",
  8. "username":"jsmith",
  9. "email":"jsmith@humanity.com",
  10. "group":"5",
  11. "status":"1",
  12. "wage":"780",
  13. "nick_name":"Johnny",
  14. "birth_day":"2",
  15. "birth_month":"8",
  16. "cell_phone":"38166-992-768",
  17. "home_phone":"38131-564-958",
  18. "avatar":{
  19. "small":"http:\/\/cdn.humanity.com\/image1.jpg",
  20. "medium":"http:\/\/cdn.humanity.com\/image2.jpg",
  21. "large":"http:\/\/cdn.humanity.com\/image3.jpg"
  22. },
  23. "address":"Calle 39 No 1540 ",
  24. "city":"Belgrade",
  25. "state":"Serbia",
  26. "zip":"11000",
  27. "notes":"Custom note",
  28. "ical":"http:\/\/www.humanity.com\/efc46ba6c.ics",
  29. "timezone":"-05:00,0",
  30. "timezone_name":"America\/Bogota",
  31. "group_name":"Employee",
  32. "status_name":"Activated",
  33. "schedules":{
  34. "46351":"Office"
  35. }
  36. },
  37. "business":{
  38. "name":"ShiftPlanning Inc.",
  39. "address":"Panama City, Panama",
  40. "phone":"888-973-6030",
  41. "fax":"888-973-6030"
  42. }
  43. },
  44. "token":"xxxxxxx"
  45. }