The v2 shipping API is a PRO-gated read + webhook-subscription surface on top of WorldMonitor’s chokepoint registry and AIS tracking data.Documentation Index
Fetch the complete documentation index at: https://worldmonitor.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
All v2 shipping endpoints require
X-WorldMonitor-Key (server-to-server). Browser origins are not trusted here — validateApiKey runs with forceKey: true.Route intelligence
GET /api/v2/shipping/route-intelligence
Scores a country-pair trade route for chokepoint exposure and current disruption risk.
Query parameters:
| Param | Required | Description |
|---|---|---|
fromIso2 | yes | Origin country, ISO-3166-1 alpha-2 (uppercase). |
toIso2 | yes | Destination country, ISO-3166-1 alpha-2 (uppercase). |
cargoType | no | One of container (default), tanker, bulk, roro. |
hs2 | no | 2-digit HS commodity code (default 27 — mineral fuels). |
200):
disruptionScoreis 0-100 on the primary chokepoint for the route (higher = more disruption).warRiskTieris one of theWAR_RISK_TIER_*enum values from the chokepoint status feed.bypassOptionsare filtered to those whosesuitableCargoTypesincludescargoType(or is unset).
Cache-Control: public, max-age=60, stale-while-revalidate=120.
Errors:
| Status | Cause |
|---|---|
| 400 | fromIso2 or toIso2 missing/malformed |
| 401 | API key required or invalid |
| 403 | PRO subscription required |
| 405 | Method other than GET |
Webhook subscriptions
POST /api/v2/shipping/webhooks
Registers a webhook for chokepoint disruption alerts. Returns 201 Created.
Request:
callbackUrl— required, HTTPS only, must not resolve to a private/loopback address (SSRF guard at registration).chokepointIds— optional. Omitting or passing an empty array subscribes to all registered chokepoints. Unknown IDs return400.alertThreshold— numeric 0-100 (default50). Values outside that range return400 "alertThreshold must be a number between 0 and 100".
201):
subscriberId—wh_prefix + 24 hex chars (12 random bytes).secret— raw 64-char lowercase hex (32 random bytes). There is nowhsec_prefix. Persist it — the server never returns it again except on rotation.- TTL: 30 days on both the subscriber record and the per-owner index set. Only re-registration refreshes both, via an atomic pipeline (
SETrecord withEX,SADD+EXPIREon the owner index).rotate-secretandreactivaterefresh the record’s TTL only — they do not touch the owner-index set’s expiry, so the owner index can expire independently if a caller only ever rotates or reactivates within a 30-day window. Re-register to keep both alive. - Ownership is tracked via SHA-256 of the caller’s API key (never secret — stored as
ownerTag).
X-WorldMonitor-Key (forceKey: true) + PRO. Returns 401 / 403 otherwise.
GET /api/v2/shipping/webhooks
Lists the caller’s registered webhooks (filtered by the SHA-256 owner tag of the calling API key).
secret is intentionally omitted from list and status responses.
GET /api/v2/shipping/webhooks/{subscriberId}
Status read for a single webhook. Returns the same record shape as in GET /webhooks (no secret). 404 if unknown, 403 if owned by a different API key.
POST /api/v2/shipping/webhooks/{subscriberId}/rotate-secret
Generates and returns a new secret. The record’s secret is replaced in place; the old secret stops validating immediately.
POST /api/v2/shipping/webhooks/{subscriberId}/reactivate
Flips active: true on the record (use after investigating and fixing a delivery failure that caused deactivation).
Delivery format
callbackUrl before each send and re-checks against PRIVATE_HOSTNAME_PATTERNS to mitigate DNS rebinding. Delivery is at-least-once — consumers must handle duplicates via X-WM-Delivery-Id.