Search code examples
ebay-apiebay-sdk

How do I find the Item ID for products on eBay?


I am trying to use eBay's RESTful Sell API and Buy API to make an order management application. To test the API calls, I have successfully created seller and buyer accounts. Further, I have uploaded some inventory from my sellers account and published the offer.

Now I wish to place an order from the buyers account on the items in the same listing. From my understanding, I have to specify the items to be ordered by providing the Item IDs. However, I cannot figure out how to find the Item ID required for purchasing these items. Where can I find the Item ID's corresponding to an offer?

In case this is not the correct approach and there is some alternate way to go about doing this, what steps am I required to take?


Solution

  • Apparently, the itemId is the same as the listingId. The newer RESTful API's make use of the variable listingId to represent an identifier for a published listing. The same variable is referred to by the name itemId in the older, Trading APIs. The value for listingId/itemId is generated when publishing an offer and converting it into a listing. Thus, it can be fetched either at the time of publishing the offer (present in the response under the variable named listingId) or it can be fetched through an order (present in the response under the variable legacyItemId.