Magento API: V2 API Does Not Return Custom Order Attributes

I am working with a 3rd party integrator to make an integration between Magento and Sage AccPac. We planned from the beginning to pass them custom order attributes and custom order-item attributes, which I verified come through the API, seeing both custom order attributes, and custom order-item attributes returned.

Now that they’ve got their stuff up and running, I just got an email telling me that they do not see any of these custom attributes coming through. At first I thought maybe they were just blind, but through investigating further, I found that they are using .NET and therefore have chosen to use the V2 API.

I then experimented with the same method with the V2 and discovered that they are right. No custom order or custom order-item attributes are returned!

If I figure out why, I will update this post. If you know anything about this, please comment!


Actually, I found out that the V2 returns WAY less information than the standard soap API. Why is this!?

Update 2:

I believe I’ve found out the ‘why’ as to why there are so many fewer attributes, and why no custom attributes come through the V2 methods: According to a .NET developer I talked with, languages like .NET and Java need to know the number of properties that are going to be returned. For example, if .NET expects to get 5 attributes, but because of a custom attribute we added it gets 6, bad things happen. So, the V2 of the api will always only ever return a very specific set of attributes that does not change.

As for where in the code it is doing this limitation, I am not quite sure yet. When/if I figure it out, and how to modify it, I will make a post on that.

This entry was posted in Magento. Bookmark the permalink.

4 Responses to Magento API: V2 API Does Not Return Custom Order Attributes

  1. Ian Gallimore says:

    Here’s how it can be done:

    9 = my hardcoded product sku

    $product = $client_proxy->catalogProductInfo(
    ‘attributes’ => array(‘name’),
    ‘additional_attributes’ => array(‘custom_att1’ , ‘custom_att2’ , ‘custom_att3’ , ‘custom_att4’)

    Should it help anyone else…

  2. Afternoon,

    I have been pulling my hair out trying to make a custom webservice api for magento 1.5. I beleive all my configurations are correct but when I try to call a my api method, I get an error in the log, because magento is trying to open a my module as Mage/MyMoudule/Model instead of MyCompanyName/MyModule/Model..

    Why is magento looking at the service like it is a ‘Mage’ api call?

    Do you have a working example I can download an install to magento 1.5?

    Please help I am going crazyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy LMAO!

  3. Hi Josh,
    you can communicate custom order attributes using the v2 API. You have to take some additional steps though. If you don’t find information in the meantime, I’ll try to write a short tutorial over the weekend.