Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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

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)