PlanSolve is still in pre-alpha – Features may change or break. Feedback welcome!

PlanSolve API Reference

Integrate with PlanSolve's optimization engine using our RESTful API. Submit optimization problems, monitor progress, and retrieve results programmatically.

API Overview
PlanSolve uses an asynchronous API pattern. Submit your optimization request, receive a job ID, and poll for completion before retrieving results.
1

Submit Request

POST your optimization problem to /api/solve

2

Get Job ID

Receive a unique identifier for tracking

3

Monitor Progress

Poll status endpoint until completion

4

Retrieve Results

Download optimized solution and routes

API Endpoints

POST/api/solve

Submit an optimization request

Parameters

solver
vehicles
visits
startDateTime
endDateTime

Response

Returns a job ID for tracking

GET/api/solve/{jobId}

Check optimization job status

Parameters

jobId

Response

Returns current status (PENDING, RUNNING, COMPLETED, FAILED)

GET/api/solve/{jobId}/result

Retrieve optimization results

Parameters

jobId

Response

Returns complete optimization solution with routes and timing

GET/api/solve/{jobId}/analyze

Get optimization analysis

Parameters

jobId

Response

Returns performance metrics and insights

Field Service Parameters
The field service optimization API accepts these key parameters to define your optimization problem.
ParameterTypeRequiredDescription
solverstringRequiredMust be 'field_service' for this optimization model
vehiclesarrayRequiredArray of vehicles/technicians with constraints and capabilities
visitsarrayRequiredArray of customer visits with locations and requirements
startDateTimeISO 8601RequiredStart time for the optimization period
endDateTimeISO 8601RequiredEnd time for the optimization period
HTTP Response Codes
200Success

Request completed successfully

201Created

Optimization job created successfully

400Bad Request

Invalid request parameters

401Unauthorized

Invalid or missing API key

429Too Many Requests

Rate limit exceeded

500Internal Server Error

Server error occurred

Authentication

API Key Required

All API requests require authentication using an API key in the request header.

X-API-KEY: your-api-key-here

Getting Your API Key

  1. 1Log into your PlanSolve dashboard
  2. 2Navigate to Settings → API Keys
  3. 3Click "Generate New API Key"
  4. 4Copy and store the key securely

Security Best Practices

Never commit API keys to version control
Use environment variables for storage
Rotate keys regularly for security
Monitor API usage for anomalies
Rate Limiting

Rate Limits

API requests are rate limited to prevent abuse and ensure fair usage across all customers.

100

Requests per minute

Standard rate limit for most endpoints

1000

Requests per hour

Hourly limit for sustained usage

10

Concurrent jobs

Maximum optimization jobs running simultaneously

Ready to Start Building?

Choose your preferred approach and start integrating with PlanSolve today.