The official Solvice VRP Solver SDK is now available! Install it today to streamline your route optimization integrations.
Installation
Install the SDK using your preferred package manager:- npm
- yarn
- pnpm
Quick Start
Get up and running with the VRP Solver in minutes:Key Features
Type Safety
Full TypeScript support with comprehensive type definitions for all request and response objects
Auto Retry
Built-in retry logic with configurable attempts for resilient integrations
Modern Runtime Support
Works in Node.js, Deno, Bun, browsers, and Cloudflare Workers
Error Handling
Typed error responses with detailed debugging information
Configuration
Configure the SDK client with these options:Advanced Usage
Asynchronous Solve with Polling
For large routing problems, use the asynchronous solve method:Error Handling
The SDK provides typed error responses for better debugging:Using with Real Road Distances
Enable real-world routing distances instead of straight-line calculations:Runtime Support
The SDK supports multiple JavaScript runtimes:- Node.js
- Deno
- Bun
- Browser
Requires Node.js 20 LTS or later:
Complete Example
Here’s a comprehensive example showcasing various SDK features:API Methods
The SDK provides access to all VRP Solver endpoints:Core Methods
syncSolve()- Synchronous solving for smaller problemssolve()- Asynchronous solving for larger problemsjobs.status()- Check job statusjobs.solution()- Retrieve solution
Advanced Methods
evaluate()- Evaluate an existing solutionsuggest()- Get improvement suggestionsjobs.explanation()- Get detailed explanations
Resources
GitHub Repository
View source code and contribute
npm Package
View on npm registry
API Reference
Complete API documentation
Support
Get help from our team