Skip to content
Navo24Navo24

快速开始

快速开始

集装箱追踪 API 快速入门:两分钟内无需密钥完成首次 Navo24 调用,然后获取 API 密钥并追踪一票货物。

Navo24 是可直接调用的货运数据服务:集装箱和空运单追踪、船期与准班率、即期运价以及装载规划。每个产品都提供 REST API,大多数还提供 MCP 服务器,全部通过同一个 Bearer 密钥访问。

无需账号即可调用

查看真实数据最快的方式,是调用集装箱追踪 API 的公开端点。它不需要密钥。

curl -X POST https://api.trackingmcp.com/v1/track/public \
  -H "Content-Type: application/json" \
  -d '{"reference":"MEDU1234562"}'

返回结果包含标准化的状态、船舶、里程碑事件,以及一个会标明是否仍为预测值的 ETA:

{
  "ok": true,
  "data": {
    "identifier": "MEDU1234562",
    "identifier_type": "container_id",
    "carrier_code": "MSCU",
    "carrier_name": "MSC",
    "status": "in_transit",
    "eta": "2026-07-03T06:00:00Z",
    "eta_is_estimated": true,
    "origin": "Ningbo",
    "destination": "Rotterdam",
    "vessel": { "name": "MSC TERESA", "lat": null, "lng": null },
    "events": [
      {
        "description": "Loaded on vessel",
        "location": "Ningbo",
        "event_code": "LOAD",
        "unlocode": "CNNGB",
        "datetime": "2026-06-18T22:10:00Z",
        "actual": true
      }
    ]
  }
}

以下四个字段承载了大部分关键信息:

  • identifier_type 是我们判定的参考号实际类型,可能与你的猜测不同。
  • eta_is_estimated 在 ETA 为预测值时为 true,成为实际到港时间后为 false,完全没有 ETA 时为 null。单独一个日期并不代表承诺。
  • 事件中的 actual 为 true 表示已发生,为 false 表示计划中。切勿把计划中的动作当作事实。
  • 当承运人提供的信息无法解析时,carrier_code、origin、destination 和 unlocode 会返回 null,而不是猜测一个值。

公开端点按 IP 限流,仅适合快速查询。任何涉及批量货物的场景都需要密钥。

获取 API 密钥

  1. 在 trackingmcp.com 注册。
  2. 打开开发者设置并生成密钥。密钥带有产品前缀,例如追踪产品为 tmcp_。
  3. 在每个需要认证的请求中以 Bearer 令牌的形式发送它。
curl https://api.trackingmcp.com/v1/containers/summary \
  -H "Authorization: Bearer tmcp_YOUR_API_KEY"
{
  "ok": true,
  "data": {
    "total_active": 128,
    "exceptions": 6,
    "arriving_this_week": 14,
    "demurrage_risk_usd": 4820.5,
    "containers": []
  }
}

开始追踪货物

带密钥的接口需要两个必填字段:identifier 和 identifier_type。类型取值为 container_id、bill_of_lading 或 booking 之一。

curl -X POST https://api.trackingmcp.com/v1/containers \
  -H "Authorization: Bearer tmcp_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"identifier":"MEDU1234562","identifier_type":"container_id"}'
{
  "ok": true,
  "data": {
    "id": "8f1c2d4e-6a3b-4f52-9c70-11ab22cd33ef",
    "identifier": "MEDU1234562",
    "status": "in_transit",
    "carrier_code": "MSCU",
    "source": "direct_carrier"
  }
}

请保存好 id。它是一个 UUID,其他所有集装箱端点都以它而非箱号作为键。如果某个箱子已被接受但首次未能解析,会返回 "status": "unknown" 和一个 warning,并在后续轮询运行后几分钟内补全数据。

在产品接受系列通用凭证的情况下,同一个密钥可在整个产品系列中使用。有关前缀和请求头的完整说明,请阅读身份认证指南。

下一步