Updating the quantity on a product #691
-
I have a question about updating the quantity on products. If I want to change a product's quantity because we have some more stock it seems like the way to do this is with the My question is how do you know what quantity and price I'm updating? The update endpoint only accepts the price, quantity and whether or not the offering is enabled in the offerings for each product. I've not come across a product with multiple offerings yet. I assume they exist since the offerings are an array and I want to understand how that would work. Ideally I'd like to just send the quantity but the price appears to be required too. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@d3v1 The recommended approach is to first call If you only submit one product when there are multiple items, the system will remove the others. |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks for clearing that up. That's the conclusion I came to. I was just a bit confused as to whether or not offerings ever had more than one item in it because its coming back as an array and that makes me think it might contain multiples otherwise similar data tends to be in an object. The docs are a bit conflicting on the point of price. At the top of the section here there's a point that says
The price we send to you is in the super units (dollars), as described later, and the price you send to us is in an array. Cleaning the explanation up would help confused souls like me. Thanks for being so responsive. |
Beta Was this translation helpful? Give feedback.
@d3v1 The recommended approach is to first call
getListingInventory
to get all of the variations and offerings. Then, adjust what needs to be adjusted and submit the whole package back. Be sure to read about the items to remove/modify on the documentation here: https://developers.etsy.com/documentation/tutorials/listings#updating-inventory (see the Notes in this section of the guide).If you only submit one product when there are multiple items, the system will remove the others.