WooCommerce Products Sync from External API | WooCommerce API authentication

WooCommerce Products Sync from External API | WooCommerce API authentication


WooCommerce is one of the biggest eCommerce platforms on which you can build your online store and increase your business's presence on the internet globally. WooCommerce provides multiple features which you can use and benefit your business. One such feature is the ability to connect WooCommerce to External APIs. External APIs allow being used within an organization or by any person outside the organization who wants the interface access. These External APIs are accessible to External, Third-Party Partners. If a person wants to access these APIs they will require API Keys and security Tokens.

When it comes to using External APIs in WordPress/ WooCommerce the most basic functionality is in which we need to fetch data from an external, third-party API provider and use this data to display it on our WordPress website to process it further. This can be easily done by using our Custom API for WordPress plugin in which webhooks are provided, using which calls to External APIs can be made whenever required. These hooks can be integrated easily with the third-party plugins in WordPress like – Woocommerce, Wpforms, Gravity forms, Fluent forms, Elementor, Payment gateways, etc. Our plugin allows you to import products,categories, tags, product images and display them on your e-store.

Import Products from API to WooCommerce

    There are a couple of ways to import data into your WooCommerce site. They are:
  • Traditional way: It includes importing Woocommerce products data manually from CSV/XLSX files. The problem with this approach is that it is very time-consuming and inefficient. It will take a lot of time to sync a small number of products and you need to do it manually - first, download the data from an external provider and then upload the files in Woocommerce.
  • Modern way: It includes adding or updating products and their data (like Product Name, Product Quantity, Product Status, Product Price, Product SKU, etc) automatically via External REST API on a real-time basis. A scheduler will synchronize all the products and update details automatically according to the set time interval. We also provide a button to sync product details as per your wish manually, anytime, and any number of times.
  • Benefits of WooCommerce Product Sync from External APIs

    • Real-Time WooCommerce product sync from Third Party APIs automatically.
    • Automate products sync in the WooCommerce store when a product is added or updated.
    • Sync stock status of WooCommerce across stores.
    • Scheduled WooCommerce Product Sync based on any custom time interval.
    • Sync all the details related to products like product name, product description, product images, product category, list pricing, quantity, stock status (in stock, out of stock), brand, or any custom attribute you have in the Woocommerce products table.
    • No more manual work is needed if you choose automatic WooCommerce product sync using the scheduler.
    • Design architecture is Future-proof.

Use-Case: WooCommerce API product sync

    Suppose you have a WooCommerce store on WordPress. You want to sync products from a third-party inventory API on regular basis and update the items in on your website. You will require our plugin Custom API for WordPress’ enterprise plan to create a custom API through which you can sync products to your WooCommerce site using our WooCommerce Sync Add-on. This integration will help you sync data (WooCommerce Products) to WooCommerce site from external third-party inventory. This process can be automated so that syncing happen at regular intervals and also we provide a Sync Button in WooCommerce if you want to sync manually at some time.

    If you wish to extend your WooCommerce with WordPress eCommerce site and connect two WordPress sites and fetch/update data from one website to another, that can be taken care of with Custom API for WordPress Plugin.

Uses of Custom API for WordPress

    Custom API for WordPress plugin allows you to integrate external APIs to fetch and update data from third-party platforms such as Woocommerce, Google Merchant Center, Alidropship, or WordPress plugins. You can also create your own APIs in WordPress with an easy-to-use GUI to interact with WordPress database tables to perform add/update operations using custom SQL queries.

    With Custom API for WordPress plugin, you can use filter operations to filter out the data you want to show in the API endpoint response. This will assist you in successfully organizing your inventory products while also keeping track of their status. To take the security of your custom API endpoints to the next level, we also provide you with extremely secure authentication methods such as API key authentication, Basic authentication, JWT authentication, and the most secure OAuth 2.0 authentication method.

    If you wish to extend your WooCommerce with WordPress eCommerce site and connect two WordPress sites and fetch/update data from one website to another, that can be taken care of with Custom API for WordPress Plugin.

    WooCommerce API product sync

Custom Requirements

If you have any questions or if you have any other use-cases which you would like to discuss with our team of engineers please feel free to reach out at apisupport@xecurify.com and we will revert back to you in under 24 hours to understand your detailed use-case and make the customizations according to your requirement.

Setup: WooCommerce API product sync

  1. Firstly you would need to make connection with your External API using the Connect to External API feature present in the Custom API plugin
  2. You can directly map the API data coming from the External API with the attributes of Woocommerce.
  3. The attribute value would be the key value of the JSON data, which contains the information that you are looking for.

    Consider the example JSON data coming from your external inventory.

    Status: 200  
        {
      "productName":"Test",
      "sku":1010101010,
      "quantity":10,
      "price":500,
      "categories":"test",
      "images":{"small": "test.png"},
      "brandName":"Brand",
    }
    

    Then you would need to map the key values product name, SKU, etc in the Attribute Value column.

    WooCommerce API product sync

    The plugin also handles the mapping of custom Woocommerce columns such as Brands and other columns that are in the Woocommerce Product table, with the API data. The values of these custom WooCommerce are usually stored in the post meta column of WordPress. You just need to check the post meta column of that custom column and then map it with API data.

    WooCommerce API product sync

    To sync the images we use the Standard REST API given by WooCommerce. For that, you would need to configure the Consumer ID and Consumer Secret provided by WooCommerce.

    If you do not have the credentials, you can find them on

    Woocommerce -> Settings -> Advanced -> REST API -> Add Key

    WooCommerce API product sync

    After the mapping of all the above options, you can just click on the Sync button, which would further sync the external inventory products into your Woocommerce products data.

    WooCommerce API product sync

    We also provide the solution to sync the data from your external inventory to your Woocomeerce periodically using a CRON job. This method would basically sync your data in the background continuously.

Additional Resources

Recommended Plugin

Below plugin “Custom API for WordPress” is required with its Enterprise Plan in addition to WooCommerce Sync Add-On to import products to WooCommerce from external API.

This plugin allows you to create custom endpoints/REST routes to fetch/modify/create/delete data with an easy-to-use graphical interface and with the custom SQL queries as well. Also, the plugin provides the feature to integrate external API into your WordPress site with third-party platforms.

 Tested with 5.9.2
Hello there!

Need Help? We are right here!

support
Contact miniOrange Support
success

Thanks for your inquiry.

If you dont hear from us within 24 hours, please feel free to send a follow up email to info@xecurify.com