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.

GET
http://localhost:16010/ProMarkREST/rest/ProRoster/plans/{id}/employees/{empId}/broken-rules

Permissions: user

Path parameters

FieldTypeDescription
empIdString

Employee's ID.

idNumber

The plan unique identifier.

Query parameters

FieldTypeDescription
fromoptionalDate

Start date of period. Default is TODAY.

ruleIdoptionalString

List of rules to check (Comma separated list with the WorkRules Ids).

tooptionalDate

End date of period. Default is TODAY.

typeoptionalString

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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data.

    empBrokenRulesObject[]
      calculatedValueNumber

The total attendance time value.

      dateDate

The day which is checked for broken work rules.

      descriptionString

The description of the work rule.

      empIdString

The id of the employee.

      empNameString

The employee fullname.

      empNoString

The employee number.

      isBrokenBoolean

TRUE = the work rule is broken. FALSE = warning.

      maxRuleBoolean

Determines if this rule is a maximum or not.

      ruleValueNumber

Minimum or Maximum hours this rule is valid for.

      warnValueNumber

Minimum or Maximum hours this rule is creating a warning for.

      workRuleIdString

The work rule id.

  messageoptionalObject

Object containing response messages.

    codeNumber

Message code.

    textString

Message text.

    typeString

Type of message.

Allowed values:"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

FieldTypeDescription
responseObject

Main object containing the response data.

  dataObject

Object containing the requested data (empty).

  errorCodeNumber

Error code.

  errorMessageString

Error description.