Query constraints by employee
This endpoint returns all constraints applied to an employee.
GET /api/v2/businesses/{businessId}/services/{serviceId}/people/{employeeId}/constraints
If the data included in the request is correct —businessId, serviceId and employeeId—, the response will contain the list of constraints that apply to the employee, whether related to their contract or to the regulation defined at the node level.
Response example
[
{
"id": "constraint.weekly_rested_assignable_limit",
"parameters": {
"min": 3,
"notProportional": "false",
"max": 3
},
"blocking": false,
"from": "2026-04-28",
"canceled": false,
"constraintGroup": "Contract"
},
{
"id": "constraint.max_consecutive_worked_days",
"parameters": {
"max": 6,
"min": 1
},
"blocking": false,
"from": "2021-03-11",
"canceled": false,
"constraintGroup": "Regulation"
}
]
Details
-
id: unique identifier of the constraint in the system.
-
parameters: object that groups the configurable values specific to each constraint. The set of keys, their data types, and validation rules are defined independently for each constraint type.
-
blocking: indicates whether the constraint is blocking (
true) or not (false). -
from: date from which the constraint is active, in
yyyy-MM-ddformat. -
canceled: indicates whether the constraint has been canceled (
true) or is still active (false). -
constraintGroup: origin of the constraint. The possible values are:
-
Regulation: the constraint comes from a regulation defined at the node level. -
Contract: the constraint comes from an employee’s contract. -
RecruitmentPlanContract: the constraint comes from a simulated contract within the recruitment plan.
-
As can be seen in the example, the response will depend on the constraints the employee has and how their parameters have been defined.
Considerations
If the service identifier specified in the URL does not exist in the business, the request will return a 404 Not Found error indicating not exists.
If the employee identifier specified in the URL does not exist, the request will return an error.
|
The response returns the constraints in a format compatible with the |
Useful links
What is a constraint?
What is a contract? And a contract type?