FedEx - Cancel Shipment
Description
Section titled “Description”This module cancels a previously created shipment in FedEx. It receives the shipment tracking number and makes a PUT request to the /ship/v1/shipments/cancel endpoint with the account number and tracking number. If the cancellation is successful, it returns the tracking number and the CANCELLED status.
Configuration
Section titled “Configuration”| Parameter | Type | Required | Description |
|---|---|---|---|
| credentials_id | credentials | Yes | FedEx credential (provider: fedex) |
| tracking_number | text | Yes | Tracking number of the shipment to cancel |
Credentials
Section titled “Credentials”A fedex type credential is required with the following fields:
- client_id: FedEx API Client ID
- client_secret: FedEx API Client Secret
- account_number: FedEx account number
Output
Section titled “Output”{ "success": true, "tracking_number": "794644790138", "status": "CANCELLED", "message": "Envio FedEx 794644790138 cancelado exitosamente"}Usage Example
Section titled “Usage Example”Basic case
Section titled “Basic case”{ "credentials_id": "mi_credencial_fedex", "tracking_number": "794644790138"}API Used
Section titled “API Used”- Endpoint: PUT
/ship/v1/shipments/cancel - Base: FedEx API (via helper
_fedexHelper) - Documentation: https://developer.fedex.com/api/en-us/catalog.html
- Only shipments that have not yet been picked up can be canceled
- The PUT method (not DELETE) is used for cancellation in FedEx
- The account number is required in addition to the tracking number