=== Serial Numbers Api Importer === Contributors: pluginever Tags: WooCommerce Serial Number, API importer, license keys, software license, woocommerce Requires at least: 5.0 Tested up to: 6.9 Stable tag: 1.1.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Api Importer Addon for WooCommerce Serial Numbers! == Description == ** Serial Numbers Api Importer is an addon for WooCommerce Serial Numbers. By this addon you can import serial numbers you can import serial keys using api. ## Installation and Usage: Like most WordPress plugins, the installation of Serial Numbers Api Importer is very simple and straightforward. If you have any experience of installing a WordPress plugin, there is nothing new for you. Most importantly, you need to have WooCommerce installed and activated on your site. It requires WooCommerce to function properly. Also you need WooCommerce Serial Numbers installed and activated on your site. It requires WooCommerce Serial Numbers to function properly. ## How Does It Work: First of all, you need to install and activate the plugin to enjoy its features. Once you activate the plugin, you will find a option for adding access token in Serial Numbers General Settings Page. This token is for checking if any other user is trying to access the api. Import: The import API call is used to import keys into the database. The call must contain the token, the serial keys and the product id. It will perform the import operation and returns how many serial keys are imported. We added an sample code file in tests file where you can get the basic wordpress and curl code referrence ## REST API Endpoint (Recommended) https://yoursite.com/wp-json/serial-numbers-api/v1/import Request Type: POST Content-Type: application/json Example Request Body: { "token": "your-api-token", "keys": ["KEY-001", "KEY-002", "KEY-003"], "product_id": 123, "activation_limit": 1, "status": "available" } ## Legacy Endpoint (Deprecated) https://yoursite.com?wc-api=serial-numbers-import-api Request Type: POST Required Parameters: Parameter Type Description token string Access Token keys array of keys The Keys for importing product_id integer Product ID Optional Parameters: Parameter Type Description Default activation_limit integer Activation limit per key 0 order_id integer Associated order ID 0 status string Key status available validity integer Validity period in days 0 expire_date string Expiration date (Y-m-d H:i:s) 0000-00-00 00:00:00 order_date string Order date (Y-m-d H:i:s) 0000-00-00 00:00:00 created_date string Created date (Y-m-d H:i:s) current time == Installation == 1. Upload the plugin files to the `/wp-content/plugins/plugin-name` directory. 1. Activate the plugin through the 'Plugins' screen in WordPress == Changelog == = 1.1.0 (14th January 2026) = * New: Added WordPress REST API endpoint for importing serial numbers. * New: REST API endpoint: /wp-json/serial-numbers-api/v1/import * Enhance: Improved security with timing-safe token comparison. * Enhance: Better input sanitization using wp_unslash(). * Fix: Fixed order_id parameter using wrong request variable. * Fix: Fixed strict comparison issues. = 1.0.1 (15th January 2026) = * New: Completely rewritten the plugin to follow better coding standards and practices. * Enhance: Improved optimized autoload classes for better performance. * Fix: Fixed minor bugs and issues. = 1.0.0 (13 August 2020) = Initial release