RE: ListingFile Resource

143 views
Skip to first unread message

Graeme Grant

unread,
Jul 3, 2013, 11:03:20 PM7/3/13
to EtsyAPI Forum
Next Question: How do we download the digital file(s) on behalf of the seller?
 

From: grag...@hotmail.com
To: etsy-...@googlegroups.com
Subject: RE: ListingFile Resource
Date: Thu, 4 Jul 2013 12:35:46 +1000

Also, the "Message to Buyers for Digital Items" is missing from the Shop resource. Can this too be added.
 
Thanks,
 
G.
 

From: grag...@hotmail.com
To: etsy-...@googlegroups.com
Subject: ListingFile Resource
Date: Thu, 4 Jul 2013 12:33:09 +1000

Hi Guys,
 
I was looking at the ListingFile resource and noticed that the creation date is missing yet is visible on your "List an Item" web page - here is a partial screenshot:
 

 

 
 
 
 
Can we have this field added please.
 
G.
 

Graeme Grant

unread,
Jul 3, 2013, 11:05:21 PM7/3/13
to EtsyAPI Forum
Last question: Is there a list of all the Etsy supported mime types?
 

From: grag...@hotmail.com
To: etsy-...@googlegroups.com
Subject: RE: ListingFile Resource
Date: Thu, 4 Jul 2013 13:03:20 +1000

Graeme Grant

unread,
Jul 3, 2013, 10:33:09 PM7/3/13
to EtsyAPI Forum
ListingFile.png

Graeme Grant

unread,
Jul 3, 2013, 10:35:46 PM7/3/13
to EtsyAPI Forum
Also, the "Message to Buyers for Digital Items" is missing from the Shop resource. Can this too be added.
 
Thanks,
 
G.
 

From: grag...@hotmail.com
To: etsy-...@googlegroups.com
Subject: ListingFile Resource
Date: Thu, 4 Jul 2013 12:33:09 +1000

Graeme Grant

unread,
Jul 4, 2013, 1:47:56 AM7/4/13
to EtsyAPI Forum
Hi Guys,
 
I'm trying to push a file up using uploadListingFile method however am experiencing an "An error ocurred while uploading your file, please try again." error response ... (note: 'ocurred' is misspelt.) I am not sure what this error means.
 
Am I missing anything?
 
G.
 
Here's the data and response:
 
REQUEST
 

POST http://openapi.etsy.com/v2/listings/155780932/files HTTP/1.1

