Here's the API documentation for the Reseller LicenseDash for customers, based on the code you provided. This documentation explains the different API endpoints and how to use them:
LicenseDash Reseller API Documentation
Base URL
All API requests should be made to the following base URL:
https://reseller.licensedash.com/resellerapi/
Authentication
Each API request requires a valid token to be passed as a parameter. This token is obtained from the LicenseDash system and is stored in the $GLOBALS["license_token"].
Endpoints
1. Get Available Software
- Endpoint
/getsoftwares - Method
GET - Description Retrieves a list of available software products for the reseller.
- Parameters
tokenThe authentication token.
- Example Request
GET /resellerapi/getsoftwares?token=your_license_token - Response
keyThe identifier for the software.nameThe name of the software.
2. Register License
- Endpoint
/register - Method
GET - Description Registers a new license for a customer.
- Parameters
tokenThe authentication token.monthThe duration of the license in months.keyThe product key for the software.license_keyThe generated license key.ipThe IP address associated with the license.
- Example Request
GET /resellerapi/register?token=your_license_token&month=12&key=software_key&license_key=generated_license_key&ip=customer_ip - Response
statusSuccess or failure message.
3. Activate License
- Endpoint
/activate - Method
GET - Description Activates a suspended license.
- Parameters
tokenThe authentication token.keyThe product key for the software.ipThe IP address associated with the license.
- Example Request
GET /resellerapi/activate?token=your_license_token&key=software_key&ip=customer_ip - Response
statusSuccess or failure message.
4. Deactivate License
- Endpoint
/deactivate - Method
GET - Description Suspends a currently active license.
- Parameters
tokenThe authentication token.keyThe product key for the software.ipThe IP address associated with the license.
- Example Request
GET /resellerapi/deactivate?token=your_license_token&key=software_key&ip=customer_ip - Response
statusSuccess or failure message.
5. Delete License
- Endpoint
/delete - Method
GET - Description Deletes a license permanently.
- Parameters
tokenThe authentication token.keyThe product key for the software.ipThe IP address associated with the license.
- Example Request
GET /resellerapi/delete?token=your_license_token&key=software_key&ip=customer_ip - Response
statusSuccess or failure message.
6. Renew License
- Endpoint
/renew - Method
GET - Description Renews a license for an additional period based on the billing cycle.
- Parameters
tokenThe authentication token.billingcycleThe billing cycle for the license (e.g., Monthly, Annually).keyThe product key for the software.ipThe IP address associated with the license.
- Example Request
GET /resellerapi/renew?token=your_license_token&billingcycle=Monthly&key=software_key&ip=customer_ip - Response
statusSuccess or failure message.
7. Trial License
- Endpoint
/trial - Method
GET - Description Registers a trial license for a customer.
- Parameters
tokenThe authentication token.trialDuration of the trial period.keyThe product key for the software.license_keyThe generated license key.ipThe IP address associated with the license.
- Example Request
GET /resellerapi/trial?token=your_license_token&trial=7&key=software_key&license_key=generated_license_key&ip=customer_ip - Response
statusSuccess or failure message.
Common Error Responses
- Invalid Token The token provided is invalid.
- License Already Exists The license for the specified service or IP already exists.
- No License Exists The license you are trying to manage does not exist.
Note
- All API requests are made using HTTP
GETrequests with query parameters. - The
tokenis a crucial part of every API request and should be securely stored and passed with every call.