container.history.updated

Overview

Fired when a container's event history has been updated but the current milestone status has not changed. This covers backfilled dates, corrected timestamps, newly inserted historical events, and other non-milestone history modifications.

When This Event Fires

The system detects that the container's history array has changed between the previous and current snapshot, but the change did not result in a new milestone (i.e. the top-level status remains the same). Typical scenarios:

  • A carrier retroactively reports a past event (e.g. LOADED date added after the container is already VESSEL_DEPARTED)
  • A timestamp on an existing history event is corrected
  • A new intermediate event is inserted into the timeline
📘

If the history change also introduces a new milestone, container.status.updated fires instead. The two events are mutually exclusive — you will never receive both for the same report cycle.

Payload Structure

{
  "event": "container.history.updated",
  "data": { /* IContainerVoyageResponse — full container snapshot */ },
  "changes": {
    /* history-level diff fields */
  },
  "deliveryAttempt": 1,
  "pendingRetries": 4,
  "sentAt": "2025-07-19T17:00:00.654Z"
}

data object

The full current state of the container, identical to the GET /v1/container/:containerId response. The history array will reflect the updated events.

changes object

Contains the diff of the history fields that changed. The exact shape depends on which history entries were modified, but generally represents the set of fields that differ between the previous and current snapshots.

Common Use Cases

Use CaseHow to Implement
Audit trail maintenanceCapture every history change to maintain a complete audit log of how container timelines evolve over time
Backfilled date trackingDetect when carriers retroactively report events, then update your records with the corrected dates
Data quality monitoringMonitor for frequent history corrections that may indicate data quality issues with a particular carrier
Timeline synchronizationKeep an external system's event timeline in sync with OpenTrack's history array