Developer

Developer documentation and integration examples

Sub-categories

Articles

API Overview

The License Server for WooCommerce plugin has a built in REST API that can be used to manage licenses and retrieve product/software details. Here is a list of the supported API Endpoints. The current version of the API is version one available at the endpoint `<domain>/wp-json/slswc/v1/` and has the following endpoints. POST /wp-json/slswc/v1/activate POST /wp-json/slswc/v1/deactivate…

Actions

do_action( 'slswc_license_expired_notifications', $this, $mailer ); Run hook before sending expired license notification. This is mainly important for sending custom expired license notification emails or performing an action when sending expired emails. Parameters: $license – Instance of SLSWC_WooCommerce_License which the the license object. $mailer – The WC_Mailer object responsible for sending the expired license notification email.…

Connect

POST /wp-json/slswc/v1/connect Connect a user’s account to the License Server API.  If using the client, this will allow the user’s purchases to be retrieved through the API and thus allowing the customer to download and install products directly from the client. Parameter Datatype Example Description Parameter Datatype Example Description username String required username The customer’s…

Product

GET /wp-json/slswc/v1/product Get a single software product. This will return the publicly available information about the product/software. Parameter Datatype Example Description slug String required test-plugin The slug of the product/software being requested. Example failed response { "message": "Product not found", "product": null, "status": "not_found" } Example valid response { "status": "ok", "product": { "slug": "test-plugin",…

Products

GET /wp-json/slswc/v1/products Get a list of software products. Depending on the arguments provided, this will return publicly available information or include valid download information if user authentication or license keys were provided. Request Parameters Parameter Datatype Example Description Parameter Datatype Example Description type String required plugins/themes The type of software to be returned. query_args Array…

Activate a license key.

Activate a license key via the API. To activate a license via the API You should post to the api endpoint: POST wp-json/slswc/v1/activate Parameter Datatype Example Description Parameter Datatype Example Description license_key String required Ss23dhsjhdjshjhfddfr The license key to be activated. This must be a valid. slug String required testplugin The slug of the software.…

Cache Expiry Filters

When caching is enabled. The cache expiry time can be changed by adding filters. The filters in the table below are the filters that can be used depending on which expiry time needs to be changed. Default values for all this filters is 12 hours but converted int an equivalent number of seconds using 12…

Deactivate a license

Deactivate License Deactivate a license key through the API. POST /wp-json/slswc/v1/deactivate Parameter Datatype Example Description license_key String required Ss23dhsjhdjshjhfddfr The license key to be activated. This must be a valid. slug String required testplugin The slug of the software. This must be a valid slug unique to each software product domain String optional example.com The…

Add Domain

POST /wp-json/slswc/v1/add_domain Add a domain to a license. This will add the domain to the list of activated domains for the license. Parameter Datatype Example Description license_key String required Ss23dhsjhdjshjhfddfr The license key to be activated. This must be a valid. slug String required testplugin The slug of the software. This must be a valid…

Remove Domain

POST /wp-json/slswc/v1/remove_domain Remove a domain from a license. This will remove the domain from the list of activated domains for the license. Parameter Datatype Example Description Parameter Datatype Example Description license_key String required Ss23dhsjhdjshjhfddfr The license key to be activated. This must be a valid. slug String required testplugin The slug of the software. This…