5

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?

1

3 Answers 3

4

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.)

2
3

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.

7
  • 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
    Commented Jul 7, 2014 at 6:11
  • @hkinterview. See my update.
    – Marius
    Commented 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
    Commented 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
    Commented Jul 7, 2014 at 6:46
  • 1
    Magento API is only provides admin services , services for frontend are not available such as login, compare ,wishlist etc
    – huzefam
    Commented Jul 7, 2014 at 7:19
3

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/

1
  • Do you have api ready? I would be interested Commented Jan 26, 2017 at 10:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.