Skip to main content
HomeBlogGuidesHow a Tracking API Handles Domestic and International Shipments: Handoffs, Customs, Statuses

How a Tracking API Handles Domestic and International Shipments: Handoffs, Customs, Statuses

17TRACK

A tracking API handles domestic and international shipments by collecting events from carriers, matching those events to a shipment, normalizing different status codes, and returning a consistent view to an application. The main difference is that an international parcel usually passes through more carriers, border controls, and data handoffs, so its tracking record can contain more gaps, repeated scans, and customs-related statuses than a domestic shipment.

How a Tracking API Handles Domestic and International Shipments Handoffs

For a retailer, marketplace, logistics team, or developer, the practical goal is not simply to display the latest scan. It is to turn fragmented carrier data into a reliable shipment timeline, identify what requires attention, and communicate an understandable delivery state to the customer.

The basic flow behind a tracking API

A tracking integration normally sits between a business system and one or more carrier data sources. The business system submits a tracking number, carrier identifier, or shipment reference. The API then queries or receives data from the relevant carrier and returns structured shipment information.

  1. Shipment identification: The system determines which carrier is responsible and associates the tracking number with an order, package, or fulfillment record.
  2. Data collection: The API obtains tracking events from the carrier or logistics network. Depending on the integration, updates may be retrieved through polling, delivered through webhooks, or handled through a combination of methods.
  3. Event normalization: Carrier-specific messages are mapped to a common status model, such as information received, in transit, out for delivery, delivered, exception, or returned.
  4. Shipment timeline construction: Individual scans are ordered by event time and location. The application can then show a timeline instead of exposing raw carrier responses.
  5. Business action: The order system, support tool, notification service, or customer-facing page uses the normalized status to trigger an update, investigate a delay, or close the delivery workflow.

This separation matters because carriers do not use one universal vocabulary. One carrier may report a parcel as “accepted,” another as “received at origin facility,” and another as “collected.” These messages may describe similar stages, but they should not be treated as identical without considering the carrier’s event definitions.

How domestic shipment tracking differs

A domestic shipment generally remains within one country and may be handled by one primary carrier from acceptance to delivery. That can make the event sequence relatively straightforward: label created, accepted, processed, in transit, out for delivery, and delivered.

Domestic tracking still has operational complications. A label can be created before the parcel reaches the carrier. A package may receive several facility scans without changing its broad delivery status. A delivery attempt can be recorded even when the parcel is later redirected to a pickup point. Some carriers may also show an estimated delivery date that changes as new operational information arrives.

For these reasons, a tracking API should preserve both the normalized status and the underlying event details. A simple status such as “in transit” is useful for a customer interface, but a support agent may need the last facility, scan time, exception description, and carrier-provided delivery estimate.

Domestic workflows are often easier to automate when the business defines clear rules around event freshness. For example, an order system might notify a customer when the carrier first accepts the parcel, while a support queue might be created only after a shipment has remained without a meaningful update beyond an internally defined threshold. The threshold should be based on the service level and carrier behavior rather than applied uniformly to every shipment.

Why international shipments require more handoff logic

International shipment tracking is more complicated because the parcel may move through an origin carrier, an international logistics provider, customs authorities, an import carrier, and a final-mile delivery network. The party that accepts the parcel at origin may not be the party that delivers it in the destination country.

A typical cross-border timeline can include:

  • Shipping information submitted or label created
  • Origin carrier acceptance
  • Export processing or departure from the origin country
  • International line-haul movement
  • Arrival in the destination country
  • Import customs processing
  • Transfer to a destination or last-mile carrier
  • Local delivery attempt and final delivery

These stages do not always appear as a clean sequence. A carrier may upload an event after the physical movement occurred. Two partners may report the same handoff at different times. A parcel can also continue moving while the public tracking page shows no new event because the next carrier has not yet published a scan.

The API therefore needs to associate related records across handoffs. Matching may depend on the original tracking number, a destination carrier number, a shipment reference, or other data supplied by the logistics network. If a new last-mile tracking number is issued, the application should avoid presenting the shipment as a completely new order. It should connect the records to one customer-facing shipment wherever the available data supports that relationship.

What customs statuses mean

Customs events are not the same as ordinary transportation scans. They describe a regulatory review or import process, not simply movement between facilities. Common messages may refer to arrival in the destination country, declaration processing, clearance, duties or taxes, inspection, missing information, or release to the delivery network.

A status such as “customs clearance” should not automatically be interpreted as a problem. It may indicate routine processing. Conversely, a message requesting documentation, payment, or clarification may require action from the shipper or recipient. The exact meaning depends on the carrier, customs authority, shipment type, and event description.

The U.S. Customs and Border Protection guidance on importing explains that import requirements can depend on the goods, value, documentation, and other circumstances. A tracking API can expose the carrier’s customs-related event, but it does not replace customs advice, determine whether a parcel will be released, or guarantee a clearance time.

For customer communication, a useful implementation separates three concepts:

  • Customs process: The parcel is undergoing import or export processing.
  • Customs exception: The carrier reports a hold, missing information, unpaid amount, or other issue.
  • Customs completed: The shipment has been released or passed to the next logistics stage.