Accept: */*
Accept-Language: en-AU
Content-Length: 29696
Accept-Encoding: identity
Authorization: OAuth realm="openapi",oauth_consumer_key="[key]",oauth_nonce="8410802",oauth_signature="PFv7Wemi9ORG%2FZci4LcN2gaPdjI%3D",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1372915830",oauth_token="[token]",oauth_version="1.0"
Content-Type: multipart/form-data; boundary=e14c75b0-ab28-4271-bf33-4fe14c98e899
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)
Host: openapi.etsy.com
Connection: Keep-Alive
Pragma: no-cache

--e14c75b0-ab28-4271-bf33-4fe14c98e899

Content-Disposition: form-data; name="name"
Test Powerpoint Presentation.pptx

--e14c75b0-ab28-4271-bf33-4fe14c98e899

Content-Disposition: form-data; name=file; filename=Test Powerpoint Presentation.pptx
Content-type: application/vnd.openxmlformats-officedocument.presentationml.presentation
[raw data removed]

--e14c75b0-ab28-4271-bf33-4fe14c98e899--


 
 
RESPONSE
 
HTTP/1.1 400 Bad Request
Date: Thu, 04 Jul 2013 05:29:29 GMT
Server: Apache
Set-Cookie: uaid=uaid%3D8a4O_9rGapMnqHrh0r1N3ik8KDDz%26_now%3D1372915769%26_slt%3DRAXQ5OqM%26_kid%3D1%26_ver%3D1%26_mac%3DjPHIPeAcJphUBRts7j38VsIssh-RXQROr6OP3WMqbi4.; expires=Sat, 04-Jul-2015 05:29:29 GMT; path=/; domain=.etsy.com; httponly
X-RateLimit-Limit: 50000
X-RateLimit-Remaining: 49981
X-Error-Detail: An error ocurred while uploading your file, please try again.
X-Etsy-Request-Uuid: IPboktXj5wdUuePIVCnfv1kRgkIe
Content-Length: 61
X-Cnection: close
Content-Type: text/plain;charset=UTF-8

An error ocurred while uploading your file, please try again.

 

From: grag...@hotmail.com
To: etsy-...@googlegroups.com
Subject: RE: ListingFile Resource
Date: Thu, 4 Jul 2013 13:03:20 +1000
--
You received this message because you are subscribed to the Google Groups "Etsy API V2" 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/groups/opt_out.
 
 

Graeme Grant

unread,
Jul 8, 2013, 11:12:39 PM7/8/13
to EtsyAPI Forum, Etsy Developer Community
Hi Guys,
 
Some feedback for last week's questions on the ListingFile resource would be great.
 
To summarise:
 
1. Possible Etsy bug: uploadListingFile > An error ocurred while uploading your file, please try again
2. How do we download the digital file(s) on behalf of the seller? There does not appear to be an endpoint for this.
3. "Message to Buyers for Digital Items" is missing from the Shop resource. Can this be added.
4. ListingFile resource is missing the field creation (date). Can this be added.
 
Also, it would be great if:
 
5. Etsy had an endpoint that we could query that would list all the Etsy supported mime types.
6. Is Etsy considering support for Sellers who may have digital files in multiple languages?
 
Thanks,
 
G.
 
Subject: RE: ListingFile Resource
Date: Thu, 4 Jul 2013 15:47:56 +1000

Matt Graham

unread,
Jul 9, 2013, 2:19:14 PM7/9/13
to Etsy API V2
Hi Graeme,

On Tue, Jul 9, 2013 at 3:12 AM, Graeme Grant <grag...@hotmail.com> wrote:
Hi Guys,
 
Some feedback for last week's questions on the ListingFile resource would be great.
 
To summarise:
 
1. Possible Etsy bug: uploadListingFile > An error ocurred while uploading your file, please try again

Thanks for reporting this. We'll take a look.
 

2. How do we download the digital file(s) on behalf of the seller? There does not appear to be an endpoint for this.

Downloads are not available. We do not have plans to add them at this time.
 
3. "Message to Buyers for Digital Items" is missing from the Shop resource. Can this be added.
4. ListingFile resource is missing the field creation (date). Can this be added.

We may be able to add these, I'll take a look. What's the use case for each?

 
Also, it would be great if:
 
5. Etsy had an endpoint that we could query that would list all the Etsy supported mime types.

We don't have plans to add this. The supported mimetypes should be pretty broad and they are the same that are supported on the site. Please let us know if any users find files with mimetypes that don't work.
 
6. Is Etsy considering support for Sellers who may have digital files in multiple languages?

Not currently, but that's a good suggestion to consider in the future.


Thanks,
Matt

Graeme Grant

unread,
Jul 9, 2013, 7:19:22 PM7/9/13
to EtsyAPI Forum
Hi Matt,
 
1. Thanks. Hopefully it is something simple.
2. Okay - noted.
3. All other shop messages can be edited. Is there any reason why we can not manage this from our app?
4. All resources in the API, even Listing Images, have creation dates. There is no version field so we want to manage them using the creation date
5. Okay - noted. Is it possible to have the documentation updated with supported mime types? Or would you like me to email off-group the list of file types that we support? Also I noticed that the generic binary file mime type is rejected as not supported - is there a reason for this?
6. Okay - noted.
 
Thanks,
 
G.

 

Date: Tue, 9 Jul 2013 18:19:14 +0000
Subject: Re: ListingFile Resource
From: mgr...@etsy.com
To: etsy-...@googlegroups.com

Graeme Grant

unread,
Jul 15, 2013, 7:02:41 AM7/15/13
to EtsyAPI Forum
Hi Matt,
 
It's been over a week and was wondering when the "possible bug" would be addressed by Etsy as we have a client waiting.
 
Thanks,
 
G.

 

Date: Tue, 9 Jul 2013 18:19:14 +0000
Subject: Re: ListingFile Resource
From: mgr...@etsy.com
To: etsy-...@googlegroups.com

Russ Posluszny

unread,
Jul 15, 2013, 9:35:56 AM7/15/13
to etsy-...@googlegroups.com
Hi Graeme,

Are you repeatedly seeing this error, or was this a one-time occurrence?

- Russ

Graeme Grant

unread,
Jul 15, 2013, 11:59:28 AM7/15/13
to etsy-...@googlegroups.com
Hi Russ,

Thanks for getting back to us. Yes, we are seeing this message every time.

G.

Sent from my Windows Phone

From: Russ Posluszny
Sent: 15/07/2013 11:35 PM
To: etsy-...@googlegroups.com
Subject: Re: ListingFile Resource

Russ Posluszny

unread,
Jul 15, 2013, 3:13:42 PM7/15/13
to etsy-...@googlegroups.com
Hi Graeme, 

That error message is our exceptional case error message, so nothing about our validation routine was off but something went wrong while actually trying to save the new listing file.  If you are seeing this repeatedly, then something must be wrong with the request itself.   To help in debugging, we can try adding a few more verbose error messages to help track down specific which error case you are falling into. Can't say just yet what the turnaround time on these additional errors will be, but will update this thread when there is an update.

Thanks!

- Russ

Russ Posluszny

unread,
Jul 17, 2013, 5:59:08 PM7/17/13
to etsy-...@googlegroups.com
Just wanted to update, we have added these two new requested fields to the API. ListingFile.create_date is available now, and Shop.digital_sale_message will be ramped up to all members over the course of the next few days.


Thanks!

- Russ

Russ Posluszny

unread,
Jul 17, 2013, 6:14:50 PM7/17/13
to etsy-...@googlegroups.com
Graeme -

I've done some digging through our logs and it appears you have made several correctly formatted requests, as well as some malformed API requests to create new ListingFiles.  The requests where you receive the message:

Files of this type cannot be uploaded at this time

These request are formatted correctly, even though the file itself is rejected due to validation rules.  Whatever you are doing to prepare these requests is completely correct.  The requests where the response message is:

An error ocurred while uploading your file, please try again.

 These requests are the malformed requests.  In your case, it looks like you might be missing the information needed to detect the uploaded file type.  I can't say for certain what you are doing wrong without seeing your client code that is generating the requests, but I can tell you that the process you are using when getting the "file type" error is correct.  Hopefully that helps.

Thanks!

- Russ

On Wednesday, July 3, 2013 11:03:20 PM UTC-4, Graeme wrote:

Graeme Grant

unread,
Jul 17, 2013, 6:47:45 PM7/17/13
to EtsyAPI Forum
Hi Russ,
 
Thanks for looking into this. Does this mean that there was a change made to correctly handle files uploaded?
 
I did not keep a copy of the code where you say the correct formatted packet was sent but if I recall correctly, based on this new information, this means that I should not be correctly setting the mime type (eg: Content-type: application/vnd.openxmlformats-officedocument.presentationml.presentation - see original sample upload Request/Response session data) but instead use a generic bucket binary mime type ( Content-type: application/octet-stream )???
 
G.
 

Date: Wed, 17 Jul 2013 15:14:50 -0700
From: rposl...@etsy.com

To: etsy-...@googlegroups.com
Subject: Re: ListingFile Resource

Graeme Grant

unread,
Jul 17, 2013, 6:33:48 PM7/17/13
to EtsyAPI Forum
Hi Russ & Matt,
 
Many thanks for adding these.
 
G
 

Date: Wed, 17 Jul 2013 14:59:08 -0700

From: rposl...@etsy.com
To: etsy-...@googlegroups.com
Subject: Re: ListingFile Resource

Graeme Grant

unread,
Jul 20, 2013, 11:08:45 AM7/20/13
to EtsyAPI Forum, Etsy Developer Community
Hi Russ/Matt,
 
There are no guidelines in the Etsy API documentation for uploading files. I've gone back over my code and checked the RFC specs.  I am still unable to successfully upload files receiving the vague "An error ocurred while uploading your file, please try again." error message. Setting up a web server here on my dev box the files upload successfully. Is there a bug in the API?
 
G.
 
Subject: RE: ListingFile Resource
Date: Thu, 18 Jul 2013 08:47:45 +1000

Russ Posluszny

unread,
Jul 22, 2013, 10:11:55 AM7/22/13
to etsy-...@googlegroups.com, Etsy Developer Community
Hi Graeme,

I'm sorry you are still having difficulty with this end-point, but there does not appear to be a bug in the upload process.  We're seeing a normal amount of successful uploads and testing on our end appears to be working correctly.  The ListingFile resource uses the exact same format of request for uploads as the ListingImage resource, which has a bit more detailed documentation on preparing the request for uploading:


If you'd like to provide more details about the code you are using to create and authorize your upload requests, we might be able to help you debug the issue further. Hope this helps!

- Russ

Graeme Grant

unread,
Jul 22, 2013, 11:25:45 AM7/22/13
to EtsyAPI Forum
Hi Russ,
 
Thanks for getting back to me. Yes, the files are being sent the same way as Listing Images - exception is  setting the mime type for "Content-type". Other from that the post data is set identically.
 
The raw data was attached to my original email. Here it is again - see below.
An error ocurred while uploading your file, please try again.

 

Date: Mon, 22 Jul 2013 07:11:55 -0700
From: rposl...@etsy.com
To: etsy-...@googlegroups.com
CC: deve...@etsy.com
Subject: Re: ListingFile Resource

Russ Posluszny

unread,
Jul 22, 2013, 12:11:37 PM7/22/13
to etsy-...@googlegroups.com
Hi Graeme,

It looks like you might be missing the type information from the file data.

Compare your request (specifically the file section) to an example request that I am performing that is working correctly:

Request:

POST /v2/listings/------/files HTTP/1.1
User-Agent: PECL-OAuth/1.2.3
Accept: */*
Authorization: OAuth oauth_consumer_key="-------",oauth_signature_method="HMAC-SHA1",oauth_nonce="-------",oauth_timestamp="1374508620",oauth_version="1.0",oauth_token="-------",oauth_signature="-------%3D"
Content-Length: 25396
Content-Type: multipart/form-data; boundary=----------------------------f9b6eed6cda7

