CREATE quickstart
Welcome to the CREATE solver API! You can test our API in just one command:
curl https://api.solvice.io/v2/create/demo -H "Authorization: <<apiKey>>" | \
curl https://api.solvice.io/v2/create/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 CREATE request
payload and send it to the /v2/solve
endpoint. You can find the
schema of the request in the Schemas section.
A CREATE request will consist of labor demands (schema:demands) and
shift templates (schema:templates).
Postman Download postman collection
Underneath you can find an example request
, solution
and explanation
json.
{
"demands":
[
{
"from": "2023-12-25T09:00:00",
"to": "2023-12-25T15:00:00",
"skill": "group_1",
"demand": 5
}
],
"templates":
[
{
"name": "9:5",
"patterns":
[
{
"from": "2023-12-25T09:00:00",
"to": "2023-12-25T17:00:00"
}
],
"skill": "group_1"
}
]
}
{
"score": {
"hardScore": 0,
"mediumScore": 0,
"softScore": -1655,
"feasible": true
}
}
After this, you can find more information about the different endpoints and how to use them in the API reference.
Updated 7 months ago