Things to remember when calling API methods

It’s been frustrating hour, I’ve been sitting and trying to figure it out why my call to sales_order.list doesn’t work, I thought “it can’t be” everything is fine (looks like) but it returns

faultCode=620 faultMessage=”Method “sales_order.list” does not exist”


the enlightenment came to me with a delay:) There are 3 types or groups of API that magento supports, Magento Basic API, Magento Core API and Custom API
The Magento Basic API lists following methods:

  • startSession()
  • endSession(sessionId)
  • login(apiUser, apiKey)
  • call(sessionId, resourcePath,array arguments)
  • multiCall(sessionId, array calls,array options)
  • resources(sessionId)
  • globalFaults(sessionId)
  • resourceFaults(sessionId, resourceName)

And these methods are interface to use the Magento Core API or your custom API, basically I was calling sales_order.list directly but I should use “Call” or “multiCall”.

I hope that I have saved someone a bit of frustration,

cheers

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