v2/updateinventory or v3/updatelistinginventory error URI to long

74 views
Skip to first unread message

A Whites

unread,
Aug 12, 2021, 9:13:39 AM8/12/21
to Etsy API
Has anyone had any luck using the updateinventory method in creating "a lot" of SKUs? 

The company I work for primarily sells shirts and I sell my own items as well and put together the API in python which is working fine for listings with a lower number of SKUs. 
For instance with the shirts I have two variations: Size and Color, most of our men's shirts have 2 colors and 6 sizes or 12 SKUs, all of these work just fine and has been a tremendous help using the API. However when I go to make a listing that might have more than 18-20 SKUs I get a 414 error: URI too long.

I have narrowed it down to the URI being <= 8200 characters in order to work. But since Etsy allows up to 70 variants for each of the 2 variations, 4900 SKUs, I'm hoping there is a way to add more SKUs through an API call. 

When I've asked Etsy Developer Support for guidance before this was the basic response I was given: "Make sure you are including all of the variations in the body. If you try to include everything in the URI you'll quickly run out of space"

I am not sure how to pass the parameters through the body rather than the params of the url. I am using the requests and oauthlibs in Python, so that would be the most appreciative help but if anyone has done this in any other language I would appreciate any advise. I have been searching most examples I have found only stop at 2 SKUs.


Thank you 
Allen Whites

david olick

unread,
Aug 12, 2021, 1:29:48 PM8/12/21
to Etsy API V2
In the V2 API, you could send API messages via an http POST and just add &method=put or whatever.  I would recommend using a POST instead of a GET, if that's what you are doing.


--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/etsy-api-v2/4ba1a1d2-baa9-417c-acfc-92b1f1455128n%40googlegroups.com.

A Whites

unread,
Aug 13, 2021, 2:10:16 PM8/13/21
to Etsy API
David, 

I was using PUT for the updateinventory method. 


I figured out what I was doing wrong though.
I originally was passing through the paramaters and would get URI too long error, when I tried passing through the body with python requests I got an error rearding my oauth signature. I just started using v3 and discovered the reason behind the errors in the body was because I used json.dumps on my products list then trying to make the body json with the json(products) and the on_property values. Once I changed it to be one full json it went through.


Thanks
Reply all
Reply to author
Forward
0 new messages