Magento REST API Create Method - Resource Method Not Implemented

Magento REST API Create Method - Resource Method Not Implemented

August 8, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento REST API Create Method - Resource Method Not Implemented

Magento REST API Create Method - Resource Method Not Implemented

Introduction

When trying to extend the REST API of Magento to add configurable products, you may encounter the error “405 - Resource Method Not Implemented.” This blog post will guide you through understanding and resolving this issue, providing a thorough developer’s perspective.

Understanding the Issue

The error “Resource Method Not Implemented” indicates that the specified method for creating a resource is not configured correctly in your API configuration files. In this case, Magento recognizes the /magepim/products endpoint but fails to execute the POST (create) operation because the underlying model or override is missing or incorrectly mapped.

Analyzing Your Configuration

1. api.xml

The provided api.xml file defines a resource group and methods for your custom API extension (extapi). The relevant sections are:

<resources>
    <extapi_catalog translate="title" module="api2">
        <!-- ... -->
        <methods>
            <!-- ... -->
            <create translate="title" module="api2">
                <title>Create products</title>
                <acl>extapi/product/create</acl>
            </create>
            <!-- ... -->
        </methods>
    </extapi_catalog>
</resources>

Here, the <create> element specifies that a POST method is available for creating products.

2. api2.xml

The api2.xml file defines your API version (V2) and maps resources to their corresponding models:

<resources>
    <extapiproducts translate="title" module="api2">
        <!-- ... -->
        <sort_order>10</sort_order>
        <privileges>
            <admin>
                <create>1</create>
                <!-- ... -->
            </admin>
        </privileges>
        <!-- ... -->
    </extapiproducts>
</resources>

The <privileges> section explicitly grants the admin user permission to create resources.

3. V1.php

Your override for the product creation method (Magepim_Extapi_Model_Catalog_Api2_Product_Rest_Admin_V1) contains the _create() and _multicreate() functions:

protected function _create($data)
{
    // ... (rest of the code)
}

protected function _multicreate($data)
{
    // ... (rest of the code)
}

The _create() method should handle single product creation, while _multicreate() handles multiple simultaneous creations.

Resolving the Issue

1. Check Method Mapping

Ensure that your API configuration files (api.xml, api2.xml) are properly mapped to the override model (V1.php):

  • In api.xml, the <model> attribute of the resource should point to the correct module and model.
  • In api2.xml, the <model> and <working_model> attributes should also point to the same target.

2. Verify Override Functionality

Check if your override methods are correctly implemented:

  • The _create() method should validate input data, create a new product object, and save it to the database.
  • If multiple products need to be created simultaneously, use the _multicreate() function instead of _create().

3. Debugging Steps

  1. Enable Magento’s debug mode in app/etc/local.xml:
<config>
    <global>
        <debug>
            <template_hints>0</template_hints>
            <translate_inline>0</translate_inline>
            <log>1</log> <!-- Set log to 1 -->
            <profiler>1</profiler> <!-- Set profiler to 1 -->
        </debug>
    </global>
    <!-- ... -->
</config>
  1. Check the error logs (magento/log/debug.log) and API request logs for any relevant information.

  2. Inspect your override methods step-by-step using a debugger or var_dump()/print_r() statements to identify where the flow breaks.

4. Extending Documentation

To complement Magento’s official documentation on extending APIs, consider the following resources:

  1. Magento REST API Guide - The Swagger UI provides a comprehensive guide to available endpoints and their parameters.

  2. Mage Commerce API Extensions - This GitHub repository demonstrates how to extend Magento’s core API with custom modules.

  3. Magento REST API Tutorials - Mage Commerce’s official tutorials cover various aspects of working with the REST API, although they focus more on consuming than extending it.

Conclusion

Resolving Magento REST API extension issues often requires a deep understanding of the underlying architecture and careful configuration of your custom modules. By following the debugging steps outlined above and leveraging available resources for extended documentation, you can effectively troubleshoot and resolve these challenges.

Remember that maintaining clear code organization and adhering to best practices will significantly simplify the process of extending Magento’s capabilities through REST APIs.

For further guidance on Magento development best practices, consider exploring Laravel Company’s resources on Magento extensions and API management.

Catalog API Extensions Configuration

Our network