Custom Stock Status API Explained

Custom Stock Status API

Info
We have created a public API collection for Custom Stock Status module with all available queries and sample data that you can both test via our demo endpoints and copy to run local tests in your Magento environment. More details about using public collections can be found in the following FAQ post.

1. Amasty\Stockstatus\Api\RuleRepositoryInterface - class for managing custom stock status rules.
  1. POST /V1/amasty_stockstatus/rule, method="save" - create a custom stock rule;
  2. PUT /V1/amasty_stockstatus/rule/:id, method="save" - edit a custom stock rule;
  3. DELETE /V1/amasty_stockstatus/rule/:id, method="deleteById" - delete a custom stock status rule;
  4. GET /V1/amasty_stockstatus/rule, method="getById" - get details about a custom stock status rule;
  5. GET /V1/amasty_stockstatus/rule/all, method="getList" - get a list of all custom stock status rules.

      • Related Articles

      • What Amasty extensions support API?

        Each Amasty extension that has API support, includes the etc/webapi.xml file. The webapi.xml file contains API configurations with the list of available API requests. For example, a request from the Custom Form module interface: 1 - endpoint URL; 2 - ...
      • Can I test how your modules work with API?

        Our team have created a public Postman workspace where we provide access to API collections from our modules. You can copy these API collections to test them in your own Magento installation together with our modules, and some collections can be ...
      • Custom Stock Status | GraphQL methods

        Query getAmCustomStockStatus description: get information about a stock status
      • In my instance, all options for Custom Stock Status attribute are greyed out and I’m not able to edit them or add new ones

        The issue arises due to the reset entity in the DB that happens during module update/installation. In order to fix it, you need to modify the value of the is_user_defined entity in the DB.
This could be done with the following command:
 UPDATE ...
      • Custom Form API

        We have created a public API collection for Custom Form module with all available queries and sample data that you can both test via our demo endpoints and copy to run local tests in your Magento environment. More details about using public ...