GetPackageLabel Method
Generates a shipping label for the specified package.
Syntax
int GetPackageLabel(int iIndex);
Remarks
When this method is called, the following properties must have been set:
- FedExServer (required)
- FedExDeveloperKey (required)
- FedExPassword (required)
- FedExAccountNumber (required)
- FedExMeterNumber (required)
- ShipDate (required)
- ShipTime (optional)
- ServiceType (required)
- PackageType (required)
- DropoffType (optional)
- TotalWeight (optional; applicable to international shipments only)
- WeightUnit (required; defaults to LB)
- SizeUnit (required; defaults to IN)
- InsuredValue (optional)
- SenderContact (required)
- SenderAddress (required)
- RecipientContact (required)
- RecipientAddress (required)
- Payor (required)
- ShipmentSpecialServices (optional)
- DutiesPayor (required for international shipments only)
- Packages (required)
- LabelImageType (required)
- CommercialInvoice (required if Documents is set to False; applicable to international shipments only)
- Commodities (required, regardless of the Documents value; applicable to international shipments only)
- BrokerType (optional)
- BrokerContact (optional)
- BrokerAddress (optional)
- Documents (optional)
- BlockVisibility (optional)
In express international shipments, at least one commodity line item has to be included in the request. However, the customer has to print out its own Commercial Invoice (a required document for international shipments). The commodity information you provide in your transaction is forwarded to customs electronically at the time the shipping label is generated. Commodity information can be provided via the Commodities (required, regardless of the Documents value).
This method fills in the following properties:
- PackageTrackingNumber for each package included in the shipment;
- PackageShippingLabel for each package included in the shipment;
- PackageNetCharge for each package included in the shipment;
- PackageBaseCharge for each package included in the shipment;
- PackageTotalDiscount for each package included in the shipment;
- PackageTotalSurcharges for each package included in the shipment;
- DeliveryDate (applicable to the whole shipment);
- TotalNetCharge (applicable to the whole shipment);