简体   繁体   English

eBay API FindItemsByProduct无法返回固定价格清单上可用的商品

[英]eBay API FindItemsByProduct unable to return items available on a Fixed Price listing

I am trying to retrieve the number of items available on a Fixed Price listing using the eBay API findItemsByProduct, but could not find a property with the information. 我正在尝试使用eBay API findItemsByProduct检索固定价格清单上可用的项目数量,但是找不到包含该信息的属性。

Does anyone know if the available items count can be accessed by this call or is there another API I can use? 有人知道此调用是否可以访问可用项目计数,或者我可以使用其他API吗?

using (FindingServicePortTypeClient client = new FindingServicePortTypeClient())
{
  MessageHeader header = MessageHeader.CreateHeader("My-CustomHeader", "http://www.mycustomheader.com","Custom Header");
  using (OperationContextScope scope = new OperationContextScope(client.InnerChannel))
  {
    OperationContext.Current.OutgoingMessageHeaders.Add(header);
    HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty();    
    httpRequestProperty.Headers.Add("X-EBAY-SOA-SECURITY-APPNAME", "INSERT APP ID");
    httpRequestProperty.Headers.Add("X-EBAY-SOA-OPERATION-NAME", "findItemsByProduct");
    httpRequestProperty.Headers.Add("X-EBAY-SOA-GLOBAL-ID", "EBAY-US");
    OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty;
    FindItemsByProductRequest request = new FindItemsByProductRequest();
    ProductId id = new ProductId();
    request.productId = id;
    request.productId.type = "UPC";
    request.productId.Value = "783722722428";
    request.sortOrder = SortOrderType.PricePlusShippingLowest;

    FindItemsByProductResponse response = client.findItemsByProduct(request);

    foreach (var item in response.searchResult.item)
    {
      Console.WriteLine(item.title); 
      Console.WriteLine("Item Condition:  " + Item.condition.conditionDisplayName);
      Console.WriteLine("Item ID:         " + item.itemId);
      Console.WriteLine("URL:             " +item.viewItemURL);
      Console.WriteLine("Listing Type:    " +  item.listingInfo.listingType);
      Console.WriteLine("Price:           " + item.sellingStatus.currentPrice.Value);
      Console.WriteLine("Shipping Type:   " + item.shippingInfo.shippingType);
      if  (item.shippingInfo.shippingServiceCost != null)
      { 
        Console.WriteLine("Shipping:      " + item.shippingInfo.shippingServiceCost.Value); }
        // Console.WriteLine(item.condition.conditionDisplayName);
        //Console.WriteLine(item.galleryPlusPictureURL);
        Console.WriteLine("");
        Console.WriteLine("");
      }  // if
    }    // foreach
  }      // using
}        // using

JMS JMS

Ebay has one sdk for this in C# , is really helpful and easy to use. Ebay在C#中为此提供了一个sdk,非常有用且易于使用。

https://go.developer.ebay.com/netsdk https://go.developer.ebay.com/netsdk

For get your active products listed use the call ActiveInventoryReport 为了使您的活动产品列出来,请使用ActiveInventoryReport

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM