Difference between revisions of "Softsale HTTP API"

From aMember Pro Documentation
Jump to: navigation, search
(Created page with "= Softsale HTTP API = In PHP applications we recommend to use the ''softsale-sample-app'' as we described above. To use Softsale from applications in other programming languag...")

Revision as of 15:09, 24 March 2014

Contents

Softsale HTTP API

In PHP applications we recommend to use the softsale-sample-app as we described above. To use Softsale from applications in other programming languages, you may use HTTP API directly to check/activate and de-activate license keys.

How to access the HTTP API

To access API, you need to make HTTP POST call to URL http://www.example.com/amember/softsale/api/ACTION (replace www.example.com/amember with path to your aMember installation and ACTION to the API method) Required parameter for all calls is ``key`` - license key entered by customers (and stored in your software settings locally).

Check-License

URL http://www.example.com/amember/softsale/api/check-license Input Parameters:

key
license key entered by customer

Positive Response (returned in JSON format)

code ok
message OK
scheme_id Licensing scheme#
scheme_title Licensing scheme title
license_expires license expiration in yyyy-mm-dd hh:ii:ss format
next_check seconds to check license next time (if necessary for your licensing/activation logic)


Negative Response (returned in JSON format)

code described below in [#HTTP API Error Codes]
message corresponds to the error code
next_check seconds to check license next time (if necessary for your licensing/activation logic)

Activate License

URL http://www.example.com/amember/softsale/api/activate

Positive Response (returned in JSON format)

code ok
message OK
scheme_id Licensing scheme#
scheme_title Licensing scheme title
license_expires license expiration in yyyy-mm-dd hh:ii:ss format
next_check seconds to check license next time (if necessary for your licensing/activation logic)


Negative Response (returned in JSON format)

code described below in [#HTTP API Error Codes]
message corresponds to the error code
next_check seconds to check license next time (if necessary for your licensing/activation logic)