DHL Express - Cancel Shipment
Description
Section titled “Description”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.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | DHL Express credential (provider: dhl_express) |
| shipment_id | text | Yes | Shipment number to cancel |
Credentials
Section titled “Credentials”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/).
Output
Section titled “Output”{ "success": true, "shipment_id": "1234567890", "status": "CANCELLED", "message": "Envio DHL 1234567890 cancelado exitosamente"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi_credencial_dhl", "shipment_id": "1234567890"}API Used
Section titled “API Used”- Endpoint: DELETE
/shipments/{shipment_id} - Base: DHL Express API (via helper
_dhlHelper) - Documentation: https://developer.dhl.com/api-reference/dhl-express-mydhl-api
- 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