I’ve run across a new problem with creating products. After changing the code so it creates variants in batches the timeout issues stopped, but none of these variants show stock and the response from the endpoint is a 404 not found for the put request.
I assume that the system handles stock creation differently when the variant is added compared to when a product with variants is added as this same code used to work fine.
Which end point are you making the PUT request to?
The way I normally diagnose problems like this is to make the request in the UI with the network tab of developer tools open and look at the request that the UI makes.
Just to add to this, it seems like the whole system is acting like the sellables don’t exist. I get 404’s trying to delete them using the sellable ids provided back from the product update call as well.
It seems that you’re getting a 404 here because the Sellable with ID: 18943488 doesn’t seem to exist.
Please can you confirm that this was the URL sent by the UI
It was the id that the ui sent, but since then I’ve managed to figure out a different way to do what I was trying to do which is working now and as such the data being used has changed a lot.
I followed a bit of your advice earlier in the thread and inspected how the UI handled what I was trying to do and I’ve followed what it was doing. I believe it is an undocumented endpoint for product variants that I’ve ended up using.