API Usage

The Licensing API is used for the remote activation and deactivation of license keys. The API is available at https://yourstore.com/itelic-api/. By default, the API responds in JSON. But this can be modified by subclassing the ITELIC\API\Responder class.

Authentication is done using Basic Auth. Endpoints that use basic authentication have an authentication mode.

  • MODE_ACTIVE requires a valid, active license key passed as the Basic Auth username.
  • MODE_EXISTS requires a valid license key. The key does not have to be active, merely exist.
  • MODE_VALID_ACTIVATION requires a valid, active license key passed as the Basic Auth username and the activation ID passed as the Basic Auth password.

Successful API calls respond in the follwoing format.

{
    "success": true,
    "body": []
}

Failed API calls respond in the following format.

{
  "success": false,
  "error": {
    "code": 1,
    "message": "Error message"
  }
}

If the response body is not JSON, it means an unexpected error occurred during processing that resulted in malformatted JSON or similar. In this case, the response will the error message as plain text.

The following are a list of the API endpoints. An endpoint is accessed like so: https://yourstore.com/itelic-api/endpoint/.

Activate

  • Endpoint: activate
  • Method: POST
  • Auth Mode: MODE_ACTIVE

Request

  • Required: location=abc.xyz
  • Optional: track=stable (default) or track=pre-release

Response

Success

{
  "success": true,
  "body": {
    "id": "1211",
    "activation": "2015-11-11T18:58:56+0000",
    "deactivation": "",
    "location": "http:\/\/abc.xyz\/",
    "status": "active",
    "track": "stable",
    "key": "5bead4663906cb017916b6a14ff23e70"
  }
}

Error

{
  "success": false,
  "error": {
    "code": 1,
    "message": "This license key has reached it's maximum number of activations."
  }
}

Deactivate

  • Endpoint: deactivate
  • Method: POST
  • Auth Mode: MODE_EXISTS

Request

  • Required: id=1211

Response

Success

{
  "success": true,
  "body": {
    "id": "1211",
    "activation": "2015-11-11T18:58:56+0000",
    "deactivation": "2015-11-11T19:08:26+0000",
    "location": "http:\/\/abc.xyz\/",
    "status": "deactivated",
    "track": "stable",
    "key": "5bead4663906cb017916b6a14ff23e70"
  }
}

Info

  • Endpoint: info
  • Method: GET
  • Auth Mode: MODE_EXISTS

Request

Empty

Response

Success

{
  "success": true,
  "body": {
    "transaction": 1175,
    "product": 237,
    "customer": 80,
    "status": "active",
    "max": 1,
    "expires": "2016-09-29T19:20:18+0000",
    "activations": {
      "count": 1,
      "count_active": 0,
      "list": {
        "1211": {
          "id": "1211",
          "activation": "2015-11-11T18:58:56+0000",
          "deactivation": "2015-11-11T19:08:26+0000",
          "location": "http:\/\/abc.xyz\/",
          "status": "deactivated",
          "track": "stable",
          "key": "5bead4663906cb017916b6a14ff23e70"
        }
      }
    }
  }
}

Version

  • Endpoint: version
  • Method: GET
  • Auth Mode: MODE_VALID_ACTIVATION

Request

Empty

Response

Success

{
  "success": true,
  "body": {
    "list": {
      "237": {
        "version": "13.5.0",
        "package": "http:\/\/www.itelic.dev\/itelic-api\/download\/?activation=1211&key=5bead4663906cb017916b6a14ff23e70&expires=1447356597&token=2ef4c1ed014fc020e772a625f81dd635",
        "expires": "2015-11-12T19:29:57+0000",
        "upgrade_notice": "",
        "type": "minor"
      }
    }
  }
}

Info

  • Endpoint: product
  • Method: GET
  • Auth Mode: MODE_VALID_ACTIVATION

Request

Empty

Response

Success

{
  "success": true,
  "body": {
    "list": {
      "237": {
        "id": 237,
        "name": "Networked optimal standardization software",
        "description": "All on a three-legged stool in the sea, though you mayn't believe it--' 'I never went to the executioner: 'fetch her here.' And the Gryphon hastily. 'Go on with the strange creatures of her sister,.",
         "version": "13.5.0",
        "tested": "4.4",
        "requires": "4.3",
        "contributors": {
          "TimothyBlynJacobs": "\/\/profiles.wordpress.org\/TimothyBlynJacobs"
        },
        "last_updated": "2015-10-28T10:49:23+0000",
        "banner_low": "",
        "banner_high": "",
        "package_url": "http:\/\/www.itelic.dev\/itelic-api\/download\/?activation=1211&key=5bead4663906cb017916b6a14ff23e70&expires=1447356742&token=fa042b4d0a6d420c7a82ec5ed9fbd2d8",
        "description_url": "http:\/\/www.itelic.dev\/product\/networked-optimal-standardization-software\/",
        "changelog": "Condensed for clarity",
        "sections": []
      }
    }
  }
}

Changelog

This endpoint differs from others. The response is the compiled changelog for the passed product ID. If the ID is not found, a 404 status code will be generated.

  • Endpoint: changelog
  • Method: GET

Request

  • Required: ID=237
Have more questions? Submit a request

Comments

Powered by Zendesk