The optimization-only pattern is for partners who already have everything except the algorithm itself: route geometry, a curated station network, current prices, and computed distances. You call a single endpoint,Documentation Index
Fetch the complete documentation index at: https://nozle.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
/v1/optimize, with all the data prepared from your systems.
Who This Is For
This pattern suits partners with mature infrastructure:- Fleet management platforms with built-in routing
- Logistics companies with proprietary route optimization layers
- Telematics providers who already track vehicle positions and station detours
- Anyone integrating fuel-cost optimization into an existing routing product
Architecture
Your system computes the route
Using your existing routing infrastructure, compute the driving route between origin and destination.
Your system selects candidate stations
From your station database (fleet card network, partner network, or proprietary list), filter stations near the route.
Your system attaches prices and distances
Add current price per gallon to each station from your pricing data source. Compute
miles_from_route_start and detour_minutes for each station using your routing system.Data You Provide
For each/v1/optimize call, you provide:
- Route: total distance, total duration, start/end coordinates, and (optionally) polyline geometry
- Stations: a list of candidates with
id,name,location,price_per_gallon,fuel_type,miles_from_route_start, anddetour_minutes - Vehicle: either direct specs (
mpg,tank_capacity_gallons,current_fuel_gallons) or a year/make/model lookup
Example Request
Performance
A single/v1/optimize call typically completes in 500ms-2s depending on the number of stations and route length. Because you’re skipping the routing and enrichment endpoints, end-to-end latency is the lowest of any integration pattern.
Advantages
Minimal Latency
One API call per route. No round trips for data your systems already have.
Full Data Control
Your station network, your prices, your routing — all stay in your stack.
Easy to Adopt
No need to migrate routing or station data. Slot the optimizer into your existing pipeline.
Predictable Costs
Lower per-request rate limits aren’t an issue when you only call one endpoint.
When to Choose a Different Pattern
This pattern assumes you have all the input data ready. Consider another pattern if:- You don’t have routing infrastructure → use Full Integration, which includes
/v1/routes - You have station data but not detour distances → use Station Network Integration, which includes
/v1/stations/enrich-distances
Next Steps
API Reference: /v1/optimize
Full endpoint reference including all request and response fields
Try the Demo
See the optimization endpoint in action with synthetic data