cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File Exchange - Issues downloading programmatically

I'm trying to download programmatically all of my active listings, but am facing some issues, (I followed all the advice in eBay's File Exchange advanced instruction .pdf, but nothing works).

 

So I've now got my eBay security token, how do I only request active items? And also, I assume that we urlencode the token and add it to the request? If so, can somebody please add the url here? One user mentioned that the following worked:

 

https://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeProgrammaticDownload&RefId=445678&token=urlencodedtoken

But I keep getting this:

 

HTTP/1.1 302 Moved Temporarily

 

Thanks.

 

 

 

 

Message 1 of 7
latest reply
6 REPLIES 6

File Exchange - Issues downloading programmatically

Tried inputting the url into the browser, and a .csv file was available. The only issue is that the server is unavailable.

 

Judging by other posts, the server has been unavailable for years! Smiley Sad

 

I'm gonna assume that it's broken?

Message 2 of 7
latest reply

File Exchange - Issues downloading programmatically

File Exchange - Issues downloading programmatically

Forget initiating an Active download report programatically. At least for now. You have to initiate the report through the FileExchange pages using your browser.

Once you have initiated the report, the download CAN be downloaded programatically. This also applies to the Sold, Paid awaitng..., etc. reports.

 

Unfortunately, eBay has also choosen to deny us the ability to schedule the Active listings download report. Although the other reports can be scheduled.

 

So, you manually initiate the report. Then you can copy the refId from the completed report page and paste that into the command that you use to programically download the report. As you can imagine, this kind of defeats the purpose we wish to achieve.

 

The instructions in the FileExchange docs are a bit misleading (!), in that they do not really explain that what they are intended for, is to upload FileExchange Add, Revise and End item Action items, then be able to download the result files from these actions. It is not intended to show how to initiate and download reports.

 

There are two ways available to us to do as you wish, the manual browser method and by using the eBay API to download the data ourselves (bypassing the FileExchange Center).

 

The API method is too complicated to go into here. Simply put, it is accomplished by using a program (that you write) to access the correct APIs (GetItem and GetSellerList) and perform all of the functions of such a program yourself though the code. I am a newbie at this, having just executed my first AddItem call in the Sandbox a couple of weeks ago. I have a very long way to go to create usable tools.

 

If you have this kind of programming knowledge, here is the place to get started - http://developer.ebay.com/join/benefits/logo/?rmvSB=true

 

If you wish info concerning upload and download of Action files, I will reprint a post from 2009 (I have lost the original link). The info was working correctly a couple of months ago, when I last tested it. Note the cURL version listed is out of date. This is from another user. I do not have their id. I believe you can find the original post in the Archives.

 


 

Hi All,

 

I've noticed that there seems to be quite a lack of information on how to get programmatic uploads and downloads working with File Exchange.


I recently spent some time figuring this out, so I figured I'd share a few things in case other people someday need some basic instructions
and examples of how to make it work.

 

I decided that the easiest way to do programmatic uploads and downloads is by using the program cURL, which is a free, text based web browser,
which you can just invoke from a command line. This is similar to how the Java uploader works that eBay provided, but it's a lot easier due to
the fact that you don't have to compile it first. It also works for programmatic downloads as well, so it's win / win. If you're using Windows,
you can download cURL here:

 

http://curl.haxx.se/download/curl-7.19.5-win32-ssl-sspi.zip

 

All you have to do is unzip this folder, and stick it somewhere, such as in c:curl or wherever else you'd like it. If you're running a Linux
computer, you can probably apt-get curl and get a working version for your distribution.

 

After cURL is installed, if you haven't already done so, you'll need to get a token to use. You can get a token by going here:

 

http://pages.ebay.com/file_exchange/programmaticupload.html?id=1

 

Click the "security token" link on that page. Sign into your account, give File Exchange permission to access your account, and you'll see
your token in a text box on the following screen. Save the token somewhere safe.

 

Once you have cURL installed, and have a token, you're ready to go. Some things to be aware of are:

 

