3

Is there any RESTful API to add product to cart in Magento? I know it can be done using SOAP/XML but I am looking for solution using RESTful/JSON.

Thanks in advance

3
  • Any reason you dont want to use XML or SOAP? Commented Nov 20, 2012 at 17:56
  • Latest versions of the browsers provides native & safe support for encoding and decoding JSON. Commented Nov 20, 2012 at 17:59
  • Also, JSON is more isomorphic with the relational data stores most services use for persistence. Faster too. Commented Nov 20, 2012 at 18:00

2 Answers 2

1

2015 - If you are looking for an answer like me, with Magento 2.0 this is now possible.

http://devdocs.magento.com/swagger/index.html

POST /V1/carts/{cartId}/items

Look for quoteCartItemRepositoryV1. There is a post method to add product to the cart.

Sign up to request clarification or add additional context in comments.

Comments

0

right now we can just view the information using RESTful API like retrieve the inventory, orders, products, customers list and information.

Yes, you can extend the functionality of the api to add product to cart.

1 Comment

One year later... ;) I've the same problem. Can you give a little hint how to start?

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.