I wonder if Magento provide API for following.
- Product Search.
- Add to Wishlist.
- View wishlist.
- Add to cart.
If it does provides API for above, Can any one share useful resource for it.
Thanks
I wonder if Magento provide API for following.
- Product Search.
- Add to Wishlist.
- View wishlist.
- Add to cart.
If it does provides API for above, Can any one share useful resource for it.
Thanks
Product Search - NO.
Add to Wishlist - NO.
View wishlist - NO.
Add to cart - YES. see shoppingCartProductAdd
for V2 and shopping_cart_product.add
for V1
Product Search. Add to Wishlist. View wishlist. Add to cart.
http://localhost/magento/rest/V1/products?searchCriteria[filter_groups][0][filters][1][field]=name&searchCriteria[filter_groups][0][filters][1][value]=%25<Name_Of_Product>%25&searchCriteria[filter_groups][0][filters][1][condition_type]=like
http://localhost/magento/rest/V1/carts/mine/items/
Note : Add Items to a cart of a registered customer. Two things we have to send in request, first token & second is cartItems detail. e.g. Body to be load in POST request
{"cartItem": {"sku": "WS1M-Orange-Flav","qty": 1,"quote_id": "4"}}
Yes, Magento API is extendable using custom API models in your extension. We are frequently using Magento API extends for both inbound/outbound calls. Magento supports multiple API backends - Rest, SOAP, XML-RPC (v1), v2 only REST and SOAP if I remember correctly.
Magento 1
http://devdocs.magento.com/guides/m1x/api/rest/introduction.html http://devdocs.magento.com/guides/m1x/api/rest/Resources/resources.html
Magento 2 http://devdocs.magento.com/guides/v2.0/get-started/bk-get-started-api.html