Api doc


SDK's


Api Modules

staff.position



Supported Methods:

GET
Params
  • token (Required): valid token
  • employee_id (Required): varchar
  • position_id (Required): varchar


CREATE
Params
  • token (Required): valid token
  • employee_id (Required): varchar
  • position_id (Required): varchar
  • payroll_ratecard_id: varchar
  • payroll_wage: varchar


UPDATE
Params
  • token (Required): valid token
  • employee_id (Required): varchar
  • position_id (Required): varchar
  • payroll_ratecard_id: varchar
  • payroll_wage: varchar


DELETE
Params
  • token (Required): valid token
  • employee_id (Required): varchar
  • position_id (Required): varchar


Documentation

staff.postion and staff.positions module return payroll_ratecard_id and payroll_wage as null

In Humanity, individual work schedules are labeled by ‘Positions’ that are grouped by ‘Locations'. For more about Positions and Locations please visit our Help Center.

GET

The staff.position module lists the specific position that is assigned to a specific employee and his/hers payroll information(payroll wage and the ratecard id). Level 5 is required in order to fetch this data meaning that even employees within your store will be able to use this module.

--

Parameters:

  1. "employee_id": required //Unique employee id (integer)
  2. "postion_id": required //Unique position id(integer)
  3. "token": "xxxxxxx" //Valid token is required

You can read here how to get your token.

Example Request:

  1. {
  2. "method":"GET",
  3. "module":"staff.position",
  4. "request":{
  5. "token":"xxxx",
  6. "employee_id":"2982006",
  7. "position_id":"1411080"
  8. }
  9. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":37946718,
  5. "employee_id":2982006,
  6. "position_id":1411080,
  7. "created_by":2829173,
  8. "date":1478614186,
  9. "payroll_ratecard_id":null,
  10. "payroll_wage":null
  11. },
  12. "token":"xxx"
  13. }

CREATE

Using CREATE with staff.position you can assign positions, ratecards and wages for your employees. The ratecard, position and employee need to be already created in your store and you need to have level 3 (manager account) in order to use CREATE.

Error messages:

  1. Authentication Failed - You do not have permissions to access the service","error":"Incorrect Access group_id Permissions. ref:position > 3 - 5 - - null" //A regular employee with level 5 attempted to use CREATE where level 3 is required
  2. ------
  3. "code":400010, "message":"Employee is not a part of this company." //The employee ID used doesn't belong to any employees in the store. Similar response is when the position ID or ratecard id isn't present in the store
  4. ------
  5. "code":40008,"message":"Employee is already on that position." //Employee is already assigned to that position

Parameters:

  1. "employee_id": required //Unique employee id (integer)
  2. "postion_id": required //Unique position id(integer)
  3. "payroll_ratecard_id" :accepted //The unique ratecard ID
  4. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "method":"CREATE",
  3. "module":"staff.position",
  4. "request":{
  5. "token":"xxxx",
  6. "employee_id":"2982006",
  7. "position_id":"1419221"
  8. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":39658818,
  5. "employee_id":2982006,
  6. "position_id":1419221,
  7. "created_by":2829173,
  8. "date":1491569462,
  9. "payroll_ratecard_id":null,
  10. "payroll_wage":null
  11. },
  12. "token":"xxxx"
  13. }

DELETE

Using DELETE with staff.position will unassigne a position from the employee whos ID you've passed. DELETE can't be used to remove rate card.

Parameters:

  1. "employee_id": required //Unique employee id (integer)
  2. "postion_id": required //Unique position id(integer)
  3. "token": "xxxxxxx" //Valid token is required

Example Request:

  1. {
  2. "method":"DELETE",
  3. "module":"staff.position",
  4. "token":"f7b465240c627aca9c8003b9211f9395ce3ce6cf",
  5. "employee_id":"2982006",
  6. "position_id":"1419221"
  7. }

Example Response:

  1. {
  2. "status":1,
  3. "data":{
  4. "id":39658818,
  5. "employee_id":2982006,
  6. "position_id":1419221,
  7. "created_by":2829173,
  8. "date":1491569462,
  9. "payroll_ratecard_id":0,
  10. "payroll_wage":null
  11. },
  12. "token":"xxxx"
  13. }