UPS how to set UnitOfMeasurement? #67
-
After calling GetRatesAsync(), I receive the following error message: 111057 Invalid Unit of Measurement for the given country How can the UnitOfMeasurement for packages be set? The following instructions should be possible: shipment.ShipmentTotalWeight.UnitOfMeasurement.Code = "KGS"; Or when creating the packages: var package = new Package( 12, 12, 12, 35, 150, "CM", "KGS" ); How can the error be fixed, or how can the correct units be used? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
What country do you ship from/to in the request? |
Beta Was this translation helpful? Give feedback.
-
Starting from v2.2.0, the UPS provider sends kg/cm dimensions for shipments from outside the US. Package dimensions are automatically converted to the necessary system of measurement. Along with the existing Packages class (accepting values for lbs and inches), a new PackageKgCm class is introduced for dimensions in kg and cm. Both classes can be used for shipments. |
Beta Was this translation helpful? Give feedback.
Starting from v2.2.0, the UPS provider sends kg/cm dimensions for shipments from outside the US. Package dimensions are automatically converted to the necessary system of measurement. Along with the existing Packages class (accepting values for lbs and inches), a new PackageKgCm class is introduced for dimensions in kg and cm. Both classes can be used for shipments.