------------------------------9a26254abab6
Content-Disposition: form-data; name="name"
RussTest.jpg

------------------------------f9b6eed6cda7
Content-Disposition: form-data; name="file"; filename="@/home/----------/--------/------/RussTest.jpg;type=image/jpeg"
Content-Type: image/jpeg

���� �M�k��

Response:

HTTP/1.1 200 OK
Date: Mon, 22 Jul 2013 15:57:02 GMT
Server: Apache
Set-Cookie: uaid=-----------.; expires=Wed, 22-Jul-2015 15:57:02 GMT; path=/; domain=.etsy.com; httponly
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9987
X-Etsy-Request-Uuid: -----
Content-Length: 436
X-Cnection: close
Content-Type: application/json

{"count":1,"results":[{"listing_file_id":-----,"listing_id":-----,"rank":1,"filename":"RussTest.jpg","filesize":"24.46 KB","size_bytes":25049,"filetype":"image\/jpeg","create_date":1374508478}],"params":{"listing_id":"------","listing_file_id":null,"file":{"name":"jpeg","type":"image\/jpeg","tmp_name":"\/var\/tmp\/phpbGzE5t","error":0,"size":25049},"name":"RussTest.jpg","rank":1},"type":"ListingFile","pagination":{}}

- Russ


On Wednesday, July 3, 2013 11:03:20 PM UTC-4, Graeme wrote:

Russ Posluszny

unread,
Jul 22, 2013, 12:12:58 PM7/22/13
to etsy-...@googlegroups.com
Note: I actually mixed the response from 2 identical requests, which is why the boundaries don't match, please ignore that. 

- Russ

On Wednesday, July 3, 2013 11:03:20 PM UTC-4, Graeme wrote:

Graeme Grant

unread,
Jul 22, 2013, 6:31:12 PM7/22/13
to EtsyAPI Forum
Hi Russ,
 
Thanks for the example. For images I have never passed type in with the filename field and successfully upload images. I followed your example and still had the same error.
 
After a little head-scratching it turned out that for Content-Disposition: form-data; name="file"; filename="[file name];type=[filetype]":
 
1. File name used in the "filename" field must not contain any spaces
2. File name used in "filename" field is replaced by the file name specified in the "name" field. Any file name can be used as it is discarded / ignored.
3. ;type=[filetype] is ignored / not required / obsolete.
 
I hope this helps others who stumble onto the same issue.
 
G.

 
Date: Mon, 22 Jul 2013 09:11:37 -0700

From: rposl...@etsy.com
To: etsy-...@googlegroups.com
Subject: Re: ListingFile Resource

Hi Graeme,
Reply all
Reply to author
Forward
0 new messages