staff.position

SUPPORTED METHODS:

GET

ParametersTypeDescription
token (required)Valid token
employee_id (required)integerUnique employee id
position_id (required)integerUnique position id

CREATE

ParametersTypeDescription
token (required)Valid token
employee_id (required)integerEmployee id
position_id (required)integerPosition id
payroll_ratecard_id (accepted)varcharThe unique ratecard ID
payroll_wage (accepted)varcharWage

UPDATE

ParametersTypeDescription
token (required)Valid token
employee_id (required)varcharUnique employee id
postition_id (required)varcharUnique position id
payroll_ratecard_id (accepted)varcharThe unique ratecard ID
payroll_wage (accepted)varcharWage

DELETE

ParametersTypeDescription
token (required)Valid token
employee_id (required)varcharUnique employee id
position_id (required)varcharUnique position id

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.

--

Example Request:

{
   "method":"GET",
   "module":"staff.position",
   "request":{
      "token":"xxxx",
      "employee_id":"2982006",
      "position_id":"1411080"
   }
}

Example Response:

{
   "status":1,
   "data":{
      "id":37946718,
      "employee_id":2982006,
      "position_id":1411080,
      "created_by":2829173,
      "date":1478614186,
      "payroll_ratecard_id":null,
      "payroll_wage":null
   },
   "token":"xxx"
}

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:

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

"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

"code":40008,"message":"Employee is already on that position." //Employee is already assigned to that position

Example Request:

{
 "method":"CREATE",
  "module":"staff.position",
  "request":{
   "token":"xxxx",
   "employee_id":"2982006",
   "position_id":"1419221"
}

Example Response:

{
   "status":1,
   "data":{
      "id":39658818,
      "employee_id":2982006,
      "position_id":1419221,
      "created_by":2829173,
      "date":1491569462,
      "payroll_ratecard_id":null,
      "payroll_wage":null
   },
   "token":"xxxx"
}

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.

Example Request:

{
   "method":"DELETE",
   "module":"staff.position",
   "token":"xxxxxxx",
   "employee_id":"2982006",
   "position_id":"1419221"
}

Example Response:

{
   "status":1,
   "data":{
      "id":39658818,
      "employee_id":2982006,
      "position_id":1419221,
      "created_by":2829173,
      "date":1491569462,
      "payroll_ratecard_id":0,
      "payroll_wage":null
   },
   "token":"xxxx"
}