API -- create listing with variations supported, or still not yet?

607 views
Skip to first unread message

Michael Darling

unread,
May 11, 2014, 4:37:02 AM5/11/14
to etsy-...@googlegroups.com
I'm confused whether you can use the API to create a new listing that has variations.

The API documentation for "Listing" under "Associations" has "Variations" which includes: "This can only be used with the getListing and getTransaction methods" bolded.

But, the API documentation for "Variations_Property" includes "createListingVariations".



IF the API now supports creating a listing with variations, when calling createListing, is price and quantity not really required (on the listing level), even though the docs say they are, in the case of using variations?  (Since those are handled instead on the variations level?)

Amit Snyderman

unread,
May 12, 2014, 4:14:33 PM5/12/14
to etsy-...@googlegroups.com
Hey Michael,

Adding variations to a new listing is a two-request process: 1) `createListing` [1] to create the listing, and then the subsequent 2) createListingVariations [2] to attach the variations to the new listing. You cannot do this with a single request.

Thanks,
Amit

--
You received this message because you are subscribed to the Google Groups "Etsy API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etsy-api-v2...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Darling

unread,
May 12, 2014, 10:20:17 PM5/12/14
to etsy-...@googlegroups.com
Thanks!

So, I take it the documentation at https://www.etsy.com/developers/documentation/reference/listing#section_associations is wrong, as far as the Variations bold note goes that says "NOTE: This can only be used with the getListing and getTransaction methods.").  Glad to hear it.

So, in that case, when calling createListing, are price and quantity still required fields -- as the documentation indicates?  If so, what do you put there?

Amit Snyderman

unread,
May 13, 2014, 2:00:10 PM5/13/14
to etsy-...@googlegroups.com
Michael,

The link referenced in the documentation is for retrieving the `Variations` association from the `Listing` resource. The documentation is accurate in that the association will only work in the context of the `getListing` and `getTransaction` read requests.

As for the `createListing` method, `quantity` is still relevant since variations do not support the notion of quantity – though they do support the idea of “Out of Stock” which is conceptually but not technically related to quantity. As for `price`, priced variations will take priority over the listing’s price; you can either set a temporary dummy value, or – mimicking what we do – set the price to the lowest priced available variation.

Hope this helps.
Reply all
Reply to author
Forward
0 new messages