ETSY API /updateListing return error - "Title cannot be more than 140 Characters"

164 views
Skip to first unread message

Dheeraj Arya

unread,
Jul 24, 2014, 12:51:04 AM7/24/14
to etsy-...@googlegroups.com
Hi,

ETSY API /updateListing is returning the following error even though the Title length is only 137. we tried reprocessing but we still got the same error.


Error: { "statusCode" : 400, "data" : "Title cannot be more than 140 characters." }

Here is the ETSY Request Id and date Header information:
'x-etsy-request-uuid': '-12iFybe7r-8Ray4ucSwRpiV4zSj'
date: 'Thu, 24 Jul 2014 04:32:17 GMT'

Thanks,
Dheeraj

Etsy API

unread,
Jul 24, 2014, 11:14:53 AM7/24/14
to etsy-...@googlegroups.com
Hi there Dheeraj,

I took a look at the request associated with that UUID, and it was:

GET /v2/users/__SELF__/feedback/from-buyers...

Are you certain that this is the UUID associated with your updateListing request? Any additional information you can share would be helpful.

Sara

Dheeraj Arya

unread,
Aug 2, 2014, 5:34:31 AM8/2/14
to etsy-...@googlegroups.com, etsy-...@googlegroups.com
Hi,

We tried with various title length  

Title:  'Sale -  Summer Sale Event Pink & Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jasper Stone Ring, Adjustable Stone Ring, Wire Wrap'
Length: 140 
Status: Failed {"statusCode":400,"data":"Title cannot be more than 140 characters."} 
'x-etsy-request-uuid' - ayjAc4DTX_UBUUy0IxdaJZAuJ13p  

Title:  'Sale -  Summer Sale Event Pink & Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jasper Stone Ring, Adjustable Stone Ring, Wire Wra' 
Length: 139 
Status: Failed {"statusCode":400,"data":"Title cannot be more than 140 characters."} 
'x-etsy-request-uuid' - FVfIxmg6kslD5MaVxBS5rkbM9gOV 

Title:  'Sale -  Summer Sale Event Pink & Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jasper Stone Ring, Adjustable Stone Ring, Wire Wr'
Length: 138 
Status: Failed {"statusCode":400,"data":"Title cannot be more than 140 characters."}
'x-etsy-request-uuid' - OF0ruXBkoHzAkzqvXn-U6jKB0g9Y   

Title:  'Sale -  Summer Sale Event Pink & Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jasper Stone Ring, Adjustable Stone Ring, Wire W' 
Length: 137 
Status: Failed {"statusCode":400,"data":"Title cannot be more than 140 characters."} 
'x-etsy-request-uuid' - bb5ilh_Pkt0Bew8NsCIFl8iN0SPh  

Title:  'Sale -  Summer Sale Event Pink & Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jasper Stone Ring, Adjustable Stone Ring, Wire ' 
Length: 136 
Status: Success  
'x-etsy-request-uuid' - qc-IDDHmvvIhouJvVgzhM_xYVmcg  


------------------------------------------------------------------------------------------------------------------------------------------------- 
We also tried for another title.it was successful for 140 length  

Title:  'Sale -  Sterling silver golf money clip .925 golfer gift. Hallmarked .925 (sterling silver) . Perfect gift for your Favorite golfer. ! Weigh' 
Length: 140 
Status: Success 
'x-etsy-request-uuid' - 2qTzsVY6yl_dyf9kqskLP15x5sxk 

We observed the title which is failing even though the length is 140 or little less contains special character '&'. If encoded '&' is represented as '&' we are wondering you checking the lenght of the title with the encoded title. Please check. 
 
Thanks, Dheeraj

Dheeraj Arya

unread,
Aug 2, 2014, 7:53:50 AM8/2/14
to Graeme Grant, EtsyAPI Forum
Hi Graeme,

Thanks for replying.
Can you please tell me how you are encoding your title before making a post call to ETSY.

We have tried with single encoding, double encoding and even no encoding, still no luck. We are using Node JS.

Thanks,
Dheeraj


On Sat, Aug 2, 2014 at 4:53 PM, Graeme Grant <grag...@hotmail.com> wrote:
I just tried your 140 character title 'Sale -  Summer Sale Event Pink & Green Fancy Jasper Ring, Jasper Gemstone Ring, Colourful Jasper Stone Ring, Adjustable Stone Ring, Wire Wrap' with our comms software and everything word fine.
 
