Getting Magento Version Using SOAP API V2 and C#


<strong>Background</strong>: I have built a tool that imports sales orders from Magento to a custom application. The function salesOrderList() worked fine on a customer's Magento Go store. Then it failed on another customer's store. The reason was the former store was version 1.6.x and the latter was 1.5.x. The function call returned two different data structures on the two versions (despite being the same API version, namely SOAP API V2), causing the problem. So I customized the tool to expect the 1.6.x data structure first and then fall back to 1.5.x if the former failed. Now, we have a new customer who seems to have Magento version 1.7. The data structure seems to have changed again in 1.7 for the same function (salesOrderList()).

<strong>Programmed Using</strong>: .NET (C#); Magento SOAP API V2

<strong>Question</strong>: Is there a function call to determine the Magento (1.5, 1.6, etc.) version of the store we are connecting to? I understand from another post that there is a MAGE::getVersion() call that they use in PHP, directly on the store (without SOAP API). Is there a .NET equivalent for this when using the SOAP API?

<strong>PS</strong>: I had posted the same question (a little less wordy though) as <em>user1236916</em> because I had temporarily lost the login information for this account. My apologies for the repetition.



The Magento core API is known to be very limited in the calls it provides by default. There is no call that returns the Magento version out of the box.

More infomation on the Magento core API can be found on the <a href="http://www.magentocommerce.com/support/magento_core_api" rel="nofollow">official Magento site</a>.

That being said the Magento API is designed to be extended and to do so is not overly difficult. You will need to create a Magento module that extends one of the core API resources (you will need to do this in PHP and have access to the Magento installation itself).

See <a href="http://inchoo.net/ecommerce/magento/magento-api-v2/" rel="nofollow">this post</a> for more information on how to extend the V2 Magento API.

In your extended API class simple create a function like so:

public function getVersion() { // static method to return the Magento version within the app return Mage::getVersion(); }


  • How to get Getopt::Long + pod2usage working?
  • Add filename and length parameter to WCF stream when Transfermode = Stream
  • Sticky Service not restarting after RAM full on Xiaomi / Huawei / Lava
  • Price range slider for my website
  • wsContext.getMessageContext().get(MessageContext.SERVLET_REQUEST) returns null on Jetty?
  • Testing custom SOAP Headers in ASMX
  • Getting EOFError along with exceptions when using ftplib
  • Transpose table then set and rename index
  • Struct pointer casts
  • Can you use DataSet and DataTables in a Portable Class Library
  • ConfigurationBuilder not working in azure function
  • Unable to play media with vlc ocx
  • conditions for accessors in Coldfusion ORM
  • Criterion causing memory consumption to explode, no CAFs in sight
  • Retaining data after updating application
  • How to handle elastic beanstalk deployment so it uploads only changed files
  • Regex to match a string not followed by anything
  • Filter strings with regex before casting to numeric
  • Undefined references when compiling gSOAP client
  • android google indoor map
  • TextToSpeech.setEngineByPackageName() triggers NullPointerException
  • Eloquent paginate function in Slim 3 project using twig
  • How to define custom class, title, and target in Link Browser for content elements and the new rte_c
  • How to attach a node.js readable stream to a Sendgrid email?
  • Can Jackson SerializationFeature be overridden per field or class?
  • Join two tables and save into third-sql
  • How to model a transition system with SPIN
  • Hazelcast - OperationTimeoutException
  • ORA-29908: missing primary invocation for ancillary operator
  • RestKit - RKRequestDelegate does not exist
  • Revoking OAuth Access Token Results in 404 Not Found
  • How to CLICK on IE download dialog box i.e.(Open, Save, Save As…)
  • embed rChart in Markdown
  • Bitwise OR returns boolean when one of operands is nil
  • MATLAB: Piecewise function in curve fitting toolbox using fittype
  • How to get NHibernate ISession to cache entity not retrieved by primary key
  • How can I use `wmic` in a Windows PE script?
  • Unable to use reactive element in my shiny app
  • Converting MP3 duration time