Warning: Invalid argument supplied for foreach() in /home/customer/www/licenseserver.io/public_html/wp-content/plugins/woo-mailerlite/includes/shared/api/class.woo-mailerlite-rewrite-api.php on line 83
Products - Software License Server for WooCommerce

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

ParameterDatatypeExampleDescription
ParameterDatatypeExampleDescription
typeString requiredplugins/themesThe type of software to be returned.
query_argsArray optionalarray(‘post_name__in’ => array( ‘slug-one’, ‘slug-two’));The query args to search for products. This must be valid Query Args as accepted by WordPress for searching for posts. See parse_query parameters.
licensed_productsArray optionalarray(‘test-plugin’ => array (
‘license_status’ => ‘active’
‘license_key’ => ‘158aae50e6d3b8dcbd505dcc101421e957e22c86’
‘license_expires’ => ‘2020-06-16’
‘current_version’ => ”
‘environment’ => ‘live’
)
List of license details for specific products.
api_keysArray optionarray(
‘username’ => ‘validusername’,
‘consumer_key’ => ‘validconsumerkey’,
‘consumer_secret’ => ‘validconsumersecret’
)
The API connection keys.

If the licensed_products and api_keys parameters are not provided then only publicly available information will be received for each product matching the query_args or built in defaults.

Example Response

{
    "products": {
        "test-plugin": {
            "slug": "test-plugin",
            "description": "Description.",
            "thumbnail": "http://example.com/path/to/thumbnail",
            "author": "author name",
            "required_wp": "4.0",
            "compatible_to": "5.1.1",
            "updated": "2019-04-24",
            "change_log": "Changelog.",
            "installation": "Installation instructions.",
            "documentation_link": "http://example.com/url/to/docs",
            "average_rating": 4,
            "reviews_count": 4,
            "activations": "9",
            "banner_low": "http://example.com/url/to/banner.jpg",
            "banner_high": "http://example.com/url/to/banner.jpg"
        }
        "another-slug": {
            // Product & Download Details
        }
    },
    "status": "ok"
}

If the licensed_products are provided and the license_keys are valid or the api_keys are provided and valid then the reponse will include additional download information for each product.

Example response:

{
    "status": "ok",
    "products": {
        "test-plugin": {
            "slug": "test-plugin",
            "description": "The full description.",
            "thumbnail": "",
            "author": "authorname",
            "required_wp": "4.0",
            "compatible_to": "5.1.1",
            "updated": "2019-04-24",
            "change_log": "Software changelog.",
            "installation": "Sofware installation instructions.",
            "documentation_link": "http://example.com/path/to/documentation",
            "average_rating": 4,
            "reviews_count": 4,
            "activations": "9",
            "banner_low": "http://example.com/path/to/low-res/nanner.jpg",
            "banner_high": "http://example.com/path/to/high-res/nanner.jpg",
            'average_rating' => 0,
            'reviews_count' => 0,
            'activations' => 4,
            'download_name' => 'test-plugin.zip',
            'download_url' => 'http://valid-download-url',
            'downloads_remaining' => ,
            'access_expires' =>,
        },
        "another-slug": {
            // Product & Download Details
        }
    }
}

Note: You only need to provide licensed_products or api_keys, providing both is not necessary. The server will first check for api_keys first then licensed_products and finally default to public software details.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support
Scroll to Top