Show / Hide Table of Contents

    400 - Invalid Weight Unit

    • v2
    • validation
    • pro
    • api
    • shipments
    • error
    • 400
    Tip

    The invalid_weight_unit error code is returned if you provide an invalid or unrecognised value for unit when specifying the weight of an object such as shipment_contents.

    This error code will be returned, for example, if you provide an invalid unit value when specifying the weight of shipment_contents:

    {
      "contents": [
        {
          "weight": {
            "value": 2.33,
            "unit": "cm"
          },
          //other properties
        }
      ]
    }
    

    The valid values for unit when specifying weight include:

    • kg - kilograms
    • lb - pounds
    Warning

    When creating or updating a shipment, all unit values for all weight objects must be the same for all shipment_contents. It is not valid to mix unit values in a single shipment.

    Back to top Copyright © Sorted Group 2023. Generated by DocFX