Quickstart
Run the server locally, set your API key, and call the API. Every example below works against the real product.
1. Start the server
pip install -r requirements.txt
python app.py
2. Set your API key
export FLEETROUTE_API_KEY="your-key-here" # see .env.example
When the key is set, programmatic /api/* calls require an X-API-Key header. Full endpoint reference: OPENAPI.md in the repo.
After checkout — claim your account
Paying via a pricing-page plan provisions your account automatically. Open claim.html?session_id={CHECKOUT_SESSION_ID} from your Stripe success link to reveal your flr_live_… API key — shown exactly once. Use it as the X-API-Key on every call below; your techs, routes, stops and SMS usage are scoped to your account and capped by your plan.
3. Try it
Add a tech
curl -s -X POST localhost:5000/api/techs -H "Content-Type: application/json" -H "X-API-Key: $FLEETROUTE_API_KEY" -d '{"name":"Sam Rivera","mobile":"+15550001111"}'Create a route
curl -s -X POST localhost:5000/api/routes -H "Content-Type: application/json" -H "X-API-Key: $FLEETROUTE_API_KEY" -d '{"name":"Tue Oct 21"}'Add a stop
curl -s -X POST localhost:5000/api/routes/ROUTE_ID/stops -H "Content-Type: application/json" -H "X-API-Key: $FLEETROUTE_API_KEY" -d '{"name":"123 Ocean Dr","lat":25.76,"lng":-80.19,"phone":"+15550002222"}'Optimize
curl -s -X POST localhost:5000/api/routes/ROUTE_ID/optimize -H "Content-Type: application/json" -H "X-API-Key: $FLEETROUTE_API_KEY" -d '{"depot_lat":25.7617,"depot_lng":-80.1918}'