Getting 'Error cannot find parameter' when creating category with Magento SOAP API v1 and Savon Ruby Gem v2

Getting 'Error cannot find parameter' when creating category with Magento SOAP API v1 and Savon Ruby Gem v2

October 6, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Getting 'Error cannot find parameter' when creating category with Magento SOAP API v1 and Savon Ruby Gem v2

Solving ‘Error cannot find parameter’ Issue with Magento SOAP API v1 and Savon Ruby Gem v2

Background

You’re trying to create a category using the Magento SOAP API with the Savon Ruby gem version 2, but you’re encountering an error message. Let me provide a step-by-step solution to address this issue.

Firstly, ensure that your environment is set up correctly. You should have access to the Magento SOAP API endpoint and valid credentials (username and API key). The Savon gem should be integrated properly in your Ruby application.

Understanding the Error

The error message “Error cannot find parameter” suggests that there’s an issue with how you’re sending parameters or structuring your request. This is a common problem when dealing with SOAP APIs, as they require specific XML formats and parameter names.

Let me break down the issues in your current approach:

  1. You’re trying to create a category using only the parentId and name. While this might work for some other API methods, it doesn’t meet the requirements of the catalog_category.create method as documented by Magento.

  2. The documentation clearly states that you need a hash with specific keys: parent_id, category_data, where category_data is another hash containing attributes like name, is_active, etc.

  3. In your code, you’re not using the correct structure for the categoryData. You’re sending it as a flat key-value pair instead of nested within the expected structure.

The Correct Approach

To solve this issue, we need to follow the exact structure and parameter names specified in the Magento API documentation.

Here’s how I would refactor your code:

@response = @client.call(:call, message: {
  session: @token,
  method: 'catalog_category.create',
  parent_id: 90,
  category_data: {
    name: 'Fooooo',
    is_active: true,
    available_sort_by: '',
    default_sort_by: '',
    include_in_menu: true
  }
})

Notice a few key changes:

  1. I’ve placed the category_data parameters inside another hash ({}) to match the expected structure.

  2. The parameter names are now lowercase and use snake case, which is the standard for Magento API calls.

  3. I’ve included all required attributes with their default values (or empty strings).

  4. I’ve set is_active to true. In your specific case, you might want to adjust this based on your requirements.

Conclusion

The key takeaway here is that when working with SOAP APIs like Magento’s, it’s crucial to follow the exact parameter structure and naming conventions specified in the official documentation. Even a small deviation can lead to errors like “Error cannot find parameter”.

Remember to always refer to the Magento API Documentation for the latest information on available methods, required parameters, and expected formats.

If you’re still encountering issues or need further assistance with your Magento development needs, feel free to reach out to our team at Laravel Company. We specialize in providing expert solutions for various e-commerce platforms.

Catalog API Errors

Our network