question

enzocoll avatar image
0 Likes"
enzocoll asked ·

I cannot retrieve shipping cost for some items

Hi all, i'm new in this forum and i'm learning Finding API in C#. I can successfully do some searches, but for some items i cannot retrieve the shipping cost. I use the *SearchItem.shippingInfo.shippingServiceCost* property. For some item i get the correct value, but for some other i get null, even if the item has a shipping cost (i checked in the ebay site). For example, this item has a shipping cost of 9.80 EUR, but the property is null. Where is my mistake? This is my code: **ClientConfig config = new ClientConfig(); // Initialize service end-point configuration config.EndPointAddress = " http://svcs.ebay.com/services/search/FindingService/v1";; // set eBay developer account AppID config.ApplicationId = "MY_APP_ID"; // Create a service client FindingServicePortTypeClient client = FindingServiceClientFactory.getServiceClient(config); // Create request object FindItemsAdvancedRequest request = new FindItemsAdvancedRequest(); // Set request parameters request.keywords = txtKeyWords.Text; ItemFilter filter; List<ItemFilter> filters = new List<ItemFilter>(); filter = new ItemFilter(); filter.name = ItemFilterType.LocatedIn; filter.value = new string[] { "IT","FR","GB","ES" }; filters.Add(filter); if (filters.Count > 0) request.itemFilter = filters.ToArray(); request.sortOrder = SortOrderType.PricePlusShippingLowest; request.sortOrderSpecified = true; PaginationInput pi = new PaginationInput(); pi.entriesPerPage = 50; pi.entriesPerPageSpecified = true; request.paginationInput = pi; // Call the service FindItemsAdvancedResponse response = client.findItemsAdvanced(request); // Show output logger.Info("Ack = " + response.ack); logger.Info("Find " + response.searchResult.count + " items."); SearchItem[] items = response.searchResult.item; ... for (int i = 0; i < items.Length; i++) logger.Info(items[i].shippingInfo.shippingServiceCost.value);**
finding-apisearch-apic#.net sdk
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.

1 Answer

· Write an Answer
clickimusprime avatar image
0 Likes"
clickimusprime answered ·
You didn't include the itemid in your post so there's no way we can answer specifics. You didn't include a postal code in your request, so any distance based shipping method will not be accurate. GSP orders will be different too, so be careful about int'l orders. You can see the data returned by the API by dumping the XML or making the request in a browser. If they don't return data, it's not a code problem with your request handling. You'd have to do a request for each item for each buyer to get it accurate. This is one of those API calls that is by design very call intensive to actually use for anything productive at web scale and not really compatible with them scaling back on API usage. To avoid all the required calls, we usually just tell them "free shipping" or "see the listing". If you are fetching for selected users for their own accounting/operation use, take a look at the Trading API calls instead.
· Share
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.