container.demurrage.updated

Overview

Fired when demurrage amounts on a container change. This covers demurrage owed and demurrage incurred, at the port and at the rail facility.

Last free day changes (lastFreeDay, lineLastFreeDay, lastFreeDayAtRailStation) are not part of this event. They are delivered in container.itinerary.updated. The current values are always available in data.

When This Event Fires

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

  • Demurrage amount owed at the port changes
  • Demurrage amount incurred changes
  • Demurrage amount owed at a rail facility changes
  • Demurrage amount incurred at a rail facility changes

Payload Structure

{
  "event": "container.demurrage.updated",
  "data": { /* IContainerVoyageResponse: full container snapshot */ },
  "changes": {
    "demurrageOwedAtPortDecimal": {
      "previous": null,
      "current": 27550
    },
    "demurrageOwedAtRailStation": {
      "previous": 100,
      "current": 175.5
    }
  },
  "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
demurrageOwedAtPortDecimalDemurrage owed at the port, in cents
demurrageIncurredDecimalTotal demurrage incurred, in cents
demurrageOwedAtRailStationDemurrage owed at the rail facility, in dollars
demurrageIncurredAtRailStationDemurrage incurred at the rail facility, in dollars

When a value is 0 or not reported, it appears as null.

Common Use Cases

Use CaseHow to Implement
LFD alertSubscribe to container.itinerary.updated and alert operations teams when changes.lastFreeDay is present, 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

Did this page help you?