Commodities Property
Collection of commodity items of the shipment.
Syntax
[VB.NET] Public Property Commodities As CommodityDetailList
[C#] public CommodityDetailList Commodities {get;}
Remarks
This collection contains details of the commodities associated with the shipment. At least one commodity must be added for international shipments.
For each idx = 0 to CommodityCount - 1, this must be set to an instance of the CommodityDetail type, which will contain specific information about a commodity item contained in the shipment. See the CommodityDetail type for more information.
The following fields are applicable for each commodity item:
field | Required? |
Description | Yes |
FreightClass | Conditional, required only for ground shipments |
FreightIsHazardous | Conditional, required if hazardous materials are contained in the shipment |
FreightNMFC | No |
FreightNMFCSub | Conditional, required if FreightNMFC is specified |
FreightPackagingType | Yes |
NumberOfPieces | Yes |
Value | Yes |
Weight | Yes |
Note: The WeightUnit configuration setting may be set to specify KGS instead of LBS for the weight unit.
For instance, to add a commodity:
component.Commodities[0].Weight = 1500; component.Commodities[0].FreightClass = "92.5"; component.Commodities[0].FreightNMFC = "116030"; component.Commodities[0].FreightNMFCSub = "1"; component.Commodities[0].NumberOfPieces = 1; component.Commodities[0].Description = "Test Items";