Routing API documentation
Use the versioned JSON API to import jobs and vehicles into your Hawler workspace and export those records to your systems. Routing API access is available on Business and Custom plans.
Plan access and API keys
An active Business or Custom Route Planning plan is required. Starter and Plus are not eligible. The API key identifies your company and must be sent in the X-API-Key header over HTTPS.
A company owner can create or rotate the key from Account → Team. The secret is shown only once; store it in a secure server-side secret manager.
API base URL
Set HAWLER_API_BASE_URL to the HTTPS base URL provided for your production environment. The test hostname is not a production endpoint. Contact Hawler if you have an API key but do not have a production base URL.
Available endpoints
Imports accept application/json. Each import request contains one entity-specific importId and a non-empty batch.
| Method and path | Purpose |
|---|---|
| POST /api/v1/imports/jobs | Import a jobs batch. |
| POST /api/v1/imports/cars | Import a vehicles batch. |
| GET /api/v1/exports/jobs?page=0&size=1000 | Export paginated jobs. Page size defaults to 1,000 and is limited to 5,000. |
| GET /api/v1/exports/cars?page=0&size=1000 | Export paginated vehicles. Page size defaults to 1,000 and is limited to 5,000. |
Quick start: import jobs
Set the two environment variables on a trusted server. Replace the sample importId for each new batch and use your own job records.
curl --request POST \
--url "$HAWLER_API_BASE_URL/api/v1/imports/jobs" \
--header "X-API-Key: $HAWLER_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"importId": "orders-unique-001",
"jobs": [{
"id": "STOP-001",
"address": "Gedimino pr. 9, Vilnius",
"latitude": 54.6872,
"longitude": 25.2797,
"type": "delivery",
"quantity": 20,
"duration": 10
}]
}'Never put an API key in browser code, a public mobile app, a URL or a source repository. Keep requests server-to-server over HTTPS.
Vehicle batches use the /cars endpoint and a cars array. Include the capacity, working hours and starting location needed by the routing workspace.
curl --request POST \
--url "$HAWLER_API_BASE_URL/api/v1/imports/cars" \
--header "X-API-Key: $HAWLER_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"importId": "fleet-unique-001",
"cars": [{
"id": "CAR-001",
"plateNumber": "HAW-101",
"status": "active",
"capacity": 120,
"workStartTime": "08:00",
"workEndTime": "17:00",
"returnToHub": true,
"latitude": 54.6872,
"longitude": 25.2797
}]
}'Import behavior and limits
- Each import archives the active workspace, replaces only the imported entity collection and carries the other collection forward. The API does not start route optimization; review the workspace and optimize in Hawler.
- A unique importId is required for each active batch. Repeating an active importId returns 409. After a timeout, check the active workspace or exports before retrying because the import may already have committed.
- Job imports with unresolved or review-required locations are rejected with 422. Supply usable coordinates or data that can be resolved before the batch is accepted.
- Each JSON request is limited to 10,000,000 bytes. Duplicate records return 409; invalid models or job locations return 422.
Exports
Use the jobs and cars export endpoints with zero-based page and size query parameters. Exports are read-only and return the records currently in the active workspace.