I'm evaluating is it possible to create a mobile app by using the rest api / soap. i've checked the rest api, seems there are some feature are missing in rest api, for example: adding the product into shopping cart, checkout
http://www.magentocommerce.com/api/rest/introduction.html
on the other hand, seems the soap is more complete http://www.magentocommerce.com/api/soap/checkout/cartProduct/cartProduct.html
anyone has experience in magento api? is it possible to create mobile app (add product to cart then checkout) using the rest api / or soap and also using phonegap on mobile side?
-
devdocs.magento.com/guides/v2.2/get-started/order-tutorial/…sivakumar– sivakumar2018年06月27日 13:42:26 +00:00Commented Jun 27, 2018 at 13:42
3 Answers 3
The Magento 2 REST Apis are a lot more extensive than out of the box in Magento 1, and it is easy to add new Apis of your own to fill gaps. If you want to learn more, have a look at http://devdocs.magento.com/ and navigate to the "web service developer" menu.
(The documentation is still under development, but to get a feel of the new REST API coverage have a look at http://devdocs.magento.com/guides/v2.0/rest/list.html.)
-
,you are welcome.thanks for info. Can please magento 1 wiki on in magento.... we need it.... See this meta question /.....meta.magento.stackexchange.com/questions/615/…2015年07月23日 04:22:14 +00:00Commented Jul 23, 2015 at 4:22
-
Oh, I wrote a blog post showing extending the REST API in Magento 2 in case of interest as well: alankent.wordpress.com/2015/07/24/… - not hard to fill API gaps yourself if needed, or if you have a custom API your own module wants to export.Alan Kent– Alan Kent2015年07月28日 00:19:32 +00:00Commented Jul 28, 2015 at 0:19
You can't use the rest api for a mobile app.
Like you said it misses a lot of features. It only allows you to list products. And there is no pagination on the REST API calls. So if you have like 30K products the API is unusable.
But I think you can use the SOAP API, although that might be incomplete also if you need complex features. For listing products and adding them to the cart it should work.
To retrieve the catalog data look at what methods you have available: http://www.magentocommerce.com/api/soap/catalog/catalog.html.
Also for the customer you can check this: http://www.magentocommerce.com/api/soap/customer/customer.html. I guess there is no login functionality.
-
thx, i'm try to use jquery soap to call the api, but i'm wondering how to do customer login/retrieve cateogyr/product, anywhere i can get these information?hkguile– hkguile2014年07月07日 06:11:24 +00:00Commented Jul 7, 2014 at 6:11
-
@hkinterview. See my update.Marius– Marius2014年07月07日 06:23:19 +00:00Commented Jul 7, 2014 at 6:23
-
i found that there is no customer login in soap api, but REST seems can do that, am i right? So if i want to create a mobile app, so i need to use all of them?hkguile– hkguile2014年07月07日 06:43:22 +00:00Commented Jul 7, 2014 at 6:43
-
@hkinterview. I'm not that good with the rest API from Magento, but if you say it works , I guess you have to use both of them.Marius– Marius2014年07月07日 06:46:58 +00:00Commented Jul 7, 2014 at 6:46
-
1Magento API is only provides admin services , services for frontend are not available such as login, compare ,wishlist etchuzefam– huzefam2014年07月07日 07:19:20 +00:00Commented Jul 7, 2014 at 7:19
Magento's REST API, as you pointed out, is not feature complete. It does not support something as simple as retrieving a list of all product categories.
Magento's SOAP API is exhaustive and feature complete but working with a SOAP server with an iOS app as the client is not a pleasant experience. I personally faced a lot of performance issues. Other than that, managing customer login through SOAP is quite painful.
If you want to stick with Magento's APIs, your solution will need to use REST as well as SOAP APIs. REST will be used for user authentication and SOAP will be used for shopping cart, placing orders etc.
To address these problems, we at MobStac have created an abstraction for a lot of missing APIs in Magento, in the form of an iOS SDK. Check out our SDK by signing up at http://developer.mobstac.com/
-
Do you have api ready? I would be interestedFahim Parkar– Fahim Parkar2017年01月26日 10:51:52 +00:00Commented Jan 26, 2017 at 10:51