Skip to content

DHL Express - Cancel Shipment

This module cancels a previously created DHL Express shipment. It receives the shipment ID and makes a DELETE request to the /shipments/{shipment_id} endpoint. If the cancellation is successful, it returns the shipment ID and the CANCELLED status.

ParameterTypeRequiredDescription
credentials_idcredentialsYesDHL Express credential (provider: dhl_express)
shipment_idtextYesShipment number to cancel

A dhl_express type credential is required with the following fields:

  • api_key: DHL Express API Key

Credentials are obtained from the DHL developer portal (https://developer.dhl.com/).

{
"success": true,
"shipment_id": "1234567890",
"status": "CANCELLED",
"message": "Envio DHL 1234567890 cancelado exitosamente"
}
{
"credentials_id": "mi_credencial_dhl",
"shipment_id": "1234567890"
}
  • Only shipments that have not yet been picked up by DHL can be canceled
  • Once canceled, the tracking number will be invalidated
  • The operation is irreversible