container.demurrage.updated

Overview

Fired when demurrage-related fields on a container change. This includes updates to demurrage amounts owed, last free day (LFD), line last free day, detention last free day, and demurrage at rail stations.

When This Event Fires

The system detects a difference in demurrage-related fields between the previous and current container snapshot. Common triggers include:

  • Last free day (port or line) is reported or changes
  • Demurrage amount owed at the port changes
  • Demurrage amount owed at a rail facility changes
  • Detention last free day is reported or changes
  • Rail last free day changes

Payload Structure

{
  "event": "container.demurrage.updated",
  "data": { /* IContainerVoyageResponse — full container snapshot */ },
  "changes": {
    "lastFreeDay": {
      "previous": "2025-07-15T00:00:00.000Z",
      "current": "2025-07-18T00:00:00.000Z"
    },
    "demurrageOwedAtPortDecimal": {
      "previous": 0,
      "current": 275.50
    }
  },
  "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.

changes object

Contains { previous, current } pairs for demurrage fields that changed. Possible fields include:

FieldDescription
lastFreeDayPort last free day
lineLastFreeDayLine (carrier) last free day
detentionLastFreeDayDetention last free day
lastFreeDayAtRailStationLFD at the rail facility
demurrageOwedAtPortDecimalDemurrage owed at the port (in dollars)
demurrageIncurredDecimalTotal demurrage incurred (in dollars)
demurrageOwedAtRailStationDemurrage owed at rail facility
demurrageIncurredAtRailStationDemurrage incurred at rail facility

Common Use Cases

Use CaseHow to Implement
LFD alertWhen changes.lastFreeDay is present, alert operations teams about the new LFD so they can plan pickup accordingly
Demurrage cost trackingTrack changes to demurrageOwedAtPortDecimal and demurrageOwedAtRailStation to maintain real-time cost visibility
Demurrage risk assessmentCompare the LFD with the current date and container status to assess demurrage exposure before it accrues
Accounting integrationPush demurrage amounts to your accounting or ERP system when charges are incurred
Drayage prioritizationPrioritize containers approaching their LFD to minimize demurrage costs