question

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

How to programmatically access eBay product data by product ID (java, error 14 "invalid numeric value") ?

Hello, I have an eBay product URL, e. g. ` http://www.ebay.com/itm/Fashion-Hot-Women-Sterling-Silver-Plated-Beads-Ball-Bangle-Cuff-Bracelet-Jewelry-/151389560917?pt=Fashion_Jewelry&hash=item233f856055`. I want to access the data of this product programmatically. I assume (correct me, if I'm wrong) that the ePID (reference ID) of the product is `151389560917`. When I run the following code, I get the error `Invalid numeric value` (error ID 14). try { final ClientConfig config = new ClientConfig(); config.setApplicationId(APPLICATION_ID); final FindingServicePortType serviceClient = FindingServiceClientFactory .getServiceClient(config); final ProductId productId = new ProductId(); productId.setValue("151389560917"); productId.setType("ReferenceID"); final FindItemsByProductRequest request = new FindItemsByProductRequest(); request.setProductId(productId); final FindItemsByProductResponse result = serviceClient .findItemsByProduct(request); } catch (final Exception exception) { LOGGER.error("", exception); return null; } How can I change the code to programmatically access data of the product ` http://www.ebay.com/itm/Fashion-Hot-Women-Sterling-Silver-Plated-Beads-Ball-Bangle-Cuff-Bracelet-Jewelry-/151389560917?pt=Fashion_Jewelry&hash=item233f856055` ? Thanks in advance Dmitri
Javasearch api
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.

clickimusprime avatar image
1 Like"
clickimusprime answered ·
151389560917 is the eBay listing number. ReferenceID is an eBay internal number representing a product similar to a UPC code. The API calls return the ReferenceID when available. Use findItemsAdvanced or GetSingleItem or GetMultipleItems to retrieve the RefID, then pass that to the product lookup to get useful info like UPC code. Your item does not appear to have one. They're only available on items listed from the catalog, which generally means products with a UPC/EAN (try item 331351986423), but may include addl items. Life would be so much easier if eBay just included UPC/EAN code in the response along with ReferenceID
· 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.

$$anonymous$$ avatar image
0 Likes"
$$anonymous$$ answered ·
Thanks for your answer. If I want to invoke GetSingleItem from Java, is there some convenient mechanism for that (like there is for FindItemsByProduct) ? Or do I have to submit a web service call and then parse the resulting XML?
· 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.