question

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ Suspended asked

Find Products detail required

Hi Team,

 

We have integrated eBay API for Find Products. How can be get the seller's information too with response?

10 |600 characters needed characters left characters exceeded

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

devanathan.developersupport@ebay.com avatar image
0 Likes"
devanathan.developersupport@ebay.com answered

Hi keyideasdotnet

 

If you use findItemsByProduct API call, then you need to use the outputSelector and set the value as SellerInfo to retrieve the seller information.
http://www.developer.ebay.com/DevZone/finding/CallRef/findItemsByProduct...

 

Have a nice day.

Best Regards,
Devanathan Sampath
eBay Developer Support

10 |600 characters needed characters left characters exceeded

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

gfiopcc avatar image
0 Likes"
gfiopcc answered

 

            try

            {

                ApiContext context = HelperEbayApi.GetContext(this.EbayAccount);

 

                //make the FindProducts call 

                string request = "http://open.api.ebay.com/shopping?appid=";

                request += context.ApiCredential.ApiAccount.Application;

                request += "&version=805&siteid=" + ModelNation.DicNation[this.Simplified].SiteCode + "&callname=FindProducts&MaxEntries=100";

                request += "&QueryKeywords=" + this.KeyWordBox.Text.Trim();

                //request += "&CategoryID=" + this.EbaySortBox.Tag.ToString();

 

                WebRequest wrGETURL;

                wrGETURL = WebRequest.Create(request);

 

                Stream objStream;

 

                //read the response 

                objStream = wrGETURL.GetResponse().GetResponseStream();

                StreamReader objReader = new StreamReader(objStream);

                string strResponse = objReader.ReadToEnd();

 

                //parse the response 

                XmlDocument xmlDoc = new XmlDocument();

                xmlDoc.LoadXml(strResponse);

                XmlNode root = xmlDoc["FindProductsResponse"];

 

                if (root["Errors"] != null)

                {

                    string error = root["Errors"]["ShortMessage"].InnerText;

                    MessageBox.Show(error, "系统提示");

                    this.QueryButton.Enabled = true;

                    return;

                }

 

                XmlNodeList ProdList = xmlDoc.GetElementsByTagName("Product");

 

                DataTable table = this.CreateTable();

 

                //There could be more than one Product match 

                for (int i = 0; i < ProdList.Count; i++)

                {

                    DataRow row = table.NewRow();

 

                    XmlNodeList ProdIDList = ProdList[i].ChildNodes;

                    for (int j = 0; j < ProdIDList.Count; j++)

                    {

                        if (ProdIDList[j].Name == "ProductID" && ProdIDList[j].Attributes["type"].Value == "Reference")

                        {

                            row["ProductReferenceID"] = ProdIDList[j].InnerText;

                        }

                        else if (ProdIDList[j].Name == "Title")

                        {

                            row["Title"] = ProdIDList[j].InnerText;

                        }

                    }

 

                    table.Rows.Add(row);

                }

 

                this.GridView.DataSource = table;

 

                this.AfterGridViewBind();

            }

            catch (Exception ex)

            {

                MessageBox.Show(ex.Message, "系统提示");

            }

 

Good Luck.

10 |600 characters needed characters left characters exceeded

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

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.