That distinction prevents a vague “delayed” message from hiding an action that the recipient could take. It also reduces the risk of promising that delivery will resume immediately after every customs scan.

How status normalization should work

Status normalization is one of the most valuable functions of a multi-carrier tracking API, but it should be designed as a controlled interpretation layer rather than a replacement for raw data.

A practical data model usually stores:

  • The normalized shipment status
  • The carrier’s original status and description
  • Event timestamp and, where available, timezone
  • Location or facility information
  • Exception category and actionable message
  • Estimated delivery information, if supplied by the carrier
  • Carrier and service identifiers
  • Return, delivery-attempt, or proof-of-delivery details when available

The normalized value should describe the shipment’s operational state, while the raw event preserves context for troubleshooting. A good mapping also distinguishes a status transition from a repeated scan. Several “in transit” events may be useful for a timeline but should not repeatedly trigger the same customer notification.

Applications should also account for status precedence. “Delivered” should generally not be overwritten by a later routine “in transit” event caused by a data correction or a linked handoff record. However, unusual post-delivery events, such as a return or delivery dispute, may need to remain visible as a separate event rather than being discarded. The exact rule should be tested against the carriers and shipment types used by the business.

Polling, webhooks, and update timing

Polling means that an application asks the API for changes at intervals. It is easy to understand, but frequent polling can create unnecessary requests and may still miss the most appropriate timing for a customer notification.

Webhooks allow a service to send an update to an application when a tracked shipment changes. They are useful for event-driven workflows such as sending a delivery notification, updating an order page, or creating an exception task. A production implementation should still verify webhook signatures or authentication requirements, handle duplicate notifications, retry failed deliveries safely, and reconcile webhook data with later tracking queries.

Neither method guarantees that a carrier will publish an event immediately after a physical movement. A delay in the API response may reflect a delay in carrier data, a handoff between networks, a weekend or holiday operating pattern, or a shipment that has not received its next scan. The application should display the last known event time and avoid converting every period without a new scan into a confirmed delivery failure.

Designing a reliable domestic and international workflow

A robust implementation begins with carrier-aware data handling rather than a single universal rule. Before going live, the team should test representative shipments for domestic delivery, cross-border delivery, customs holds, failed delivery attempts, returns, and destination-carrier handoffs.

  1. Confirm carrier identification: Do not rely only on the first few characters of a tracking number when multiple carriers use similar formats.
  2. Store raw and normalized events: Keep the carrier message available for support and auditing.
  3. Use shipment-level identity: Link replacement or last-mile tracking numbers to the original order when the relationship is verified.
  4. Separate delay from exception: A lack of a new scan is not always evidence of a carrier exception.
  5. Make customs messages actionable: Tell the user when a carrier reports a document, payment, or contact requirement, while avoiding unsupported legal or delivery promises.
  6. Make notifications idempotent: A repeated event should not send duplicate emails or repeatedly change the order state.
  7. Monitor data quality: Track invalid numbers, stale updates, unmapped statuses, webhook failures, and unexpected carrier changes.

17TRACK’s official Tracking API documentation is a relevant starting point for teams evaluating multi-carrier tracking integration. Its API materials describe the product and developer documentation, while the implementation decision should still be validated against the carriers, destinations, shipment types, and update behavior required by the specific business.

What a tracking API can and cannot tell you

A tracking API can consolidate carrier events and make shipment progress easier to use in an order management, support, or customer-experience workflow. It can help identify the last known location, show a customs event, expose a delivery attempt, and provide a consistent interface across carriers.

It cannot independently verify the physical location of every parcel, force a carrier to scan an item, guarantee a delivery date, clear customs, or resolve a missing shipment without carrier and logistics investigation. The confidence of a status depends on the quality, timeliness, and completeness of the underlying carrier data.

The most reliable design treats tracking as an evidence-based operational signal. Show the latest confirmed event, retain its source and time, explain exceptions in plain language, and give support teams enough detail to investigate the shipment without exposing confusing raw data to every customer.

FAQ

Does domestic tracking use a different API from international tracking?

Not necessarily. A multi-carrier tracking API may support both through the same integration pattern, but the carrier data, event sequence, handoffs, and customs requirements can differ. The application should use carrier-aware mappings rather than assuming that domestic and international events have identical meanings.

Why can an international package stop updating after export?

The parcel may be moving between logistics partners, awaiting the next carrier scan, undergoing transport or customs processing, or waiting for data to be exchanged between networks. A tracking gap is a signal to monitor the shipment, not automatic proof that it is lost.

Does a customs status mean the recipient must take action?

No. Some customs events describe routine processing. Action may be required only when the carrier reports a specific request, such as documentation, payment, or additional information. The carrier or relevant customs authority is the appropriate source for shipment-specific instructions.

Should an application display the carrier’s original status?

Usually, yes, at least in support or diagnostic views. A normalized status improves consistency across carriers, while the original description preserves context. Customer-facing interfaces can use plain language and provide the carrier detail when it helps explain an exception.

How should duplicate tracking events be handled?

Store the event for auditability, but use a stable event identifier or a carefully designed combination of carrier, timestamp, location, and description to prevent duplicate notifications. Repeated scans should not repeatedly trigger the same order or customer action.

Sources