Will trigger the solver run.
curl --request POST \
--url https://api.solvice.io/v2/fill/solve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"employees": [
{
"name": "<string>",
"home": {
"lat": 123,
"lon": 123
},
"availability": [
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"location": {
"lat": 123,
"lon": 123
}
}
],
"preference": [
"<string>"
],
"skills": [
{
"name": "<string>",
"expiry": "2022-03-10",
"weight": 123,
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
}
}
],
"hourlyPay": 123,
"efficiency": 123,
"periodRules": [
{
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
},
"maxWorkingDays": 123,
"minWorkingDays": 123,
"minWorkingDuration": "<string>",
"maxWorkingDuration": "<string>",
"minRestDurationBetweenShiftsSameDay": "<string>",
"minRestDuration": "<string>",
"maxShiftLength": "<string>",
"minShiftLength": "<string>",
"latestShiftStart": "<string>",
"earliestShiftStart": "<string>",
"latestShiftEnd": "<string>",
"minWeekendsIdle": 123,
"maxWeekendsIdle": 123
}
],
"constracts": [
{
"name": "<string>",
"max": "<string>",
"min": "<string>",
"maxConsecutiveWorkDays": 123,
"maxShiftsDay": 123,
"minRestBetweenShiftsSameDay": 123,
"minRest": "<string>",
"maxWorkingDays": 123,
"maxShiftLength": "<string>",
"minShiftLength": "<string>",
"latestShiftStart": "<string>",
"earliestShiftStart": "<string>",
"latestShiftEnd": "<string>"
}
]
}
],
"shifts": [
{
"name": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"min": 123,
"max": 123,
"tags": [
{
"name": "<string>"
}
],
"skills": [
{
"name": "<string>",
"hard": true,
"weight": 123
}
],
"priority": 123,
"cost": 123,
"rests": [
{
"periodType": "DAILY",
"tags": [
"<string>"
],
"excludes": [
"<string>"
],
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
},
"min": "<string>",
"minConsecutive": "<string>",
"max": "<string>",
"frequency": 123,
"sequence": "BEFORE"
}
],
"blocklist": [
"<string>"
],
"value": 123,
"employees": [
"<string>"
],
"locked": [
true
],
"location": {
"lat": 123,
"lon": 123
}
}
],
"rules": [
{
"constraint": "COUNTER",
"type": "HOURS_WORKED",
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
},
"min": 123,
"max": 123,
"shifts": [
"<string>"
],
"then": {}
}
],
"rests": [
{
"periodType": "DAILY",
"tags": [
"<string>"
],
"excludes": [
"<string>"
],
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
},
"min": "<string>",
"minConsecutive": "<string>",
"max": "<string>",
"frequency": 123,
"sequence": "BEFORE"
}
],
"demands": [
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"skills": [
{
"name": "<string>",
"hard": true,
"weight": 123
}
],
"name": "<string>",
"min": 123,
"max": 123
}
],
"patterns": [
{
"type": "SINGLE_DAY",
"satisfy": "PREFERRED",
"elements": [
{
"type": "ON",
"tags": [
"<string>"
]
}
],
"weight": 123
}
],
"fairnessBuckets": [
{
"employees": [
"<string>"
],
"shifts": [
"<string>"
],
"target": "<string>",
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
}
}
],
"requirements": [
{
"shifts": [
"<string>"
],
"skill": "<string>",
"value": 123
}
],
"assignments": [
{
"shift": "<string>",
"employee": "<string>",
"locked": true
}
],
"weights": {
"unassigned": "<string>",
"maxWorkingDays": "<string>",
"concurrent": "<string>",
"sameDay": "<string>",
"minRest": "<string>",
"maxConsecutive": "<string>",
"working": "<string>",
"sameDayMinRest": "<string>",
"minHours": "<string>",
"minHoursUnassigned": "<string>",
"maxHours": "<string>",
"minShift": "<string>",
"maxShift": "<string>",
"shiftStart": "<string>",
"latestShiftStart": "<string>",
"shiftEnd": "<string>",
"dayOfWeek": "<string>",
"requirements": "<string>",
"availability": "<string>",
"skills": "<string>",
"criticalSkills": "<string>",
"locked": "<string>",
"blacklist": "<string>",
"pref": "<string>",
"costs": "<string>",
"wages": "<string>",
"efficiency": "<string>",
"distance": "<string>",
"distanceAL": "<string>",
"priority": "<string>",
"softSkills": "<string>",
"softSkillsLevel": "<string>",
"fairness": "<string>"
},
"options": {
"hardAvailability": true,
"hardSkill": true,
"hardBlacklist": true,
"partialPlanning": true,
"penaliseZeroHours": true,
"useAvailabilityLocations": true,
"alwaysScoreSharedSkills": true,
"explanation": {
"enabled": true,
"filterHardConstraints": true
},
"idleWeekend": {
"fromDayOfWeek": "MONDAY",
"fromTime": "<string>",
"toDayOfWeek": "MONDAY",
"toTime": "<string>",
"restTime": "<string>"
}
},
"hook": "<string>",
"label": "<string>"
}
'{
"id": "<string>",
"status": "QUEUED",
"solveDuration": 123,
"errors": [
{
"message": "<string>",
"code": 123
}
],
"warnings": [
{
"message": "<string>",
"code": 123
}
]
}Api Key based authentication (apikey)
FILL request for solving, evaluating
List of employees
1Show child attributes
Name of the employee (unique)
Availability of the employee
Show child attributes
start time of the window
end time of the window
Shift preferences of the employee. List of shift tags.
Skills of the employee
Show child attributes
name of the skill
expiry date of the skill
"2022-03-10"
weight of the skill
Period
Show child attributes
Start of the period
"2022-03-10T12:15:50"
End of the period
"2022-03-10T12:15:50"
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
List of dates to exclude from the from/to period.
DAILY, WEEKLY, MONTHLY, SCHEDULE Hourly pay of the employee. The solver will then optimize the cost of the planning.
Efficiency of the employee
Rules that hold for the entire period.
Show child attributes
Period of the rule. The rule only applies to this period
Show child attributes
Start of the period
"2022-03-10T12:15:50"
End of the period
"2022-03-10T12:15:50"
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
List of dates to exclude from the from/to period.
DAILY, WEEKLY, MONTHLY, SCHEDULE Maximum number of working days in the period.
Minimum number of working days in the period.
Minimum working duration in the period. Not including travel time
Maximum working duration in the period. Not including travel time
Minimum rest duration between shifts in the same day
Minimum rest duration between shifts
maximum shift length
minimum shift length
latest shift start
earliest shift start
latest shift end
The minimum number of weekends to be idle in this period.
The maximum number of weekends to be idle in this period.
Show child attributes
name of the contract
maximum working time per week
minimum working time per week
maximum consecutive work days
maximum shifts per day
minimum rest between shifts on the same day
minimum rest between shifts
maximum working days per week
maximum shift length
minimum shift length
latest shift start
earliest shift start
latest shift end
List of shifts that should be assigned to employees
1Show child attributes
Name of the shift
Start time of the shift
End time of the shift
Minimum number of employees assigned to this shift.
Maximum number of employees assigned to this shift.
Priority of the shift. High priority shifts get assigned more
Financial cost of the shift
Shift rests can define required idle/rest time after the shift.
Show child attributes
Rest type (CONSECUTIVE or WEEKLY)
DAILY, WEEKLY, MONTHLY, SCHEDULE Filter by shift tag
Filter by shift tag excludes
Planning Period Period
Show child attributes
Start of the period
"2022-03-10T12:15:50"
End of the period
"2022-03-10T12:15:50"
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
List of dates to exclude from the from/to period.
DAILY, WEEKLY, MONTHLY, SCHEDULE Minimum duration
Minimum consecutive duration of a rest.
Maximum duration
Maximum number of rest periods
If the rest needs to be BEFORE or AFTER a shift (tags must be applied as well)
BEFORE, AFTER Maximum number of employees assigned to this shift.
List of Rules. Rules can be Counters or Series.
Show child attributes
Type of constraint. COUNTER or SEQUENCE. A counter counts the number of occurances and the constraint
COUNTER, SEQUENCE Type of rule. HOURS_WORKED, DAYS_WORKED, DAYS_IDLE, WEEKENDS_WORKED, WEEKENDS_IDLE, SHIFT_TYPES_WORKED or SHIFT_TYPES_HOURS_WORKED
HOURS_WORKED, DAYS_WORKED, DAYS_IDLE, WEEKENDS_WORKED, WEEKENDS_IDLE, SHIFT_TYPES_WORKED, SHIFT_TYPES_HOURS_WORKED Period for which this rule holds Period
Show child attributes
Start of the period
"2022-03-10T12:15:50"
End of the period
"2022-03-10T12:15:50"
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
List of dates to exclude from the from/to period.
DAILY, WEEKLY, MONTHLY, SCHEDULE Minimum number of employees necessary to fill these shifts.
Maximum number of employees necessary to fill these shifts. If min==max then you'll get that exact amount of employees.
Shift tags to filter this rule by. For example only shifts with the tag EARLY.
Period rule. Consequence of this rule.
List of Rest definitions. A rest is defined for a fixed period or a duration.
Show child attributes
Rest type (CONSECUTIVE or WEEKLY)
DAILY, WEEKLY, MONTHLY, SCHEDULE Filter by shift tag
Filter by shift tag excludes
Planning Period Period
Show child attributes
Start of the period
"2022-03-10T12:15:50"
End of the period
"2022-03-10T12:15:50"
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
List of dates to exclude from the from/to period.
DAILY, WEEKLY, MONTHLY, SCHEDULE Minimum duration
Minimum consecutive duration of a rest.
Maximum duration
Maximum number of rest periods
If the rest needs to be BEFORE or AFTER a shift (tags must be applied as well)
BEFORE, AFTER List of shift demands. Demands are periodic minima and maxima for a certain number of employees to be present.
Show child attributes
The start time of the shift demand
The end time of the shift demand
The skills required for the shift demand
The minimum number of shifts to create
The maximum number of shifts to create
List of shift patterns. Patterns are sequences of shifts that can be desired or prohibited.
Show child attributes
SINGLE_DAY (spanning shifts in a single days) or MULTI_DAY (spanning shifts accross days)
SINGLE_DAY, MULTI_DAY (PREFERRED, PROHIBITED, or UNPREFERRED)
PREFERRED, PROHIBITED, UNPREFERRED Importance (weight) of the Pattern
Buckets or groups of employees where fairness in workload is required.
Show child attributes
The employees in the fairness bucket
The shifts in the fairness bucket
The target value of workload per employee
The period over which the fairness bucket applies. Default is over the entire planning period. Period
Show child attributes
Start of the period
"2022-03-10T12:15:50"
End of the period
"2022-03-10T12:15:50"
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
Duration of the rolling period in ISO8601 format (e.g. P1D). Do not use this in combo with from/to
List of dates to exclude from the from/to period.
DAILY, WEEKLY, MONTHLY, SCHEDULE List of shared skill requirements. Shared skills are skill requirements that govern a group of shifts.
Weights adjust objectives and scores.
Show child attributes
Options for tuning the solver
Show child attributes
Whether to enforce availability constraints
Whether to enforce skill constraints
Whether to enforce blacklist constraints
Partial planning. Whether to fill all shifts or not. Default is false
Whether to penalise employees with zero hours
Whether to use availability locations
Whether to always score shared skills
Idle weekend definition.
Show child attributes
Day of the week on which the weekend officially starts.
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY Time of day on which the weekend officially starts.
Day of the week on which the weekend officially ends.
MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY Time of day on which the weekend officially ends.
Webhook endpoint to receive POST request with the id.
OK
Status of a solve job
Job ID
Status of the solve.
QUEUED, SOLVING, SOLVED, ERROR Duration of the solve in seconds
Was this page helpful?
curl --request POST \
--url https://api.solvice.io/v2/fill/solve \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"employees": [
{
"name": "<string>",
"home": {
"lat": 123,
"lon": 123
},
"availability": [
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"location": {
"lat": 123,
"lon": 123
}
}
],
"preference": [
"<string>"
],
"skills": [
{
"name": "<string>",
"expiry": "2022-03-10",
"weight": 123,
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
}
}
],
"hourlyPay": 123,
"efficiency": 123,
"periodRules": [
{
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
},
"maxWorkingDays": 123,
"minWorkingDays": 123,
"minWorkingDuration": "<string>",
"maxWorkingDuration": "<string>",
"minRestDurationBetweenShiftsSameDay": "<string>",
"minRestDuration": "<string>",
"maxShiftLength": "<string>",
"minShiftLength": "<string>",
"latestShiftStart": "<string>",
"earliestShiftStart": "<string>",
"latestShiftEnd": "<string>",
"minWeekendsIdle": 123,
"maxWeekendsIdle": 123
}
],
"constracts": [
{
"name": "<string>",
"max": "<string>",
"min": "<string>",
"maxConsecutiveWorkDays": 123,
"maxShiftsDay": 123,
"minRestBetweenShiftsSameDay": 123,
"minRest": "<string>",
"maxWorkingDays": 123,
"maxShiftLength": "<string>",
"minShiftLength": "<string>",
"latestShiftStart": "<string>",
"earliestShiftStart": "<string>",
"latestShiftEnd": "<string>"
}
]
}
],
"shifts": [
{
"name": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"min": 123,
"max": 123,
"tags": [
{
"name": "<string>"
}
],
"skills": [
{
"name": "<string>",
"hard": true,
"weight": 123
}
],
"priority": 123,
"cost": 123,
"rests": [
{
"periodType": "DAILY",
"tags": [
"<string>"
],
"excludes": [
"<string>"
],
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
},
"min": "<string>",
"minConsecutive": "<string>",
"max": "<string>",
"frequency": 123,
"sequence": "BEFORE"
}
],
"blocklist": [
"<string>"
],
"value": 123,
"employees": [
"<string>"
],
"locked": [
true
],
"location": {
"lat": 123,
"lon": 123
}
}
],
"rules": [
{
"constraint": "COUNTER",
"type": "HOURS_WORKED",
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
},
"min": 123,
"max": 123,
"shifts": [
"<string>"
],
"then": {}
}
],
"rests": [
{
"periodType": "DAILY",
"tags": [
"<string>"
],
"excludes": [
"<string>"
],
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
},
"min": "<string>",
"minConsecutive": "<string>",
"max": "<string>",
"frequency": 123,
"sequence": "BEFORE"
}
],
"demands": [
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"skills": [
{
"name": "<string>",
"hard": true,
"weight": 123
}
],
"name": "<string>",
"min": 123,
"max": 123
}
],
"patterns": [
{
"type": "SINGLE_DAY",
"satisfy": "PREFERRED",
"elements": [
{
"type": "ON",
"tags": [
"<string>"
]
}
],
"weight": 123
}
],
"fairnessBuckets": [
{
"employees": [
"<string>"
],
"shifts": [
"<string>"
],
"target": "<string>",
"period": {
"from": "2022-03-10T12:15:50",
"to": "2022-03-10T12:15:50",
"duration": "<string>",
"period": "<string>",
"excludes": [
"2023-12-25"
],
"type": "DAILY"
}
}
],
"requirements": [
{
"shifts": [
"<string>"
],
"skill": "<string>",
"value": 123
}
],
"assignments": [
{
"shift": "<string>",
"employee": "<string>",
"locked": true
}
],
"weights": {
"unassigned": "<string>",
"maxWorkingDays": "<string>",
"concurrent": "<string>",
"sameDay": "<string>",
"minRest": "<string>",
"maxConsecutive": "<string>",
"working": "<string>",
"sameDayMinRest": "<string>",
"minHours": "<string>",
"minHoursUnassigned": "<string>",
"maxHours": "<string>",
"minShift": "<string>",
"maxShift": "<string>",
"shiftStart": "<string>",
"latestShiftStart": "<string>",
"shiftEnd": "<string>",
"dayOfWeek": "<string>",
"requirements": "<string>",
"availability": "<string>",
"skills": "<string>",
"criticalSkills": "<string>",
"locked": "<string>",
"blacklist": "<string>",
"pref": "<string>",
"costs": "<string>",
"wages": "<string>",
"efficiency": "<string>",
"distance": "<string>",
"distanceAL": "<string>",
"priority": "<string>",
"softSkills": "<string>",
"softSkillsLevel": "<string>",
"fairness": "<string>"
},
"options": {
"hardAvailability": true,
"hardSkill": true,
"hardBlacklist": true,
"partialPlanning": true,
"penaliseZeroHours": true,
"useAvailabilityLocations": true,
"alwaysScoreSharedSkills": true,
"explanation": {
"enabled": true,
"filterHardConstraints": true
},
"idleWeekend": {
"fromDayOfWeek": "MONDAY",
"fromTime": "<string>",
"toDayOfWeek": "MONDAY",
"toTime": "<string>",
"restTime": "<string>"
}
},
"hook": "<string>",
"label": "<string>"
}
'{
"id": "<string>",
"status": "QUEUED",
"solveDuration": 123,
"errors": [
{
"message": "<string>",
"code": 123
}
],
"warnings": [
{
"message": "<string>",
"code": 123
}
]
}