Magento API

Like I have mentioned in the first post I am starting with magento, with the shop itself I am battling for some time now, but recently I desired to do something more:) (set-up store is just not enough). Because I am Flash fan I wanted to build an application that will replicate some or all of the functionality that are accessible through browser.

After few minutes of searching and querying on the forum I found that magento provides an API and it is accessible using either SOAP or XML-RPC protocols. I have chose XML-RPC to start with. My knowledge about web-services or protocols were at the beginning equal to zero, slowly I am filling up this vase.

My first task is to replicate the dashboard of the admin area, here are the milestones that I want to achieve:

  1. log in/log out
  2. dashboard functionality
    • lifetime sales
    • average orders
    • last 5 orders – customizable
    • last 5 search terms – customizable
    • top 5 search terms
    • bestsellers
    • most viewed products
    • new customers
    • customers
    • chart visualising
      • orders for given period of time
      • amounts (order revenue) for given period of time
    • grid displaying following values collected for given period of time
      • revenue
      • tax
      • shipping
      • quantity

Phew, that’s it:)

Ok, so I did first step, I can log in, log out and even get list of orders, so far so good. It wasn’t without headaches though.

I will write “how-to” with examples soon, meanwhile following are resources that you should read:)

http://www.magentocommerce.com/support/magento_core_api

http://www.tutorialspoint.com/xml-rpc/index.htm

happy coding:)

This entry was posted in flash, magento, xml-rpc and tagged , . Bookmark the permalink.