Skip to content
Documentation sections

Auto-removal policy

A shipment monitored by a Safecube webhook endpoint stays active until it is removed manually. Shipment numbers, and container numbers above all, can be reused quickly, so Safecube also removes shipments automatically: this prevents you from receiving data that is no longer relevant, such as data from a newer voyage of the same container. Each automatic removal triggers the shipment.auto.removed event, whose payload contains the reason for the removal.

Case 1: shipment delivered and inactive for more than 7 days

Safecube removes a shipment automatically when all the following conditions are met:

  • the shippingStatus of the shipment is DELIVERED;
  • a proof of delivery (POD) is detected in the data;
  • every container event is at least 7 days old.

For example:

  • a shipment left in IN_TRANSIT by the shipping line is not removed automatically;
  • if a new event dated 3 days ago is received, the shipment keeps being monitored for at least 4 more days.

Case 2: new voyage detected

Safecube also removes a shipment when it detects that a new voyage has started, which is when all the following conditions are met:

  • the date at the new port of loading (POL) is later than the date at the previous port of discharge (POD);
  • the UN/LOCODE of the new POL differs from the previous one, or both are null;
  • the UN/LOCODE of the new POD differs from the previous one, or both are null.

This makes sure you only receive data about the current voyage, not outdated or unrelated shipment activity.

Purpose of the policy

The auto-removal rules are not designed to limit the tracking time of your shipments or to reduce billing. They prevent webhook updates from future, unrelated voyages that use the same shipment or container number.

To monitor your tracked shipments, use GET /easy-shipment. To remove shipments manually, use DELETE /easy-shipment. The Shipment usage page explains when to remove shipments yourself.