1: Whenever you submit your token, it needs to be URL encoded. You can easily do this with cURL.


2: The URLs shown on the above programmatic upload instructions link are 50% wrong. The upload URL is correct, however, the download URL is
as follows: https://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeProgrammaticDownload

 

Lets start with doing an upload. You can execute the following command, and it will upload the file test.csv:

 

curl -k -o results.txt -F "token=**put your token here**" -F "file=@test.csv" https://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeUpload

 

--Please note that the discussion board turns the URL here into "Link". That URL just goes at the end of the string--

 

Just to explain things, the -k makes it ignore the fact that it can't verify who issued the SSL certificate. The -F command submits the token
as "form data", which is required for the programmatic upload. So for this upload, we're submitting 2 pieces of form data: token + file. When
you submit "form data" with cURL, it automatically URL encodes it, so we don't have to worry about that for the upload. The -o option makes
it so that it outputs the results into a file called results.txt. If you omit the -o feature, it will just write the results to the screen.

 

When you execute that, it will upload test.csv, and will reply confirming that the upload was successful, and you'll be given a reference
number. You can then use that reference number to programmatically download the result of that upload, once File Exchange has processed it.

 

Here is what you would execute to download the upload results of a file you uploaded:

 

curl -k -o uploadresult.csv --data-urlencode "token=**put your token here**" --data "jobId=334455667" https://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeProgrammaticDownload

 

This time we have to specifically tell cURL to URL encode the token, so we use the --data-urlencode command. You'll also notice that the second
piece of data we're submitting is "jobId" *not* "refId". For downloading the upload results of something you uploaded, you must use "jobId".


If you use "refId" your results download will fail. So the number for the jobId is the reference number that eBay replied back with to your
upload you submitted with the first upload we submitted above.

 

Last of all, if you want to download your order files that are generated, then you would execute cURL like this:

 

curl -k -o orders.csv --data-urlencode "token=**put your token here**" --data "refId=5566778" https://bulksell.ebay.com/ws/eBayISAPI.dll?FileExchangeProgrammaticDownload

 

This time you'll use "refId", and it will work for downloading any files that you would normally find in your File Exchange "Completed
Downloads" area (like orders or paid and awaiting shipment files, etc).

 

Hope people find this information useful. Good luck, and have fun!

eBay is continually updating this site. Some advice given may have changed. Please reply to this thread, to let us know if this advice works for you. The links on the bottom of any eBay page can help you deal with most eBay issues. Contact eBay Customer Service on Facebook.com/eBay or Twitter.com/AskeBay
Message 4 of 7
latest reply

File Exchange - Issues downloading programmatically

I'm trying to download my orders but Instead of my ordes being in the file, there is just a statement that reads. 

 

"The file server is currently unavailable. Please try again after some time."

 

Any suggestions?

Message 5 of 7
latest reply

File Exchange - Issues downloading programmatically

Sometimes servers need maintenence.  I performed my normal bi-daily inventory process this am about 2 hours before your post. I used the method as listed in the above programmic upload/dowwnload instructions. All worked correctly.

 

IS it still not working for you at this time?

 

Occasionally, my jobs will hang, but I usually get the file I am requesting, eventually. You might keep trying.

 

If the job queue does hang for an extended period, you can email turbodata@ebay.com, from your registered email account. Include your userid and the job reference number. When I have done this in the past, I usually get the answer that there is not much they can do, but the file runs almost immediately thereafter.

eBay is continually updating this site. Some advice given may have changed. Please reply to this thread, to let us know if this advice works for you. The links on the bottom of any eBay page can help you deal with most eBay issues. Contact eBay Customer Service on Facebook.com/eBay or Twitter.com/AskeBay
Message 6 of 7
latest reply

File Exchange - Issues downloading programmatically

Hello Everyone,

 

Due to the age of the thread, it has been closed to further replies.  Please feel free to start a new thread if you wish to continue to discuss this topic.

 

Thanks for understanding!

Message 7 of 7
latest reply