Non physical products created with REST API are requiring shipping by default

egilmore533
Visitor
2 0 0

Hello, I'm trying to work on my private app for Shopify to set my digital products to not require shipping. I know the "requires_shipping" field used to be on the Product Variant Resource, but now it is on the InventoryItem Resource associated with the Variant.

 

However, when I try to update the InventoryItem using the API to set "requires_shipping" to false I get a 422 error stating the following: "422 [reason phrase] Unprocessable Entity". I know my code is working properly as I'm able to update the InventoryItem "sku" field but when I try to update this "shipping_required" field it gives me the above error.

 

The body of the unprocessable request:

{

 

    "inventory_item": {
        "id": <inventory_id>,
        "requires_shipping": false,
    }

}

 

the body of the working request:

{

    "inventory_item": {
        "id": <inventory_item_id>,
        "sku": "test",
    }

}

 

Am I maybe looking at the wrong Resource? Should I be looking for something like "Is this product physical" instead of "requires_shipping"? Is there a way for me to create products going forward so they are marked as "Non physical" in some other way than this InventoryItem? Any help would be greatly appreciated.

 

If nothing else works we will be forced to manually update each variant in our store to not require shipping using the bulk editor, but that would be a long task as we have hundreds of thousands of product variants across our store. It would also be error-prone.

Replies 0 (0)