> ## 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

> Solve your first vehicle routing problem in under 5 minutes

## Your First API Call

Test the VRP solver with a single command:

```bash theme={null}
curl https://api.solvice.io/v2/vrp/demo -H "Authorization: YOUR_API_KEY" | \
curl https://api.solvice.io/v2/vrp/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.
</Check>

## Basic VRP Request

A VRP request needs two things: **resources** (vehicles) and **jobs** (deliveries).

<CodeGroup>
  ```json Minimal Request theme={null}
  {
    "resources": [{
      "name": "vehicle-1",
      "start": {
        "latitude": 51.0535,
        "longitude": 3.7264
      },
      "shifts": [{
        "from": "2023-08-23T08:00:00",
        "to": "2023-08-23T17:00:00"
      }]
    }],
    "jobs": [{
      "name": "delivery-1",
      "location": {
        "latitude": 50.8456,
        "longitude": 4.3526
      },
      "duration": 3600
    }]
  }
  ```

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

## Understanding the Response

The solver returns an optimized route plan:

```json Solution theme={null}
{
  "score": {
    "hardScore": 0,
    "softScore": -1655,
    "feasible": true
  },
  "trips": [{
    "resource": "vehicle-1",
    "visits": [{
      "arrival": "2023-08-23T08:27:32",
      "job": "delivery-1"
    }]
  }],
  "status": "SOLVED"
}
```

<ResponseField name="feasible" type="boolean">
  `true` if all hard constraints are satisfied
</ResponseField>

<ResponseField name="trips" type="array">
  Optimized routes for each vehicle
</ResponseField>

## Next Steps

<CardGroup cols={2}>
  <Card title="Add More Features" icon="plus" href="/guides/vrp/features">
    Time windows, capacities, skills, and more
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/vrp/solve">
    Complete endpoint documentation
  </Card>

  <Card title="Examples" icon="lightbulb" href="/guides/vrp/examples">
    Real-world routing scenarios
  </Card>

  <Card title="Schemas" icon="database" href="/guides/vrp/schemas">
    Detailed request/response schemas
  </Card>
</CardGroup>
