WooCommerce Serial Numbers API Docs

Along with the code comes a test script in the /examples folder of the plugin. This plugin allows you to post data to the API for testing purposes.

Note: This is a Developer level section. If you are unfamiliar with code and resolving potential conflicts, hire a us for assistance. We are unable to provide support under our  Support Policy.

Example code

A WooCommerce-powered shop using the WooCommerce serial numbers is listening for API requests via the wc-api request set to serial-numbers-api. All API requests can be called like this:

$data = wp_remote_get( 'http://yoursite.com/?wc-api=serial-numbers-api&request=request_key&...');

CHECK

The check API call is used to check if a license has been activated. The call must contain the email address of the license, the serial key and the product id linked to the license. It will return information about the current activations.

Status Endpoint

http://yoursite.com?wc-api=serial-numbers-api
ParameterTypeDescription
requeststringcheck
emailstringActivation email
serial_keystringThe license key provided to the customer.
product_idintegerProduct ID

ACTIVATE

The activate API call is used to activate a single use of a license. The call must contain the email address of the license, the license key and the product ID linked to the license.

Activate Endpoint

http://wcserialnumbers.test?wc-api=serial-numbers-api
ParameterTypeDescription
requeststringactivate
emailstringActivation email
serial_keystringThe license key provided to the customer.
product_idintegerProduct ID
instancestringThis can be used anything specific, like domain.
platformstringDecided by user, can be anything.(Optional)

DEACTIVATE

The deactivation API call deactivates a single use of a license. The call must contain the email address of the license, the serial key and the instance (set by activation call) of the activation. If the instance is left blank, activation for this license is deactivated.

Deactivate Endpoint

http://wcserialnumbers.test?wc-api=serial-numbers-api
ParameterTypeDescription
requeststringdeactivate
emailstringActivation email
serial_keystringThe license key provided to the customer.
product_idintegerProduct ID
instancestringInstance set at the time of activation
Was this article helpful to you? Yes 3 No