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:
- For Port to Port Shipments: Follow Ocean Port to Port shipment deletion
- For RoRo Shipments: Follow RoRo shipment deletion
- For Extended Ocean: Follow Extended Ocean deletion workflows
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
idreturned in the200 OKresponse during shipment creation).
Workflow
Complete these steps:
- Prepare a
DELETErequest to /api/v4/shipments/{shipmentId}/tracking. - Add the Master Shipment ID.
- Submit the request.
Expected Response
The request is successfully submitted and confirmed when a 204 No Content response is received.
Related Shipments Handling
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
relatedShipmentsarray 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 request401 Invalid or missing credentials403 User not authorized to perform this operation404 Not Found409 Conflict- Related container shipments must be deleted first
Example Deletion Sequence
For a master shipment with related containers:
- GET
/api/v4/shipments/{masterShipmentId}/trackingto identify related shipments - DELETE
/api/v4/shipments/{containerShipmentId1}/trackingfor each container - DELETE
/api/v4/shipments/{containerShipmentId2}/trackingfor each container - DELETE
/api/v4/shipments/{masterShipmentId}/trackingfor 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.