Full Data Refresh API

Full Data Refresh API

by H2 SNC


Magento Platform
Open Source (CE)
2.0, 2.1, 2.2

Tech Specifications

Current Version:
Stable Build
21 February, 2018
Extensions, Site Optimization
License Type:
Open Software License 3.0 (OSL-3.0)


This module allows you

  • to clear the cache,
  • to regenerate indexes,
  • to apply discount rules (both cart and catalogue rules),

with a single API call.


Back to top

This module has been conceived and developed for people that use “cart rules” and “catalogue rules” on Magento or upgrade products via API calls. Have you ever had problems viewing in real time changes while updating stocks, prices, pictures or data on the frontend of Magento? This happens because you are forced to wait several minutes (even hours) before Magento clears the cache, index-reorganizes information and applies all discount rules.

Moreover, by its own nature, Magento does not have a specific API that iterates these operations. For every situation above, the user needs to proceed manually (through signing-in a backend).

Thanks to this module you can finally automate these three stages with a single API call. It will use the same REST paradigm of Magento’s API, providing a JSON result.

Here is an example that should illustrates why this API is so useful.

  • Suppose that you are creating new discount rules (either cart rules or catalogue rules) or uploading new products and categories, or even adding new features to a product’s description. Imagine applying these changes via the REST API system of the Magento2.
  • Clearly you want to have tangible evidence of how these changes will positively affect the frontend, i.e. verify that all the changes made are correctly uploaded and visible on the e-commerce website. Unfortunately, this rarely happens.

There are three reasons for this:

  • the index needs to be regenerated
  • is necessary to apply cart and catalogue rules;
  • the cache of Magento2 needs to be cleared and recreated.

At this point the only solution would be to sign-in a backend and manually force these three stages. Obviously, this does not make sense, especially when your e-commerce constantly needs to be upgraded with internal managements systems or with others software.

In conclusion, with a single API call, this module allows you:

  • to clear the cache
  • to reorganize all contents (mostly captions and prices)
  • to apply discount rules (both cart and catalogue rules)

Using this module, you will immediately see how all the changes you made are correctly updated on the frontend of your e-commerce!

Features of this extension:

  • Clear the cache
  • Automatic index refresh
  • Apply cart and catalogue rules
  • Easy installation
  • Easy configuration
  • Multistore compatibility

We hope you will find it useful.

Release Notes

Back to top


  • Compatible with Open Source (CE) : 2.0 2.1 2.2
  • Stability: Stable Build
  • Description:

    #Magento2 Apifix

    This module allow you to:
    1. Clean cache
    2. Reindex all
    3. Apply rules (catalog and cart)
    with a REST API specific call.

    1. Copy files in magento 2 app/code folder
    2. Execute these commands from shell

    $ ./bin/magento cache:disable
    $ ./bin/magento module:enable Hdue_Apifix
    $ ./bin/magento setup:upgrade
    $ ./bin/magento cache:enable

    ##Testing and using
    1. Obtain token (standard REST API call: {$base_url}/index.php/rest/V1/integration/admin/token)
    2. Use this token in this call:

    $ch = curl_init("{$base_url}/index.php/rest/V1/hdue/apifix/fixall");
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", "Authorization: Bearer " . json_decode($token)));

    $result = curl_exec($ch);
    $data = json_decode($result);


Back to top
The best place to start if you need help with a specific extension is to contact the developer. All Magento developers have both a contact email and a support email listed.

Q & A

Back to top


Back to top