New API endpoints inventory level

New Member
2 0 1

Hi, community,

The first of August Shopify is discontinuing the possibility to update stock values through the product API.

This now has to be done through inventory levels: https://help.shopify.com/en/api/reference/inventory/inventorylevel#set

However, when I do a test on a store with the API endpoints described in the documentation it gives me a 200 HTML response instead of a JSON response.

Screenshot: 

Screenshot

 

Anyone already tried to update their RESTful API scripts to use #adjust and #set functions of inventory_level?

Greetings,

Maarten

1 Like
Shopify Expert
9965 84 1469

Check the cookie settings in postman and make sure you're not sending any.

★ Winning Partner of the Build a Business competition. ★ http://freakdesign.com.au
1 Like
Tourist
40 0 3

Hi,

I am currently using inventory_levels without any issues. What does the HTML response actually say?

also, are you able to check the data you're sending to make sure it is formatted correctly? I recently found some issues with shopify documentation that resulted in the same issue, make sure you put quotes around the values (unlike the documentation).

Kind regards,

Joe

0 Likes
Highlighted
New Member
2 0 1

Hey,

It had to do with my Postman, so thanks Jason.

Coded it in python and no issues.

Thanks for your quick response.

0 Likes