Fetch Eager Prestashop 1.7 Webservice - api

i'm doing an app using the prestashop webservice.
For some ressource it could be really long to get all the details of items; for instance, when i want to get all the product list and detail we have to :
retrieve all the id for the resource "products"
foreach prodct ask again the webservice to get the detail of each one
if we need the combination we have to loop again on each product association to get the combinations and ask again each time the webservice
I found a trick to de less request :
i get all the combinations
for each combination i get the details of each combination
for each combination i get the product details (if i doesn't get it once)
But finally it costs a lot in terms of requests.
Does anyone has a solution to override the webservice in prestashop to add a fetch type eager and get all the data at once for selected resources ?
Thank you !

Related

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.

Ebay API - How do I get item info for out of stock items

I'm trying to get item information by searching my ebay store. For example, if I enter this URL, it will search my store for a specific keyword and return info about the item.
http://svcs.ebay.com/services/search/FindingService/v1?OPERATION-NAME=findItemsByKeywords&SECURITY-APPNAME=MYAPPID&keywords=MYKEYWORD&itemFilter.name=Seller&itemFilter.value=MYEBAYUSERNAME
However, if an item's quantity goes to zero, the item is no longer visible in my ebay store and therefore, won't show any data. How can I get data for all items, even if they are out of stock?
Please note: the data I need to get is the ebay auction number (itemID)
Thank you.
If you are listing using the API then "custom label" on the front end of eBay is actually the SKU node in the API. Here is a list of API calls that utilize this node: <SKU>
So if you want to pull one item at a time, all you need to do is use is use the GetItem trading API request. Instead of passing in <ItemID>(string)</ItemID> pass in <SKU>(string)</SKU>, and you will get the ItemID in the return output xml.
But, this is if you want to pull each item one at a time. There is a limit on how many API calls you can make a day.
So, I would suggest using GetMyeBaySelling every so often to download all of your items and store the output to a database. The output for GetMyeBaySelling includes <ItemID>(string)</ItemID> and your custom label as <SKU>(string)</SKU>.
At this point you can write a little front-end WebPage or APP to pull the data you want from the database.

How to get list carts with magento API?

I working on Magento with carts. I using SOAP to create cart and add products to it. but can i get list of carts. And how to active it.
In dashboard of magento admin, i see
Reports > Shopping Cart > Abandoned Carts
with list of carts is active. Can i get it?
Thank a lot, sorry for my bad english.
If you want to see how the query behind the report is generated, have a look at https://github.com/magento/magento2/blob/83132783e0a6bed32c45e6d06df851865e668abc/app/code/Magento/Reports/Model/Resource/Quote/Collection.php#L54 - this is the code that forms the query. You can see the table fields it uses (e.g. checking if is_active, must be at least one item in cart, etc), then sorts by updated_at so oldest cart comes up first.
There is also a blog post at http://cyrillschumacher.com/2015/01/02/magento2---search-parameters-for-the-rest-api/ which describes (for the REST API) how to build a search. It is backed by the same data constructs as for SOAP.
You can use the end point http:///soap/default?wsdl&services=quoteCartRepositoryV1 to bring up the WSDL file.
Sorry, I don't have time right now to build up the SOAP request myself, but hopefully these pointers are useful to help you make some progress.

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.

Get stock_data from Magento API get request

I know I can get stock data when making a request for an individual product:
http://magentohost/api/rest/products/:id
But please tell me there is a way to get stock_data when requesting a list:
http://magentohost/api/rest/products
I'm trying to do large imports (>10k products) that include all this data, and doing it one-by-one is way too slow.
Anyone know a way around this?
http://magentohost/api/rest/stockitems
provides the list of product with stock inventory details for REST API.