Scan your whole stack
Are you using @unmap/routing?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.36.0
@unmap/routing was last scanned on 23 Nov 2026 at version 0.36.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.36.0 LATEST | 23 Nov 2026 | No rules fired |
| 0.35.0 | 23 Nov 2026 | No rules fired |
| 0.34.0 | 20 Nov 2026 | No rules fired |
| 0.33.0 | 18 Nov 2026 | Not shown |
| 0.32.1 | 16 Nov 2026 | Not shown |
Findings for v0.36.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.36.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Typed client for the unmap routing API: point-to-point routes and travel-time isochrones over the Canadian road graph, for driving, trucking, cycling, and walking, plus the departure-time transit route contract. No map dependency; works in Node and the browser.
npm i @unmap/routing
import { Router } from '@unmap/routing'
const router = new Router({ key: 'um_live_...' })
const route = await router.route([-114.07, 51.05], [-113.99, 51.05], { mode: 'auto' })
route.distanceMeters // integer metres
route.durationSeconds // integer seconds
route.geometry // GeoJSON LineString, [lng, lat] coordinates
const bands = await router.isochrone([-114.07, 51.05], { minutes: [10, 20], mode: 'pedestrian' })
bands.features // one GeoJSON polygon per minute value
Coordinates are always [lng, lat]. mode is 'auto' | 'car' | 'bicycle' | 'pedestrian' | 'truck' | 'transit' and defaults
to 'auto'; minutes is required and takes up to four values of at most 120 minutes. Driving modes accept
useHighways (0 avoid motorways and trunks, 1 prefer); cycling and walking accept useHills
(0 avoid climbs even for a longer route, 1 indifferent) and already account for terrain
without it. Driving times do not vary with grade at all, which is Valhalla's model, so
useHills on a driving mode is a 400 rather than a no-op. Both methods accept an
AbortSignal as signal. A non-2xx response throws a RouterError carrying the HTTP status
and, when the body has one, code. An endpoint outside Canada is 422 outside_coverage.
A longitude or latitude outside WGS84 is 400 invalid_location, not that code.
A Canadian trip the graph cannot connect, including Iqaluit to the mainland, is 422 no_route.
Transit requires departAt and works on route() and isochrone(); a transit band can be a
MultiPolygon, and a centre with no scheduled transit nearby throws a RouterError with code
outside_coverage. Production routes the agencies /coverage.json lists as routing-ready. There is
no arriveBy, transit matrix, or realtime claim.
optimizeTours() is Unmap Optimize (POST /optimize): it assigns shipments to vehicles and orders
their visits under time windows, capacities, breaks and route limits. The request is Google Route
Optimization's OptimizeToursRequest, camelCase or snake_case, and response is its
OptimizeToursResponse, unchanged. It is not router.optimize(), which orders the stops of one
vehicle.
import { optimizeTours, UnmapOptimizeError } from '@unmap/routing'
try {
const { response, warnings, billableShipments } = await optimizeTours(
{
model: {
shipments: [{ deliveries: [{ arrivalLocation: { latitude: 51.05, longitude: -114.07 } }] }],
vehicles: [{ startLocation: { latitude: 51.04, longitude: -114.06 } }],
},
},
{ key: 'um_live_...' },
)
response.routes // one ShipmentRoute per vehicle that was used
response.skippedShipments
} catch (e) {
if (e instanceof UnmapOptimizeError) console.error(e.googleStatus, e.details)
}
The same call is router.optimizeTours(request) on a Router, and unmap.router.optimizeTours(request)
from @unmap/sdk. The key is sent in the X-API-Key header, not in the URL.
What Unmap knows beyond Google's response comes back beside it, never inside it:
warnings: the parsed X-Unmap-Optimize-Warnings header, an array of
{ code, field?, path?, count?, message } for fields Unmap accepts but cannot honour, road travel
the routing budget decided, and route polylines that could not be drawn. Empty when there are none.billableShipments: the shipments this request billed (the X-Unmap-Billable-Shipments header).
0 for solvingMode: 'VALIDATE_ONLY', for a shipment re-solved within 24 hours, and when the
header is absent.timeoutClamped and clampedTimeoutSeconds: whether your timeout was over the plan's cap, and
the seconds the solve ran with instead.A failure throws UnmapOptimizeError, which extends UnmapError. status is the HTTP status,
code the gateway's string code (bad_request, rate_limited, quota_exceeded),
retryAfterSeconds comes from Retry-After, googleStatus is Google's status name
(INVALID_ARGUMENT, FAILED_PRECONDITION, RESOURCE_EXHAUSTED) and details is Google's
error.details: a google.rpc.BadRequest lists each field violation, and a PreconditionFailure
lists the mandatory shipments no vehicle can serve. Retries follow the retry option, on by default
for 429, 502, 503 and transport failures. A failed request is never billed. Until Unmap
Optimize is enabled on the gateway, every call is a 404 with code: 'not_found' and no
googleStatus.
Parameters, response shapes, and error bodies are documented at unmap.dev/docs/apis/routing.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.