Hach - Shipment failed - Gross weight

Created by Carrie Sobers, Modified on Mon, 20 Oct at 10:49 AM by Carrie Sobers

Error: #/content/exportDeclaration/lineItems/60/weight/grossValue: 0 is not greater or equal to 0.001

❗ Issue

Shipment failed due to the following validation error:

shell
CopyEdit
#/content/exportDeclaration/lineItems/60/weight/grossValue: 0 is not greater or equal to 0.001

This error occurs when the gross_weight value in the export declaration payload is 0, which is below the required minimum value of 0.001.

? Root Cause

The gross_weight value for a specific line item (lineItems/60) is set to 0, violating the minimum requirement of 0.001. This typically occurs when:

  • The gross weight was not correctly set in the system.

  • Data is missing in the Delivery_lineitemdata JSON payload.

? Troubleshooting Steps

Step 1: Inspect the API Payload

  1. Open browser dev tools.

  2. Go to the Network tab and filter by Jobapi.

  3. Inspect the payload.

  4. Look for gross_weight under the failed lineItems entry.

    ✅ Confirm whether the gross_weight is 0 or missing.

Step 2: Identify Affected Line Item in Database

2.1 Search in Delivery_lineitem Table

  • Locate the correct SKU (from the payload or UI).

  • Query the table to find the Delivery Line Item ID:

    sql
    CopyEdit
    SELECT id FROM Delivery_lineitem WHERE sku = '<SKU>';

2.2 Search in Delivery_lineitemdata Table

  • Using the id retrieved above, search for the related JSON data:

    sql
    CopyEdit
    SELECT * FROM Delivery_lineitemdata WHERE delivery_lineitem_id = '<ID>';

Step 3: Update gross_weight in JSON

  • Inspect the JSON structure for the weight object.

  • Update gross_weight to a valid value (>= 0.001), for example:

    json
    CopyEdit
    { "weight": { "grossValue": 0.5 } }
  • Run the SQL update query:

    sql
    CopyEdit
    UPDATE Delivery_lineitemdata SET json_data = jsonb_set(json_data, '{weight,grossValue}', '0.5'::jsonb) WHERE delivery_lineitem_id = '<ID>';

? Validation

After updating the value:

  1. Retry the shipment or reprocess the job.

  2. Ensure the payload now includes a valid gross_weight (≥ 0.001).

  3. Confirm the shipment is successful and error-free.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article