ProRoster - Get employee broken rules
API Url
Use it for returning all the broken/warning work rules for an employee in a period of time.
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}/employees/{empId}/broken-rules
Permissions: user
Path parameters
| Field | Type | Description |
|---|---|---|
| empId | String | Employee's ID. |
| id | Number | The plan unique identifier. |
Query parameters
| Field | Type | Description |
|---|---|---|
fromoptional | Date | Start date of period. Default is TODAY. |
ruleIdoptional | String | List of rules to check (Comma separated list with the WorkRules Ids). |
tooptional | Date | End date of period. Default is TODAY. |
typeoptional | String | List of Workrule types to check: 1. Minimum hours of daily rest 2. Minimum weekly consecutive rest hours 3. Maximum daily work hours 4. Maximum weekly work hours 5. Maximum average daily work hours in a period 6. Maximum average weekly work hours in a period 7. Maximum hours in a period 8. Maximum hours in a calendar month 9. Maximum hours in a calendar year |
Success 200
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data. |
| empBrokenRules | Object[] | |
| calculatedValue | Number | The total attendance time value. |
| date | Date | The day which is checked for broken work rules. |
| description | String | The description of the work rule. |
| empId | String | The id of the employee. |
| empName | String | The employee fullname. |
| empNo | String | The employee number. |
| isBroken | Boolean | TRUE = the work rule is broken. FALSE = warning. |
| maxRule | Boolean | Determines if this rule is a maximum or not. |
| ruleValue | Number | Minimum or Maximum hours this rule is valid for. |
| warnValue | Number | Minimum or Maximum hours this rule is creating a warning for. |
| workRuleId | String | The work rule id. |
messageoptional | Object | Object containing response messages. |
| code | Number | Message code. |
| text | String | Message text. |
| type | String | Type of message. "warning""info" |
Success example:
HTTP/1.1 200 OK{"response": {"data": {"brokenRules": [{"empId": "1000","empNo": "RLI","empName": "Robert Lewandowski","date": "2018-11-25","workRuleId": "40HOURWORK","description": "Max 40 hour work a week","calculatedValue": 24,"ruleValue": 39,"warnValue": 15,"maxRule": true,"isBroken": false}]},"errorCode": 0,"errorMessage": ""}}
Error 4xx
| Field | Type | Description |
|---|---|---|
| response | Object | Main object containing the response data. |
| data | Object | Object containing the requested data (empty). |
| errorCode | Number | Error code. |
| errorMessage | String | Error description. |