You need to check your encoding of special characters - this is where you are having problems. Make sure that it is compliant with http post data standards.
 
G.

 

Date: Sat, 2 Aug 2014 02:34:31 -0700
From: dhe...@orng.es
To: etsy-...@googlegroups.com
CC: etsy-...@googlegroups.com
Subject: Re: ETSY API /updateListing return error - "Title cannot be more than 140 Characters"
--
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.

Dheeraj Arya

unread,
Aug 4, 2014, 12:24:13 AM8/4/14
to Graeme Grant, EtsyAPI Forum

Hi,

We tried the normal '&' and it comes on etsy perfectly fine if the length is less than 136. Otherwise we get title length error.

Anything else you can point to??That would be great.

Thanks,
Dheeraj

On 02-Aug-2014 7:04 pm, "Graeme Grant" <grag...@hotmail.com> wrote:
Don't html encode post data eg: don't use &amp; for &
 

Date: Sat, 2 Aug 2014 17:23:47 +0530

Subject: Re: ETSY API /updateListing return error - "Title cannot be more than 140 Characters"

Dheeraj Arya

unread,
Aug 4, 2014, 9:36:54 AM8/4/14
to Graeme Grant, EtsyAPI Forum

Hi,

we found that the issue is only with '&' character and all the other special characters are working fine. There are no length error when using other special character and the title length is 140.
We are making a direct OAUTH Put call to etsy using NODE JS.

The issue is probably because OAUTH is using 'application/x-www-form-urlencode' as content-type. Also we tried other content type 'application/json' and 'multipart/form-data', for both etsy is returning error unknown MIME type.

Can you please tell what content-type to use.

Thanks,
Dheeraj

david olick

unread,
Aug 4, 2014, 10:44:05 AM8/4/14
to Etsy API V2, Graeme Grant
Can you show us your URL encoded title in your first example?


--
David Olick
Oriku Inc.

Karan Jassar

unread,
Aug 5, 2014, 8:11:35 AM8/5/14
to etsy-...@googlegroups.com, grag...@hotmail.com, david...@gmail.com
I've posted multiple examples below. Here is our learning for far:

1) Etsy properly decodes URL encoded messages with mime type application/x-www-form-urlencoded  (Case 2 below) except for '&' character (Case 1 below). The '&' character leads to length validation failing. We are assuming this is because either they are parsing it as '%26' or perhaps '#38;'.

2) If we encode with mime type 'form-data' and send the string without any encoding, Etsy rejects the call with unsupported mime type exception (Case 3). We use form-data mime type while uploading images to Etsy but somehow they reject it here.

I'll be great if someone from Etsy chimed in & helped us understand why this behavior is happening. Otherwise we are just guessing and going in circles.

Thanks and Regards,
Karan

Here are 3 separate examples:

Case 1: String with '&' and 139 characters. (FAIL)
Mime Type: application/x-www-form-urlencoded

Raw String: 
  "S&Sale - Summer Sale Event Pink ! @ # % * (  - + { } [ ] : ; < , > . / ? \\ | Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jaspe"

Encoded string to Etsy: 
  "S%26Sale%20-%20Summer%20Sale%20Event%20Pink%20%21%20%40%20%23%20%25%20%2A%20%28%20%20-%20%2B%20%7B%20%7D%20%5B%20%5D%20%3A%20%3B%20%3C%20%2C%20%3E%20.%20%2F%20%3F%20%5C%20%7C%20Green%20Fancy%20Jasper%20Ring%2C%20Jasper%20Gemstone%20Ring%2C%20Colorful%20Jaspe"

Result : FAIL, with title over 140 character errorcode.


Case 2: String with '&' and 138 characters. (PASS)
Mime Type: application/x-www-form-urlencoded

Raw String:  
  "SSale - Summer Sale Event Pink ! @ # % * (  - + { } [ ] : ; < , > . / ? \\ | Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jaspe"

Encoded string to Etsy:  
  "SSale%20-%20Summer%20Sale%20Event%20Pink%20%21%20%40%20%23%20%25%20%2A%20%28%20%20-%20%2B%20%7B%20%7D%20%5B%20%5D%20%3A%20%3B%20%3C%20%2C%20%3E%20.%20%2F%20%3F%20%5C%20%7C%20Green%20Fancy%20Jasper%20Ring%2C%20Jasper%20Gemstone%20Ring%2C%20Colorful%20Jaspe"

