Response Structure
Top-Level Fields
Unique identifier for the solve job.
Job status:
QUEUED, SOLVING, or SOLVED.List of employee-shift pairings. See Assignment.
List of shift names that could not be filled.
List of constraint violations. See ViolatedConstraint.
Alternative assignments from suggest API. See Suggestion.
Score
The score indicates solution quality using a three-tier system.Hard constraint violations. Must be
0 for a feasible solution.Medium constraint violations. Less critical than hard constraints.
Soft constraint penalties. Used to optimize solution quality.
true if hardScore is 0. Indicates all hard constraints are satisfied.Score Interpretation
| Hard Score | Feasible | Meaning |
|---|---|---|
0 | true | All hard constraints satisfied |
-1 or lower | false | One or more hard constraint violations |
A negative soft score is normal and expected. The solver minimizes soft score violations while keeping hard constraints satisfied.
Assignment
Each assignment represents an employee assigned to a shift.Shift identifier from the request.
Shift start time.
Shift end time.
Skills required for this shift.
Assigned employee name.
Travel time from employee location to shift location (if locations provided).
Example Assignment List
ViolatedConstraint
Details about constraints that were violated in the solution.Constraint identifier.
Violation magnitude. Higher values indicate larger deviations.
Constraint level:
HARD, MEDIUM, or SOFT.Suggestion
Alternative assignment options returned by the suggest API.Shift being evaluated.
Suggested employee.
Impact on solution score if this assignment is made.
Constraints violated by this suggestion.
Weights Reference
Available constraint weights for customization in requests.| Constraint | Property | Default | Description |
|---|---|---|---|
| Maximum Working Days | maxWorkingDays | HARD | Max days in planning period |
| Maximum Hours | maxHours | HARD | Max hours in planning period |
| Minimum Hours | minHours | HARD | Min hours in planning period |
| Earliest Shift Start | shiftStart | HARD | Earliest allowed start time |
| Latest Shift Start | latestShiftStart | HARD | Latest allowed start time |
| Latest Shift End | shiftEnd | HARD | Latest allowed end time |
| Maximum Shift Length | maxShift | HARD | Max shift duration |
| Minimum Shift Length | minShift | HARD | Min shift duration |
| DayOfWeek Working | dayOfWeek | HARD | Day-based availability |
| Maximum Shifts Same Day | sameDay | HARD | Max shifts per day |
| Minimum Rest Same Day | sameDayMinRest | HARD | Min rest between same-day shifts |
| Employee Availability | availability | HARD | Time-based availability |
| Locked Assignment | locked | HARD | Fixed assignments |
| Max Consecutive Days | maxConsecutive | HARD | Max consecutive working days |
| Minimum Rest | minRest | HARD | Min rest between shifts |
| No Concurrent | concurrent | HARD | Prevent overlapping assignments |
| Skill Requirements | requirements | HARD | Shared skill requirements |
| Employee Skill Match | skills | HARD | Skill matching |
| Shift Blocklist | blacklist | HARD | Blocked employee-shift pairs |
| Employee Working Days | working | HARD | Respect working day limits |
| Travel Time | distance | SOFT | Minimize travel |
| Priority | priority | SOFT | Shift priorities |
| Shift Preference | pref | MEDIUM | Employee preferences |
| Financial Costs | costs | SOFT | Shift costs |
| Wage Costs | wages | SOFT | Employee wage costs |
| Unassigned Employee | unassigned | MEDIUM | Minimize unassigned employees |
| Soft Skill Match | softSkills | SOFT | Soft skill matching |
| Critical Skill Match | criticalSkills | SOFT | Critical shift preference |
| Efficiency | efficiency | SOFT | Employee efficiency |
| Skill Level Match | softSkillsLevel | SOFT | Skill proficiency matching |
Custom Weight Format
Override defaults using the format<weight><priority>: