GetPackageLabel Method
Generates a shipping label for the specified package.
Syntax
procedure GetPackageLabel(PackageIndex: Integer);Remarks
When this method is called, the following properties must have been set:
- CanadaPostAccount (required)
- GroupId (required if CanadaPostContractId is set)
- Packages (required)
- PaymentMethod (required if CanadaPostContractId is set)
- RecipientContact (required)
- RecipientAddress (required)
- SenderContact (required)
- SenderAddress (required)
- ServiceType (required)
- ShipmentSpecialServices (optional)
To print out the PackageShippingLabel, you can save it to the PackageShippingLabelFile file in LabelImageType format.
In order to print a label and manifest to be tendered to a Canada Post driver, you must:
- Assign each shipment a GroupId and then call GetPackageLabel for each package in the shipment.
- Call TransmitShipments with the GroupId for the shipment.
- Call GetManifest for each manifest in ManifestDetails.
Note that this only applies when submitting a contract shipment (ie. CanadaPostContractId is set).