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
}
],
"contracts": [
{
"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
List of shifts that should be assigned to employees
1Show child attributes
List of Rules. Rules can be Counters or Series.
Show child attributes
List of Rest definitions. A rest is defined for a fixed period or a duration.
Show child attributes
List of shift demands. Demands are periodic minima and maxima for a certain number of employees to be present.
Show child attributes
List of shift patterns. Patterns are sequences of shifts that can be desired or prohibited.
Show child attributes
Buckets or groups of employees where fairness in workload is required.
Show child attributes
List of shared skill requirements. Shared skills are skill requirements that govern a group of shifts.
Show child attributes
List of assignments that are pre-set. (optional)
Show child attributes
Weights adjust objectives and scores.
Show child attributes
Options for tuning the solver
Show child attributes
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 "SOLVING"
Duration of the solve in seconds
List of errors
Show child attributes
List of warnings
Show child attributes
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
}
],
"contracts": [
{
"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
}
]
}