Streaming live at 10am (PST)

Mismatch between API requests and designer data for Inventory update

Hi there !

On the API documentation, it says that a PATCH allows to update the quantity of an item.

I have tried to do so for my 180 items via postman. A GET request show that the update has been taken into account :


This means that it should have activated the “track inventory” field and initiated a given value to my item.

But then, checking on the designer, none of the item’s inventory updates has been taken into account :

Does anyone encountered the same issue : different results whether you check the status of an item through the API or directly on the designer ?

Looking forward to reading from you !

1 Like

Do you mind sharing your preview link to the site?

Hi Dylang,
Of course, there it is : https://webflow.com/design/lintendance.
Let me know if other details might help understand the issue.

Can you try enabling Track Inventory first, saving, then trying to use the API and see if it shows the correct value?

Hi Dylang, I tried as well … suspecting that might activate the update via the API.
Unfortunately it’s not helping. What’s surprising is that when I patch a quantity and try to get it via the API, the correct value is passed and retrieved properly. But when checking on the designer, nothing shows, whether the ‘Track Inventory’ field has been previously activated or not.

@forresto @WebDev_Brandon any idea why the API seems to update those inventory quantity but it doesn’t appear in the actual webflow UI ?
Is it reliable to use the api to update inventory ?

@pepperclip,

API configuration is beyond my knowledge. Im still learning but Ill ask around today with the team.

Best Regards,
~ Brandon

@WebDev_Brandon thanks for asking around !

@meryem Can you try using 5e0e0de617e0840cd880b8b5 as the collection instead of the one you’re using and see if that helps?

Yes I tried all the collections.
This one specifically does not work.


It does not work as well with a GET,

Which indicates that the proper collection to query is the SKU one.

But my issue is rather that that the inventory seems properly updated when I patch via the API (since querying with a GET gives me the quantity I just passed) but not taken into account in the designer - whether the ‘track quantity’ field has been activated or not beforehand.
So the question is rather, are we sure the API and the designer are fully connected ?

Let me know if other details might help troubleshooting the issue,
Best,
Meryem

For those last two pictures, make sure you use https://api.webflow.com (the https part is important) or else it will error like that.

1 Like

To update anybody else: we fixed it by using the Variant ID instead of the Product ID!

1 Like