AI Route Optimization API for Field Service Applications
Integrate multi-stop route planning and job data management into your field service app with a single REST API call.
$npm install @jobmap-pro/sdk Intelligent Route Planning
Pass a list of job locations and constraints; receive an optimized sequence in under 200ms. Supports time windows, priority weighting, and live re-optimization via webhook.
- Time window constraints per stop
- Priority-based job ordering
- Live route refresh via webhook
- Returns ETA and driving duration per leg
```javascript
const route = await jobmap.optimize({
stops: [
{ id: 'job_001', lat: 34.05, lng: -118.24, tw: '09:00-12:00' },
{ id: 'job_002', lat: 34.06, lng: -118.22 }
],
start: { lat: 34.04, lng: -118.26 }
});
// route.stops[0].eta → 09:23
``` Routes Derived from Job Records
Query routes by customer, status, or date range. Sync job metadata—description, parts required, technician notes—directly into the route object for mobile dispatch.
- Filter by customer_id, status, date_range
- Include job metadata in route payload
- Two-way sync with existing job management systems
- Supports JSON and CSV job import
```javascript
const todaysRoutes = await jobmap.routes.list({
date: '2024-01-15',
include: ['jobs', 'customer']
});
// Returns routes with full job details
``` Immutable Route Audit Trail
Every route decision is logged with timestamp, input parameters, and optimization result. Export to CSV or stream to your SIEM for compliance reporting.
- Immutable event log per route
- Exportable as CSV or JSON-Lines
- SIEM integration via webhook
- Retain logs for 90 days by default
```javascript
const auditLog = await jobmap.audit.list({
route_id: 'route_abc123',
format: 'jsonl'
});
// Stream to your SIEM or local storage
``` Technical FAQ
What transport APIs does the routing engine use?
The default configuration uses OpenRouteService for base routing, with OSRM as a fallback. Both are open-source projects with no per-request licensing fees. You can swap in Google Directions API or Mapbox Navigation API by passing a custom `routing_provider` parameter.
How does the webhook re-optimization trigger work?
Subscribe to job status changes via the `/webhooks/subscribe` endpoint, specifying a `trigger_event` (e.g., `job.completed`, `job.cancelled`). When triggered, JobMap re-runs optimization with updated constraints and POSTs the new route to your configured callback URL within 500ms of the event.
Is the audit log tamper-proof?
Audit entries are written to an append-only event store with SHA-256 checksums linking each entry to the previous one. You can verify chain integrity via the `/audit/verify` endpoint. This does not constitute legal or regulatory compliance certification; consult your legal counsel for specific requirements.
What's included in the free tier?
The free tier includes 500 route optimizations per month, 10,000 audit log entries, and access to standard routing providers. Rate limits apply: 10 requests/minute on the optimize endpoint. Paid plans remove these limits and add dedicated support SLAs.
Can I self-host the routing engine?
Yes. The core routing service is available as a Docker image (`jobmap-pro/routing-engine:latest`). Self-hosting requires your own routing provider API keys and a PostgreSQL instance for job storage. See the self-hosting guide for full requirements.
What languages have official SDKs?
Official SDKs exist for Node.js and Python. Community-maintained SDKs exist for Go and Ruby via the GitHub repository. The REST API itself is language-agnostic and accepts JSON request/response payloads.
Start building your route-first dispatch system.
Free tier includes 500 optimizations/month. No credit card required.