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
    • token The authentication token.
  • Example Request
    GET /resellerapi/getsoftwares?token=your_license_token
  • Response
    • key The identifier for the software.
    • name The name of the software.

2. Register License

  • Endpoint /register
  • Method GET
  • Description Registers a new license for a customer.
  • Parameters
    • token The authentication token.
    • month The duration of the license in months.
    • key The product key for the software.
    • license_key The generated license key.
    • ip The 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
    • status Success or failure message.

3. Activate License

  • Endpoint /activate
  • Method GET
  • Description Activates a suspended license.
  • Parameters
    • token The authentication token.
    • key The product key for the software.
    • ip The IP address associated with the license.
  • Example Request
    GET /resellerapi/activate?token=your_license_token&key=software_key&ip=customer_ip
  • Response
    • status Success or failure message.

4. Deactivate License

  • Endpoint /deactivate
  • Method GET
  • Description Suspends a currently active license.
  • Parameters
    • token The authentication token.
    • key The product key for the software.
    • ip The IP address associated with the license.
  • Example Request
    GET /resellerapi/deactivate?token=your_license_token&key=software_key&ip=customer_ip
  • Response
    • status Success or failure message.

5. Delete License

  • Endpoint /delete
  • Method GET
  • Description Deletes a license permanently.
  • Parameters
    • token The authentication token.
    • key The product key for the software.
    • ip The IP address associated with the license.
  • Example Request
    GET /resellerapi/delete?token=your_license_token&key=software_key&ip=customer_ip
  • Response
    • status Success or failure message.

6. Renew License

  • Endpoint /renew
  • Method GET
  • Description Renews a license for an additional period based on the billing cycle.
  • Parameters
    • token The authentication token.
    • billingcycle The billing cycle for the license (e.g., Monthly, Annually).
    • key The product key for the software.
    • ip The IP address associated with the license.
  • Example Request
    GET /resellerapi/renew?token=your_license_token&billingcycle=Monthly&key=software_key&ip=customer_ip
  • Response
    • status Success or failure message.

7. Trial License

  • Endpoint /trial
  • Method GET
  • Description Registers a trial license for a customer.
  • Parameters
    • token The authentication token.
    • trial Duration of the trial period.
    • key The product key for the software.
    • license_key The generated license key.
    • ip The 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
    • status Success 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 GET requests with query parameters.
  • The token is a crucial part of every API request and should be securely stored and passed with every call.