UPS - Cancel Shipment
Description
Section titled “Description”This module cancels a previously created shipment in UPS. It receives the Shipment Identification Number and makes a DELETE request to the /api/shipments/v1/shipments/cancel endpoint. If the cancellation is successful, it returns the shipment number, the VoidShipmentResponse status, and a confirmation message.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | UPS credential (provider: ups) |
| shipment_identification_number | text | Yes | Shipment identification number to cancel |
Credentials
Section titled “Credentials”A ups type credential is required with the following fields:
- client_id: UPS API Client ID
- client_secret: UPS API Client Secret
Output
Section titled “Output”{ "success": true, "shipment_identification_number": "1Z999AA10123456784", "status": "CANCELLED", "message": "Envio UPS 1Z999AA10123456784 cancelado exitosamente"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi_credencial_ups", "shipment_identification_number": "1Z999AA10123456784"}API Used
Section titled “API Used”- Endpoint: DELETE
/api/shipments/v1/shipments/cancel - Base: UPS API (via helper
_upsHelper) - Documentation: https://developer.ups.com/api/reference
- Only shipments that have not yet been picked up by UPS can be canceled
- The status is obtained from VoidShipmentResponse.Status.Description
- The operation is irreversible once completed