Skip to content

Developer portal

POST /ev-fleet/plan/solve

Run VRP routing, CP-SAT charger queue, hybrid stagger, scoreboard, and audit packs.

PilotPOST /ev-fleet/plan/solveAuth required

Summary

Run VRP routing, CP-SAT charger queue, hybrid stagger, scoreboard, and audit packs.

Example

curl

curl -X POST "https://sparkling-vibrancy-production-1a7a.up.railway.app/optimize" \
  -H "Authorization: Bearer 811f31d4-5b8e-4ed0-a7a2-8176e05eba63" \
  -H "Content-Type: application/json" \
  -d '{
  "scenarioId": "tou-peak-ca",
  "useFixture": true,
  "seed": 1234
}'

Request body

FieldTypeRequiredDescription
scenarioIdstringNo (tou-peak-ca)

Scenario identifier.

useFixturebooleanNo (true)

Replay cached QPU trace when true.

fleetSessionIdstringNo

Uploaded fleet session override.

stopsSessionIdstringNo

Uploaded stops session override.

seedintegerNo (1234)

Solver seed.

Response

FieldTypeRequiredDescription
routingRoutingResultYes

VRP assignments.

classicalPlanChargePlanYes

CP-SAT charge plan.

hybridPlansChargePlan[]Yes

Hybrid staggered plans.

scoreboardScoreboardYes

KPI comparison.

auditPacksAuditPack[]Yes

Audit artifacts.

Errors

CodeMeaningTypical causeSuggested fix
400Bad requestMalformed JSON or missing required headers.Validate Content-Type and JSON syntax before retrying.
401UnauthorizedMissing or invalid API key in Authorization or x-api-key header.Send Bearer <key> or x-api-key with a valid pilot token.
422Unprocessable entityInvalid payload shape, unsupported problem type, or infeasible constraints.Fix field errors in the response detail; relax constraints and retry.
429Too many requestsPer-key rate limit exceeded (default 300 requests per minute).Backoff with jitter; cache results; request a higher limit for production.
500Internal server errorUnexpected backend failure.Retry with exponential backoff; contact support if persistent.
501Not implementedProblem type not yet supported on the live solver path (routing, allocation).Use type schedule for live jobs, or follow the roadmap for routing/allocation.

See the full errors reference.