跳到主要内容
Docs/Features/Awb Tracking

AWB & Container Tracking

Track Air Waybills, Bills of Lading, container numbers, and parcel trackings across 700+ carriers from a single timeline. Powered by 17track under the hood, surfaced as a tenant-native shipment object.

![AWB Tracking](/docs-img/awb-tracking.png)

What It Does

  • Resolves a tracking number to the right carrier automatically (no carrier picker).
  • Pushes status events to your webhook so you can re-engage the buyer at "out for delivery" / "exception" / "delivered".
  • Posts a Slack/DingTalk/Lark alert when a shipment hits an exception status.
  • Calculates expected vs actual transit time per lane so you can flag chronically slow carriers.
  • When to Use

    The moment your forwarder hands you a Master AWB or a BL number. Add it to the corresponding order, and Anvil owns the rest of the customer-comms timeline until "Delivered".

    Adding a Shipment

    curl -X POST https://api.anvilhk.com/api/v1/shipments \
      -H "Authorization: Bearer $ANVIL_KEY" \
      -H "X-Tenant-ID: $TENANT" \
      -H "Content-Type: application/json" \
      -d '{
        "trackingNumber": "176-12345678",
        "carrier": "auto",
        "orderId": "ord_01H...",
        "expectedDelivery": "2026-05-15"
      }'

    Pass "carrier": "auto" to let 17track detect; otherwise pick one of the codes in GET /api/v1/carriers.

    Webhooks

    Subscribe to shipment.event_added, shipment.exception, and shipment.delivered. Each payload includes:

  • `shipmentId`, `trackingNumber`, `carrier`.
  • The new event (`occurredAt`, `status`, `location`, `description`).
  • A `predictedDelivery` timestamp updated whenever the carrier provides new data.
  • API Endpoints

  • `GET /api/v1/carriers` — full directory (no tenant scope, just auth).
  • `POST /api/v1/shipments` — register a tracking number.
  • `GET /api/v1/shipments` — list with filters (`status`, `orderId`, `carrier`).
  • `GET /api/v1/shipments/:id` — full event timeline.
  • `POST /api/v1/shipments/:id/refresh` — force a poll (Pro+ only).
  • Pricing & Limits

    PlanTracked / monthAuto-pollRefresh on demand
    Starter100every 6hNo
    Pro2,000every 1hYes (10/day)
    Enterpriseunlimitedevery 15mUnlimited

    Gotchas

  • 17track returns events in the carrier's local time. Anvil normalises to UTC; if you display them, render in the buyer's timezone.
  • Some Chinese express carriers stop publishing events after "Out for delivery". Anvil marks those as `STALE` after 72 hours of no events and triggers a soft alert.
  • Container tracking (BL) is supported for the top 12 ocean carriers. For BLs from minor carriers we fall back to ETA-only mode.