FILL quickstart
Welcome to the FILL solver API! You can test our API in just one command:
curl https://api.solvice.io/v2/fill/demo -H "Authorization: <<apiKey>>" | \
curl https://api.solvice.io/v2/fill/solve -H "Authorization: <<apiKey>>" \
-X POST -H "Content-Type: application/json" -d @-
This will fetch a demo instance and solve it.
You can also solve your own instance by replacing the demo instance with your own instance.
Most of the time, you will want to solve your own instance.
In this case, you will need to create a FILL request
payload and send it to the /v2/solve
endpoint. You can find the
schema of the request in the Schemas section.
A FILL request will consist of employees (schema:employees) to be assigned to shifts (schema:shifts).
Postman Download postman collection
Underneath you can find an example request
, solution
and explanation
json.
{
"employees": [
{
"name": "employee 1",
"skills": [
{
"name": "bar"
}
]
},
{
"name": "employee 2",
"skills": [
{
"name": "bar"
}
]
},
{
"name": "employee 3",
"skills": [
{
"name": "bar"
}
]
},
{
"name": "employee 4",
"skills": [
{
"name": "kitchen"
}
]
},
{
"name": "employee 5",
"skills": [
{
"name": "kitchen"
}
]
},
{
"name": "employee 6",
"skills": [
{
"name": "bar"
}
]
},
{
"name": "employee 7",
"skills": [
{
"name": "bar"
}
]
},
{
"name": "employee 8",
"skills": [
{
"name": "kitchen"
}
]
},
{
"name": "employee 9",
"skills": [
{
"name": "bar"
}
]
},
{
"name": "employee 10",
"skills": [
{
"name": "bar"
}
]
}
],
"shifts": [
{
"name": "shift 1",
"from": "2024-04-18T08:00:00",
"to": "2024-04-18T17:00:00",
"skills": [
{
"name": "kitchen"
}
],
"value": 2
},
{
"name": "shift 2",
"from": "2024-04-19T08:00:00",
"to": "2024-04-19T17:00:00",
"skills": [
{
"name": "kitchen"
}
],
"value": 2
},
{
"name": "shift 3",
"from": "2024-04-20T08:00:00",
"to": "2024-04-20T17:00:00",
"skills": [
{
"name": "bar"
}
],
"value": 2
},
{
"name": "shift 4",
"from": "2024-04-21T08:00:00",
"to": "2024-04-21T17:00:00",
"skills": [
{
"name": "bar"
}
],
"value": 2
},
{
"name": "shift 5",
"from": "2024-04-22T08:00:00",
"to": "2024-04-22T17:00:00",
"skills": [
{
"name": "bar"
}
],
"value": 2
},
{
"name": "shift 6",
"from": "2024-04-23T08:00:00",
"to": "2024-04-23T17:00:00",
"skills": [
{
"name": "bar"
}
],
"value": 2
},
{
"name": "shift 7",
"from": "2024-04-24T08:00:00",
"to": "2024-04-24T17:00:00",
"skills": [
{
"name": "bar"
}
],
"value": 2
},
{
"name": "shift 8",
"from": "2024-04-25T08:00:00",
"to": "2024-04-25T17:00:00",
"skills": [
{
"name": "bar"
}
],
"value": 2
},
{
"name": "shift 9",
"from": "2024-04-26T08:00:00",
"to": "2024-04-26T17:00:00",
"skills": [
{
"name": "bar"
}
],
"value": 2
},
{
"name": "shift 10",
"from": "2024-04-27T08:00:00",
"to": "2024-04-27T17:00:00",
"skills": [
{
"name": "kitchen"
}
],
"value": 2
}
]
}
{
"score": {
"hardScore": 0,
"mediumScore": 0,
"softScore": -20,
"feasible": true
},
"assignments": [
{
"shift": "shift 1",
"from": "2024-04-18T08:00:00",
"to": "2024-04-18T17:00:00",
"skills": [
"kitchen"
],
"employee": "employee 4"
},
{
"shift": "shift 1",
"from": "2024-04-18T08:00:00",
"to": "2024-04-18T17:00:00",
"skills": [
"kitchen"
],
"employee": "employee 5"
},
{
"shift": "shift 2",
"from": "2024-04-19T08:00:00",
"to": "2024-04-19T17:00:00",
"skills": [
"kitchen"
],
"employee": "employee 4"
},
{
"shift": "shift 2",
"from": "2024-04-19T08:00:00",
"to": "2024-04-19T17:00:00",
"skills": [
"kitchen"
],
"employee": "employee 5"
},
{
"shift": "shift 3",
"from": "2024-04-20T08:00:00",
"to": "2024-04-20T17:00:00",
"skills": [
"bar"
],
"employee": "employee 1"
},
{
"shift": "shift 3",
"from": "2024-04-20T08:00:00",
"to": "2024-04-20T17:00:00",
"skills": [
"bar"
],
"employee": "employee 2"
},
{
"shift": "shift 4",
"from": "2024-04-21T08:00:00",
"to": "2024-04-21T17:00:00",
"skills": [
"bar"
],
"employee": "employee 1"
},
{
"shift": "shift 4",
"from": "2024-04-21T08:00:00",
"to": "2024-04-21T17:00:00",
"skills": [
"bar"
],
"employee": "employee 2"
},
{
"shift": "shift 5",
"from": "2024-04-22T08:00:00",
"to": "2024-04-22T17:00:00",
"skills": [
"bar"
],
"employee": "employee 1"
},
{
"shift": "shift 5",
"from": "2024-04-22T08:00:00",
"to": "2024-04-22T17:00:00",
"skills": [
"bar"
],
"employee": "employee 2"
},
{
"shift": "shift 6",
"from": "2024-04-23T08:00:00",
"to": "2024-04-23T17:00:00",
"skills": [
"bar"
],
"employee": "employee 1"
},
{
"shift": "shift 6",
"from": "2024-04-23T08:00:00",
"to": "2024-04-23T17:00:00",
"skills": [
"bar"
],
"employee": "employee 2"
},
{
"shift": "shift 7",
"from": "2024-04-24T08:00:00",
"to": "2024-04-24T17:00:00",
"skills": [
"bar"
],
"employee": "employee 1"
},
{
"shift": "shift 7",
"from": "2024-04-24T08:00:00",
"to": "2024-04-24T17:00:00",
"skills": [
"bar"
],
"employee": "employee 2"
},
{
"shift": "shift 8",
"from": "2024-04-25T08:00:00",
"to": "2024-04-25T17:00:00",
"skills": [
"bar"
],
"employee": "employee 1"
},
{
"shift": "shift 8",
"from": "2024-04-25T08:00:00",
"to": "2024-04-25T17:00:00",
"skills": [
"bar"
],
"employee": "employee 2"
},
{
"shift": "shift 9",
"from": "2024-04-26T08:00:00",
"to": "2024-04-26T17:00:00",
"skills": [
"bar"
],
"employee": "employee 3"
},
{
"shift": "shift 9",
"from": "2024-04-26T08:00:00",
"to": "2024-04-26T17:00:00",
"skills": [
"bar"
],
"employee": "employee 6"
},
{
"shift": "shift 10",
"from": "2024-04-27T08:00:00",
"to": "2024-04-27T17:00:00",
"skills": [
"kitchen"
],
"employee": "employee 4"
},
{
"shift": "shift 10",
"from": "2024-04-27T08:00:00",
"to": "2024-04-27T17:00:00",
"skills": [
"kitchen"
],
"employee": "employee 5"
}
]
}
{
"score": {
"hardScore": 0,
"mediumScore": 0,
"softScore": -20,
"feasible": true
},
"conflicts": [
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
},
{
"constraint": "Employee Skill Level Match Soft",
"score": "-1soft"
}
],
"unresolved": [
{
"constraint": "Employee Skill Level Match Soft",
"score": "-20soft"
}
]
}
After this, you can find more information about the different endpoints and how to use them in the API reference.
Updated about 14 hours ago