Ebay API - How to get an item's ancestor/root category? - ebay-api

I'm retrieving the item info of many items using getMultipleItems in the Shopping API, and I need to find-out the items' root category. In the US site (0), the root categories are here: http://www.isoldwhat.com/getcats/fullcategorytree.php
How can I tell which of these an item belongs to (for example, "Computers/Tablets & Networking")? Can I do it within getMultipleItems (or getSingleItem) or do I need another call?
It seems like a short question, but this problem is shared with my use of the Amazon API to which I've been doing extensive research and I decided to resolve it on my eBay end. The "problem" is determining the selling fee, which can be done on Amazon's side, by getting the ProductGroup of the item, or by using eBay's root categories, and matching either one to the fee table Amazon defined for it's commission rates. In this case, there's not a lot of turn-out to refer to here to show I looked everything up.
The getCategoryInfo and related category-info-searching doesn't pertain to particular items. I get a <primarycategoryid> N/V pair in my item responses, but (I'm pretty sure) that's a leaf category (mapping 10,000+ leaf categories [even just the fraction I would use] to Amazon's product group-specific fee table would be a hell of a pain).
Again, how do I trace an <item> to it's ancestor/root category?

You can trace the root of a category via the PrimaryCategoryIDPath field that is returned when calling GetMultipleItems.
Keep in mind that this information is not returned unless you have specified Details in the IncludeSelector field as part of your request.
More information on PrimaryCategoryIDPath can be found here.

Related

Is it possible to use GetSellerList to get all the items listed by a different seller?

I am looking for a way to get all the items listed by a different seller. While this is possible to do through the eBay Browse API, there is a delay of a few minutes from when a seller lists an item to when it is visible in the eBay search.
As such, I am looking for a method to return all the items a particular seller (that is not me) has listed that will return the most up to date results.
I have found the https://developer.ebay.com/devzone/xml/docs/reference/ebay/GetSellerList.html method, but I am not certain if it is possible to use it on other sellers. Can I use this method or is there another method that can achieve the required functionality
under the title of the linked url it is written:
Use this call to retrieve items listed by the authenticated user, including item data.
therefore it is clearly not possibile
you could use finding API setting in the filter the username of the seller and get the list of (almost) all the item sold by such seller with few details:
if you need full details then you need to call getItem for each itemID retrieved by finding API
but since eBay released some years ago new APis, if you have to start a new project it can be wise not using the old trading APIs (and also Finding??) that though not deprecated yet, they might be soon

VirtoCommerce API getting item prices

I am using VirtoCommerce 2.9 and have some questions regarding the API and what would be the best way to get all the information I need, while keeping the number of API requests down.
Right now I am using the endpoint /api/catalog/search to find items that matches a number of attributes. But the response does not include prices and product texts. Both I would like to present to the end user. What would be the correct or best way to retrieve this information?
Thanks!
Cheers!
Currently search service does not return the description and price for the products.
To get this details you need to use separate queries
api/catalog/product/ids?respGroup='ItemSmall'
to get product detail with description and
api/pricing/evaluate
to retrieve actual products prices. You can call them in parallel for better performance.
Be aware to use WithProperties response group because it may cause
perfomance problem. Anyway product returned with all properties values
and this 'response group' is only responsible for retrieving properties meta-information
(as possible dictionary values, multilingual, required or optional flag etc) this information often used in admin area and in storefront almost not used.
Indexed search module will be serious changed in future versions, and you will be able to have more control over the product details in the search index.

REST API - Reduce number of POSTS operations

I have designed some API which have some nested resources and I am wondering how to reduce the number of POSTS when I am creating some records.
for example, I have the following resources:
/orders/
and
/orders/{order_id}/products/
at the moment I need to run two POST separately if I need to create a new order or a new order's product but I would like to reduce the time for this and run only one POST.
Is this possible? is there any documentation I can read about this?
Thank you
Although you might have found your answer in an other thread there is still some issue regarding your endpoint design.
The first intuition that your endpoint give is that product resource could exist in several place.
./orders/{order_id}/products/{prod_id}
./products/{prod_id}
The question you should ask yourself is: Do you really want to refer to product?
Can product be leaving outside of any orders?
Having a resource sitting in 2 different place might not be that great as you are managing 2 different endpoint with similar behavior. Keeping consistency between both endpoint is not that easy.
My 2 cent is to avoid the term product as it can be confused with a single instance of a product. For example if you sell a toothbrush branded AAA, sku 1234 an order is not compose by this product but by one off the item that you have in stock. The item is "instance" of the toothbrush branded AAA, sku 1234.
As I understand your question you are not really referring to a product but more to a stock-item which should be a unique id.
The resource stock-item if you decide to have one should exist prior to the order. I guess the customer is not adding item to your stock and at the same time purchasing this item.
In conclusion I think that you are not creating the stock-item resource at all when creating orders but just making a reference to it.

Bigcommerce API Get All Skus

I'm trying to load all Skus from a Bigcommerce store. I first tried to use the API path /products/skus/count to get a count of the number of skus in the store as outlined in the BC documentation at https://developer.bigcommerce.com/api/stores/v2/products/skus However, the /products/skus/count endpoint is returning {"count":0}. I know for a fact that I have hundreds of products with a sku. Ultimately I'd like to get a list or array of just the skus in my store. Has anyone else been able to use this API or know a way to load all the skus in my store without loading all the product object graphs as that is too slow of a solution as I don't need all the additional information nor do I want to page through all my products since it's limited to 250 items at a time. All of my other API calls are working great so I'm questioning whether there is an issue with the specific API.
Are you try to get the "sku" property for all products or the SKU resource associated with a product?
The api call at the url that you've given https://developer.bigcommerce.com/api/stores/v2/products/skus
will return all the SKU resource/object associated with a product. You can either get skus for all products using the resource "products/skus/count" or a specific product using "products/{productid}/skus/count". Both calls works as documented.

eBay API RelistFixedPriceItem vs AddFixedPriceItem when updating quantity

I am building a system that publishes products from our inventory to our eBay seller account. Everything is working fine, but I just keep thinking which call should I use when I update the quantity in our inventory.
RelistFixedPriceItem and AddFixedPriceItem both are working well, except that on eBay I will have same item with two different itemID, one is sold and one is active...
is that ok? Does it have something to do with eBay listing terms?
Any Advice?
Thanks
AddFixedPriceItem creates a new listing that does not include any data regarding the previous listing's statistics or sales data. RelistFixedPriceItem will create a listing for the product that does include the sales data from the original listing.
The eBay best match search engine uses a listing's sales stats as part of its algorithm to determine search standing. So if your original listing had a good number of views or sales, I would definitely recommend using ReslistFixedPriceItem. However, if your previous listings was stagnant for a long time without many views or sales, it might be more advantageous to use AddFixedPriceItem instead to give the listing a clean slate.
eBay is always changing their search algorithms, so there is no hard and fast rule here. You really just have to find out what works best for your particular products. Experimentation is key.