Result: OK


Case 3: String with '&' and 139 characters, encoded with mime type 'multipart/form-data' (FAIL)
Mime Type: multipart/form-data


Raw String:  
 "S&Sale - Summer Sale Event Pink ! @ # % * (  - + { } [ ] : ; < , > . / ? \\ | Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jaspe"

Encoded string to Etsy:  
     '----------------------------838711098855849499591237\r\nContent-Disposition: form-data; name="title"\r\n\r\n',
     'S&Sale - Summer Sale Event Pink ! @ # % * (  - + { } [ ] : ; < , > . / ? \\ | Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jaspe'

etsy Response
server: 'Apache',
     'x-etsy-request-uuid': 'SpXgqvA5aQMhjTej5631Cr2IRfDY',
     'x-error-detail': 'Unknown MIME type: multipart/form-data',



------

Graeme Grant

unread,
Aug 5, 2014, 10:35:21 AM8/5/14
to EtsyAPI Forum, dhe...@orng.es
I just tried your 140 character title 'Sale -  Summer Sale Event Pink & Green Fancy Jasper Ring, Jasper Gemstone Ring, Colourful Jasper Stone Ring, Adjustable Stone Ring, Wire Wrap' with our comms software and everything word fine.
 
You need to check your encoding of special characters - this is where you are having problems. Make sure that it is compliant with http post data standards.
 
G.

 

Date: Sat, 2 Aug 2014 02:34:31 -0700
From: dhe...@orng.es
To: etsy-...@googlegroups.com
CC: etsy-...@googlegroups.com
Subject: Re: ETSY API /updateListing return error - "Title cannot be more than 140 Characters"

Graeme Grant

unread,
Aug 5, 2014, 10:35:30 AM8/5/14
to EtsyAPI Forum, dhe...@orng.es
Don't html encode post data eg: don't use &amp; for &
 

Date: Sat, 2 Aug 2014 17:23:47 +0530

Subject: Re: ETSY API /updateListing return error - "Title cannot be more than 140 Characters"

david olick

unread,
Aug 5, 2014, 11:24:12 AM8/5/14
to Karan Jassar, Etsy API V2, Graeme Grant
Well, my first piece of advice is to try a simpler test case to rule out potential mistakes.  For example...

"S&Sale - Summer Sale Event Pink ! @ # % * (  - + { } [ ] : ; < , > . / ? \\ | Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jaspe"

... is actually 138 characters, not 139.  "\\" is actually parsed as "\" by your language.  I used javascript's decodeURIComponent to verify that your encoded string actually decodes to:

"S&Sale - Summer Sale Event Pink ! @ # % * ( - + { } [ ] : ; < , > . / ? \ | Green Fancy Jasper Ring, Jasper Gemstone Ring, Colorful Jaspe"

Which means that your POST might be either 139 or 140 characters.  There might be other things going on, so you may want to try all "A"s and an "&".  Or even replace the "&" with a different character to make sure that the 1 character difference doesn't matter.




--
David Olick
Oriku Inc.


Karan Jassar

unread,
Aug 6, 2014, 1:19:18 PM8/6/14
to etsy-...@googlegroups.com, ka...@orng.es, grag...@hotmail.com, david...@gmail.com
Hi David,

Thanks for your reply. What we posted are only a few cases with all sort of special characters etc. We've tried various simple cases as well and have ruled them out for e.g. as you suggested - all As and 1 &. It works as long as the length is less than 137 characters. No other character causes any issue as well. Its only the edge case where there's an '&' and the total length exceeds 137 characters that fails.  

And yes the length of one of the strings I quoted was 138, not 139. We were aware of the fact that the 1 '\' was just to escape the other '\'. Only while writing the email, I copied the text to sublime, selected it to double check its length and misreported the length as 139. Regardless, 138 is better than 139 when it comes to length validation and it still failed. 

Seems like we need Etsy to help us and let us know why their decode is reporting an error only in the case of an '&'.

Can someone from Etsy PLEASE chime in and let us know what we are doing wrong? Is there a way to escalate this to Etsy?

Regards,
Karan
Reply all
Reply to author
Forward
0 new messages