Last updated

Delete a Detention and Demurrage Optimization Shipment

Deleting Detention and Demurrage Optimization shipments follows the standard ocean shipment deletion process. The deletion method depends on your original shipment type:

This will stop all tracking including both standard ocean events and enhanced Detention and Demurrage terminal tracking with cost monitoring.

Deleting a Detention and Demurrage optimization shipment will stop both standard ocean tracking and enhanced terminal tracking, including cost monitoring.

Requirements

Have the following information:

  • Master Shipment ID (this is the id returned in the 200 OK response during shipment creation).

Workflow

Complete these steps:

  1. Prepare a DELETE request to /api/v4/shipments/{shipmentId}/tracking.
  2. Add the Master Shipment ID.
  3. Submit the request.

Expected Response

The request is successfully submitted and confirmed when a 204 No Content response is received.

Detention and Demurrage optimization shipments follow the same related shipment deletion rules:

  • Container shipments must be deleted before the master booking/BOL shipment
  • Use the relatedShipments array from GET requests to identify containers that need deletion
  • Delete each related container shipment individually before deleting the master shipment

Errors

Error handling follows the same pattern as standard ocean shipments:

  • 400 Invalid request
  • 401 Invalid or missing credentials
  • 403 User not authorized to perform this operation
  • 404 Not Found
  • 409 Conflict - Related container shipments must be deleted first

Example Deletion Sequence

For a master shipment with related containers:

  1. GET /api/v4/shipments/{masterShipmentId}/tracking to identify related shipments
  2. DELETE /api/v4/shipments/{containerShipmentId1}/tracking for each container
  3. DELETE /api/v4/shipments/{containerShipmentId2}/tracking for each container
  4. DELETE /api/v4/shipments/{masterShipmentId}/tracking for the master shipment

For complete deletion workflows and error handling, refer to the standard Ocean deletion guide. All procedures apply to Detention and Demurrage Optimization shipments.

See Error Response Codes for more information on error meanings.