Search code examples
phpapirestjoomlavirtuemart

How can I connect to Virtuemart using RESTfull API?


I need to work on a mobile app for a Virtuemart shop and I did not find any RESTfull API to do this. I googled a lot, but without success.

Do you know anything that can help me with that?


Solution

  • I don't think Virtuemart has a RESTful API interface. If you really need to expose Virtuemart as a web service, you may want to consider a commercial extension I developed for Joomla: cAPI http://getcapi.org.

    As long as you are running at least Joomla 3.4.x and above, cAPI will expose you website via a JSON-compatible API to provide access to:

    (including but not limited to) - remote Joomla user login - remote Joomla user session management (close-out connected Joomla sessions via cURL, AJAX, etc.) - Joomla user profile management - Content create, read, update, delete - Category create, read, update, delete - schema retrieval for Joomla com_content articles and categories

    API users can be managed via the Services Control Panel.

    Access control includes: - username/password login via URL call - token-based authentication via URL as well as custom header ("token")

    The API also provides rate-throttling using the "leaky-bucket" method to control requests per minute. It's even provides throttle details in the response header to let connecting applications know when they are about to reach a throttle limit. This way, you can programmatically slow down access to avoid having your requests blocked (the whole point being that you want to protect your server from request overload).

    The cAPI Core package focuses on a subset of native Joomla functionality (growing over time), If you need service endpoints created for Virtuemart, you could create them yourself or contact me to request custom programming.

    You may find more information on other posts, here:

    REST API for Joomla 3.0

    How to Install and use joomla rest api step by step

    Good luck!