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. This must be a valid slug unique to each software product | 
| domain | String optional | example.com | The domain the license is activated on. | 
| environment | String optional | live | The server environment the license is activated on. Expects live or staging, default live | 
For the request to be acknowledged and processed, the lisence_key provided must be valid, meaning it must exist and must not be expired or reached max activations.
Example Response
{
    "status": "active",
    "slug": "test-plugin",
    "expires": "2019-08-30 00:00:00",
    "license": {
        "valid_slug": true,
        "exists": true,
        "deleted": false,
        "current_version": null,
        "order": {}
    }
}
