How do you add variants to a new listing? #766
-
I'm trying to create many listings that will have the exact same variant choices. So, I create a new listing:
So, now I have the listing_id, but how do I add the variants? It'd be convenient if we could just add them when creating the listing, but that doesn't seem to be an option? Do I need to use updateListingInventory? What does updateListing vs updateListingProperty do? Honestly, the API is a bit confusing on how everything ties together. The names are pretty generic and it's hard to know what's used for what... What is a Product vs Offering? I manually created a listing with the variants I want, and then ran getListingInventory on it, and this was the output:
So, basically, I just want to add that exact same thing to all the listings I create... What's the workflow for this? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You have the basics so far. You do in fact need to run updateListingInventory. You are half way there in that you've got a good set of inventory data. Your next step will be to remove the information that does not get re-submitted to the listing and modify the price data to be a float and not an object. See the tutorial on handling updating inventory here: https://developers.etsy.com/documentation/tutorials/listings#updating-inventory |
Beta Was this translation helpful? Give feedback.
You have the basics so far. You do in fact need to run updateListingInventory. You are half way there in that you've got a good set of inventory data. Your next step will be to remove the information that does not get re-submitted to the listing and modify the price data to be a float and not an object. See the tutorial on handling updating inventory here: https://developers.etsy.com/documentation/tutorials/listings#updating-inventory