Register at api-portal.hlag.com, create an application, and subscribe to the Tracking and Container Live Position API products; a sandbox environment is available for testing.
Authenticate using OAuth 2.0 with Bearer tokens; Hapag-Lloyd also supports static API keys and DCSA cryptographic secrets depending on the product subscribed.
Call the Tracking API with a container number or booking reference to retrieve shipment events, equipment status, and transport legs; parse the DCSA-standard event structure.
For real-time vessel position, subscribe to the Container Live Position product; note that Live Position tracking is priced per container per voyage for Merchant Haulage shipments and is included for Carrier Haulage.
Configure a callback URL to receive push notifications for shipment and equipment events; validate that your callback correctly acknowledges delivery to avoid subscription suspension.
Cross-reference Hapag-Lloyd event codes with DCSA T&T v2.2 event type definitions to ensure your event processor handles standard codes portably across carriers.
Known gotchas
The Hapag-Lloyd API portal is labeled BETA; Hapag-Lloyd advises trusting their website data over API data until subsequent releases stabilise the API event feed.
Live Position data for Merchant Haulage carries a per-container fee; budgeting for this cost is required before enabling live tracking at scale.
Hapag-Lloyd implements DCSA Track and Trace standard event codes, but may emit carrier-specific supplemental events; build a fallback for unknown event types to avoid processing failures.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp