GET sitelicense

Get the current representation of a sitelicense based on a specific license key. There are two ways to call this function, one includes an APIKEY and returns a complete representation of a license, the other is anonymously and returns a minimal representation of the license and includes validation.

Resource URL

https://api.easysoftwarelicensing.com/v1/sitelicenses/:licensekey

Where licensekey is the key for the license you want to retrieve.

Headers

ESL-API-Key: apikey
ESL-Domain: domain

Both headers are optional in this case. The ESL-API-Key header allows you to retrieve a full representation of the apikey. The ESL-domain allows you to send in a domain string against which validation will be performed. The ESL-domain header is only used when requesting a minimal (anonymous) sitelicense.

Examples

Request

GET https://api.easysoftwarelicensing.com/v1/sitelicenses/somekey001
HEADERS
    ESL-API-Key: apikey

Response

200 OK

{
  "validationMethod": "LICENSE_EXISTS_NOT_EXPIRED",
  "licenseeName": "",
  "disposition": "",
  "expiration": "2013-04-09 00:00:00",
  "deleted": null,
  "renewURL": "",
  "domain": "another.com",
  "ipAddress": "5.5.5.5",
  "issueDate": "2013-03-07 21:58:11",
  "licenseKey": "somekey001",
  "licenseeEmail": ""
}

Request

GET https://api.easysoftwarelicensing.com/v1/sitelicenses/somekey005

Response

200 OK

{
  "renewURL": "",
  "disposition": "",
  "expiration": null,
  "licenseKey": "somekey005"
}

Where “somekey005” has a full representation of:

{
  "validationMethod": "LICENSE_EXISTS_NOT_EXPIRED",
  "licenseeName": "",
  "disposition": "",
  "expiration": null,
  "deleted": null,
  "renewURL": "",
  "issueDate": "2013-03-13 21:59:17",
  "ipAddress": "127.0.0.1",
  "domain": "another.com",
  "licenseKey": "somekey005",
  "licenseeEmail": ""
}

Failed validation example

In this example we’ll show a failed validation. Consider the following full representation of a sitelicense.

{
  "validationMethod": "DOMAIN_MATCH",
  "licenseeName": "",
  "disposition": "",
  "expiration": null,
  "deleted": null,
  "renewURL": "",
  "domain": "somekey006.com",
  "ipAddress": "",
  "issueDate": "2013-03-13 21:59:29",
  "licenseKey": "somekey006",
  "licenseeEmail": ""
}

Request

GET https://api.easysoftwarelicensing.com/v1/sitelicenses/somekey006
HEADERS
    ESL-domain: wrong.com

Response

200 OK

{
"message": "Validation failed. Domain does not match or license is expired.",
"status": "invalid"
}

Notice that the call returns a 200 OK because the service worked as expected. However, the JSON document indicates a status of invalid. The next request provides the correct domain and returns a valid sitelicense.

Request

GET https://api.easysoftwarelicensing.com/v1/sitelicenses/somekey006
HEADERS
    ESL-domain: somekey006.com

Response

200 OK

{
  "renewURL": "",
  "disposition": "",
  "expiration": null,
  "licenseKey": "somekey006"
}
Secure WordPress plugin (HTTPS/SSL)