> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solvice.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Assign employees to shifts optimally in under 5 minutes

## Your First API Call

Test the Fill solver with a single command:

```bash theme={null}
curl https://api.solvice.io/v2/fill/demo -H "Authorization: YOUR_API_KEY" | \
curl https://api.solvice.io/v2/fill/solve -H "Authorization: YOUR_API_KEY" \
     -X POST -H "Content-Type: application/json" -d @-
```

<Check>
  This fetches a demo problem and solves it immediately. Replace `YOUR_API_KEY` with your actual API key from the [dashboard](https://platform.solvice.io).
</Check>

## Basic Fill Request

A Fill request requires two things: **employees** (your workforce) and **shifts** (time slots to fill).

<CodeGroup>
  ```json Minimal Request theme={null}
  {
    "employees": [
      {
        "name": "Alice",
        "skills": [{ "name": "kitchen" }]
      },
      {
        "name": "Bob",
        "skills": [{ "name": "bar" }]
      }
    ],
    "shifts": [
      {
        "name": "morning-kitchen",
        "from": "2024-04-18T08:00:00",
        "to": "2024-04-18T14:00:00",
        "skills": [{ "name": "kitchen" }],
        "min": 1,
        "max": 1
      },
      {
        "name": "evening-bar",
        "from": "2024-04-18T18:00:00",
        "to": "2024-04-18T23:00:00",
        "skills": [{ "name": "bar" }],
        "min": 1,
        "max": 1
      }
    ]
  }
  ```

  ```bash Send Request theme={null}
  curl -X POST https://api.solvice.io/v2/fill/solve \
    -H "Authorization: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d @request.json
  ```
</CodeGroup>

## Understanding the Response

The solver returns optimized shift assignments:

```json Solution theme={null}
{
  "score": {
    "hardScore": 0,
    "mediumScore": 0,
    "softScore": -2,
    "feasible": true
  },
  "assignments": [
    {
      "shift": "morning-kitchen",
      "from": "2024-04-18T08:00:00",
      "to": "2024-04-18T14:00:00",
      "skills": ["kitchen"],
      "employee": "Alice"
    },
    {
      "shift": "evening-bar",
      "from": "2024-04-18T18:00:00",
      "to": "2024-04-18T23:00:00",
      "skills": ["bar"],
      "employee": "Bob"
    }
  ]
}
```

<ResponseField name="feasible" type="boolean">
  `true` if all hard constraints are satisfied (skills match, no conflicts)
</ResponseField>

<ResponseField name="assignments" type="array">
  List of shift-employee pairings with timing details
</ResponseField>

## Key Concepts

| Concept      | Description                                                 |
| ------------ | ----------------------------------------------------------- |
| **Employee** | A worker with skills who can be assigned to shifts          |
| **Shift**    | A time slot requiring specific skills and number of workers |
| **Skills**   | Capabilities that match employees to appropriate shifts     |
| **Score**    | Solution quality indicator (hard/medium/soft constraints)   |

## Next Steps

<CardGroup cols={2}>
  <Card title="Rules & Constraints" icon="scale-balanced" href="/guides/fill/examples/rule">
    Add working day limits, sequences, and labor rules
  </Card>

  <Card title="Patterns" icon="calendar-days" href="/guides/fill/examples/pattern">
    Define preferred or prohibited shift sequences
  </Card>

  <Card title="Fairness" icon="users" href="/guides/fill/examples/fairness">
    Distribute workload evenly across employees
  </Card>

  <Card title="Request Schema" icon="database" href="/guides/fill/schemas/request">
    Complete request format documentation
  </Card>
</CardGroup>
