question

seyedfarshn-0 avatar image
0 Likes"
seyedfarshn-0 asked

Feed API uploadFile nightmare. Full of bugs!

I've been trying a million different things to upload a file. Every time I get the following error. The documentation is terrible and API won't return a specific error.


{
   "errorId": 2003,
   "domain": "ACCESS",
   "category": "APPLICATION",
   "message": "Internal error",
   "longMessage": "There was a problem with an eBay internal system or process. Contact eBay developer support for assistance",
   "parameters": [
    {
     "name": "code",
     "value": "400"
    },
    {
     "name": "message",
     "value": "HTTP 400 Bad Request"
    }
   ]
  }
"rlogid": [
  "t6pitaf%60btuf%2Bbmslnts3%60wscqogo%3D9iptpitaf%60btuf%2Bv%60u%7Ec.qctp5654-17e7a32b4ba-0x2361"
 ],

Steps

1) Created a task via createTask API

{

schemaVersion: "967",

feedType: "LMS_ADD_FIXED_PRICE_ITEM"

}

** QUESTION : is schema version correct?

2) Tried uploading a zipped xml via uploadFile API

const fetch_ = require("node-fetch");
const fs = require("fs");
var form1 = new URLSearchParams();
form.append('file', fs.createReadStream('test.zip'));
form.append('fileName', 'test.zip');
form.append('name', 'file');
form.append('type', 'form-data');  

const res = await fetch_(
    "https://api.sandbox.ebay.com/sell/feed/v1/task/task-1-124010/upload_file",
    {
      method: "POST",
      headers: {
        Authorization:
          `Bearer v^1xxxxxxxxxxxxxxxxxxxxx`,
        Accept: "application/json",
        "X-EBAY-C-MARKETPLACE-ID": "EBAY_US",
        "Content-Type": "multipart/form-data"
      },
      body: form1,
    }
  );
uploadfilefeedapi
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

sing-harv avatar image
0 Likes"
sing-harv answered

You are suppose to send unzipped XML file, I am able to send the same for Revise Inventory Status call. All other parts look good, I am also using the latest schema version 1257 but that should. not be the reason for your error.

10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

seyedfarshn-0 avatar image
0 Likes"
seyedfarshn-0 answered

I figured out the issue but still the API should return specific errors instead.

· 1
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Indeed the errors are not very clear, even though Rest API is the latest technology the team is building on. I was also expecting a bit better handling, but seems like the traditional APIs are much stable and robust in that instance.
1 Like 1 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.