Shipping Integrator V5 - Online Help
Shipping Integrator V5
Questions / Feedback?

CancelShipment Method

Cancels a multi-package (MPS) shipment by deleting it from the shipping log.

Syntax

[VB.NET]
Public Sub CancelShipment(ByVal MasterTrackingNumber As String, ByVal TrackingIdType As Integer)
[C#]
public void CancelShipment(string masterTrackingNumber, int trackingIdType);

Remarks

To cancel a MPS shipment, a delete shipment request should be sent to FedEx Server. This can be done by calling CancelShipment method.

The TrackingNumber parameter that identifies the shipment to be canceled and deleted from the shipping log, is the MasterTrackingNumber assigned to a MPS shipment by FedEx server when either the GetPackageLabel or GetShipmentLabels method was called.

The TrackingIdType parameter identifies the service that was used to ship the packages. Possible values are:

Value Id Type
0 (default) FedEx Express
1 FedEx Ground
2 USPS

Delete requirements for MPS shipments are:

  • For Express International MPS shipments: if you enter the master tracking number, all packages associated with this shipment are deleted. If you attempt to delete one package in a shipment, the label sequence number will be incorrect and you may experience clearance issues in customs if you cannot account for all packages in the shipment.
  • For Ground International MPS shipments: if you enter any tracking number associated with the master shipment, all packages associated with the shipment are deleted.
  • For Ground U.S. MPS shipments: you may enter a single tracking number to delete one package in the shipment. Since Ground U.S. MPS labels are not associated with sequential numbers (1 of 2, 2 of 2), you do not need to delete the entire shipment.
  • For Express C.O.D. MPS shipments: enter any tracking number in the shipment to delete the entire shipment.
  • For Ground C.O.D. MPS shipments: you must delete each individual package.

The following properties can be set prior to calling this method:

These should be the values associated with the designated shipment to be canceled (i.e., the values used when this shipping request was made).

If you are unable to delete the shipment, you will receive an error condition. This error condition means that:

  • For Ground shipments, a close has already been performed for that MasterTrackingNumber.
  • For Express shipments, the package has already been tendered to FedEx.
  • You have entered an invalid AccountNumber or MeterNumber.
  • The AccountNumber and MeterNumber, while valid, are not associated with one another or with the MasterTrackingNumber.
  • You entered an invalid TrackingNumber. This applies to Ground shipments only. Express accepts any number with the correct amount of digits.

 
 
Copyright (c) 2017 /n software inc. - All rights reserved.
Build 5.0.6240.0