Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I correctly call Magento SOAP API with Ruby Savon for Category Product Links?
    primarykey
    data
    text
    <p>I am trying to call the <code>catalog_product_link.list</code> API method using <a href="https://github.com/savonrb/savon" rel="nofollow">Savon</a>. However, I keep receiving the error <code>Error cannot find parameter</code>.</p> <p>Here is what I am using, though I have tried several variations of the call and still cannot get it to go through correctly:</p> <pre><code>client = Savon.client(wsdl: 'http://localhost/index.php/api/soap/?wsdl') response = client.call(:login){message(username: 'user', apiKey: 'key')} session = response.body[:login_response][:login_return] #These all do not work client.call(:call){message(:session =&gt; session, :method =&gt; 'catalog_product_link.list', :type =&gt; 'up_sell', :productId =&gt; '166')} client.call(:call){message(:session =&gt; session, :method =&gt; 'catalog_product_link.list', :type =&gt; 'up_sell', :product =&gt; '166')} client.call(:call){message(:sessionId =&gt; session, :resourcePath =&gt; 'catalog_product_link.list', :args =&gt; {:type =&gt; 'up_sell', :product =&gt; '166'})} client.call(:call){message(:sessionId =&gt; session, :resourcePath =&gt; 'catalog_product_link.list', :args =&gt; {:type =&gt; 'up_sell', :productId =&gt; '166'})} client.call(:call){message(:sessionId =&gt; session, :resourcePath =&gt; 'catalog_product_link.list', :arguments =&gt; {:type =&gt; 'up_sell', :product =&gt; '166'})} </code></pre> <p>Is there a different way to format to get this to work?</p> <p><strong>UPDATE</strong>: If I try removing the type parameter, it gives the error <code>Given invalid link type</code>, so it appears it does not like something about multiple parameters.</p> <pre><code>response = client.call(:call){message(:session =&gt; session, :method =&gt; 'catalog_product_link.list', :product =&gt; '166')} </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload