Liquid Domain Management Documentation

Table of Contents

Reseller Account Startup

Upon activating your Reseller account with Liqu.id, you need to make the following settings within your Reseller Control Panel to begin selling Products to your Customers and Sub-Resellers:

Select your Selling Currency

At the time of sign-up, you must carefully select your desired Selling Currency. Your Selling Currency is the currency in which you wish to sell your Products and Services to your Customers and Sub-Resellers.

If the need arises, you may modify the Selling Currency as long as there are no transactions performed within your Reseller Account.

Add Funds in your Reseller Account

To let your Customers and Sub-Resellers buy Products and Services through you, you need to add and maintain sufficient funds in your Reseller Account with Liquid.

To add funds to your Account from the Control Panel:
  1. Login to your Control Panel
  2. Go to menu Billing -> Billing List
  3. Click the Add Fund Button
  4. There you would be presented with various methods available to Add Funds to your Account. You can choose one of the options and Add Funds to your Account.

Products and Services Signup and their Configuration

Following are the steps you need to take within your Control Panel to setup your Domain Registration Product for your Customers and Sub-Resellers:

  • Select the TLDs that you want to Sell
    1. Login to your Reseller Control Panel
    2. Go to menu Settings -> Manage Products and Pricing -> Manage TLDs
    3. Here, you may choose to either:
      Sell:To sell this TLD to your Customers and Sub-Resellers.
      No New Orders:To stop accepting new Orders for this TLD from your Customers and Sub-Resellers. However, existing Orders can continue to be Managed and Renewed.
      Do Not Sell:To entirely stop offering this TLD to your Customers and Sub-Resellers. However, you may set this status if there are no Orders of this TLD.
    4. Upon setting your TLD Signup Preferences, agree to the applicable Terms and Conditions and click the Submit button.
  • Set Selling Price for the Domain Registration Product
    1. Login to your Reseller Control Panel
    2. Go to menu Settings -> Manage Products and Pricing -> Manage Prices
    3. On the succeeding Domains Pricing page, you will find a list of Top Level Domains (TLDs) that you have chosen to sell.
    4. Click the Edit button under the Manage Prices column, for the TLD whose pricing you need to set.
    5. On the next page, set your selling prices as per your business requirements. You could:
      • Set different prices for each action, i.e. Registration, Renewal, Transfer and Restore.
      • Set reducing price for each year to offer multi-year discounts. This way, you can offer increased discounts as and when your Customers register / renew domain names for more than the typical one year.
      • Set discounts for the minimum duration and nominal prices for every subsequent tenure, etc.

Configure your Website

You may use our free ready-made private labeled websites for all your retail business.

It is recommended that you undertake the following on your private labeled websites to improve your Customer’s experience:

  • Brand the URL
  • Customize the Header and Footer
  • Specify the Additional Payment Options for your Customers/Sub-Resellers
To manage your website:
  1. Login to your Reseller Control Panel
  2. Go to menu Settings -> Branding Settings
  3. You could modify the logo, social media accounts and web contents from the branding settings page.

Use our REST APIs to integrate with your own website

If you are already selling several other Products and Services to your existing clients through another interface/Control Panel and do not want to add the burden of introducing the new Control Panels to them, you could use our REST APIs to integrate provisioning and management of these Products and Services in your existing interfaces and Control Panels.

See REST APIs page for more detail.

WHMCS Integrations

If you already using WHMCS billing software, you could easily install our registrar module to integrate liquid to your whmcs billing software.

See WHMCS Integrations page for more detail.

Configure your Payment Collection Options

Currently we provide 2 payment methods, wire transfer and paypal (including Credit card, amex, etc via paypal). Please setup the payment collection options:

  1. Login to your Reseller Control Panel
  2. Go to menu Settings -> Payment Gateway
  3. Click Edit button on the right.
  4. Complete the payment gateway configuration form, and click save.
  5. Repeat number 3 and 4 to modify other payment gateway.

Create Company Users

Create independent Control Panel logins for your staff in various departments (like Sales, Billing, Support), to enable them to effectively manage your business.

Thus, you can enable the Billing User to List Transactions, Add Funds, etc., but not be able to changes the Name Servers of the domain name and so on. In effect, User creation would help you to assign fixed roles to persons of your company and assigning them different responsibilities to reduce your own workload.

You can add Company Users from within the Reseller Control Panel as mentioned below:
  1. Login to your Reseller Control Panel
  2. In the menu, click Settings -> User Management
  3. Click Add User Button
  4. Complete the form, and click Save button

Creating Demo Reseller Account

To understand and evaluate the interfaces and API we provide, you can use the Demo interface.

To create a fresh Demo Reseller account:

  1. Visit https://reseller1.domainsas.com/manage/
  2. Click Reseller Sign Up Tab, and fill up the form, and follow the steps thereafter to set up your Reseller account (make sure you provide an accurate email address).
  3. Please wait for 24 hours for approval from our administrator. You will receive notifications email when your account activated.
  4. Login to your Demo Reseller Account from https://reseller1.domainsas.com/manage/
  5. You might wish to start with checking the flexibility and features of the system by referring to the Reseller Account Startup Guide.

Note

The demo account may not function at all times, since some beta testing is also done on the demo account. Also, the demo account is reset every day. All orders placed in the demo account would be automatically deleted every 24 hours.

REST APIs

Introductions

The Liquid API is organized around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. We use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients, and we support cross-origin resource sharing to allow you to interact securely with our API from a client-side web application (though you should remember that you should never expose your secret API key in any public website’s client-side code). JSON will be returned in all responses from the API, including errors.

To make the Liquid API as explorable as possible, we provide demo reseller account. Please create reseller demo account here to test your code or applications. Data created within demo reseller account will never cost any money and will not create real domain. Read the Creating Demo Reseller Account documentation.

Authentication

You authenticate to the Liquid API by providing one of your API keys in the request and your reseller ID. You can manage your API keys from your reseller control panel. You can have multiple API keys active at one time. Your API keys carry many privileges, so be sure to keep them secret! Make sure only use reseller demo account when developing your codes or applications.

Authentication to the API occurs via HTTP Basic Auth. Provide your reseller ID as the basic auth username and API key as password.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. You must authenticate for all requests.

Errors

Liquid uses conventional HTTP response codes to indicate success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g. a required parameter was missing, etc.), and codes in the 5xx range indicate an error with Liquid’s servers.

Attributes
type:The type of error returned. Can be unauthorized, invalid_request, or card_error.
message:A human-readable message giving more details about the error.
code:Programming readable error code, more details than type. For example: invalid_argument.

Rate Limiting

The API is provided to you to conduct normal business activities through your own interface(s). Any activity using Liquid API, that causes lossage or creates service degradation for other users, is constituted as abuse by Liquid. A few examples of API Abuse activities are stated below:

  • Sending a huge number of Check Availability commands for already registered domain names, repeatedly.
  • Adding a large number of Sub-Resellers and/or Customers who do not have any Orders.

Rate limiting in Liquid API is primarily considered on a per-reseller basis. Generally, you may make up to 100 API calls per 15 minutes. When you make more API calls than allowed, your reseller API Key will be temporary suspended, this suspension will not impact your reseller account.

Tips to avoid being Rate Limited

The tips below are there to help you code defensively and reduce the possibility of being rate limited.

  • Check Domain
    Don’t use Liquid API to check domain availability on your website interface.
  • Caching
    Store API responses in your application or on your site if you expect a lot of use. For example, don’t try to call the Liquid API on every page load of your website landing page. Instead, call the API infrequently and load the response into a local cache. When users hit your website load the cached version of the results.

REST API Requests

We provide API Console Tool for you to try out the API request and understand the responses.

Feedback

If you find any issues with Liquid API, please use our ticketing support systems dedicated to Liquid API where we’ll be available and actively listening to all of your feedback. We look forward to working with you and can’t wait to see what everyone builds.

WHMCS Integrations

Liquid ResellerCamp WHMCS Registrar Module Installations

  1. Get the API key
    1. Login to the ResellerCamp’s reseller control panel (the url will be in the email you received when you signed up) and then go to Settings -> API.
    2. Please note your reseller ID at the bottom of the page.
    3. Click Add API Key button, enter the label and the IP address of the server where WHMCS is installed to authorize it for API access.
    4. On the same page, note down the API Key.
  2. Copy the whmcs module files
    1. Download ResellerCamp’s WHMCS Registrar Module

    2. Extract the zip files to /YourLocalPath/whmcs/modules/registrars

    3. Remember to replace “/YourLocalPath” with the actual location where you installed WHMCS.

  3. Setup WHMCS Configuration
    1. Now, login to your WHMCS Administration Area
    2. Go to Setup > Products/Services > Domain Registrars
    3. Choose “Liquid” in the registrar dropdown menu and enter both the Reseller ID and API Key noted above.
    4. Then click Save Changes
_images/resellercamp-whmcs.jpg

And that’s it, WHMCS will now be able to communicate with your ResellerCamp account to automate domain registration & management for your customers.

Demo Mode

To use the ResellerCamp demo mode or test mode, it’s not as simple as ticking the demo mode option in the configuration area. You must setup an account separately on the dedicated resellercamp’s demo system. Read the Creating Demo Reseller Account documentation.

Next enter your demo account details under Setup > Domain Registrars > ResellerCamp. With the Test Mode checkbox ticked you can now place domain registration orders in WHMCS, the domains will appear on your demo ResellerCamp account but no domain will actually be registered and you will not be charged.

Note

Live nameservers created at the Registry will return a Nameserver is not a valid Nameserver error unless they are created/registered in the demo environment.

The demo control panel will try to check the validity of the nameservers in the demo platform and not on the Registry, so you must register the nameservers first before attempting any domain registrations on the demo platform.

Synchron domain WHMCS with LIQUID

Synchron status Transfer in, expired date and status

This Feature is already included with WHMCS and it’s disabled by default. By enabling this feature, any domain activity such as status, expiry, and transfer status will sync with data in liquid. The following step to enable this feature are :

  • Setup > General Settings > Domains
    • Checklist domain Sync Enabled
    • Don’t choose Sync Notify Only
  • Add cronjob
    0 0 * * * php -q /YourPathWHMCS/crons/domainsync.php that Cronjob will call skrip crons/domainsync.php once a day. each called will have 50 domains to be synced in scrolling, if all domains have been synced then it will start all over again.

Synchron status Transfer out

LIQUID provide a cron that allows the domain already transferred out to update the status to Expired, the steps :

  • Download liquid cron here

  • Move the downloaded liquid folder to /YourPathWHMCS/crons/

  • Rename /YourPathWHMCS/crons/liquid/config.sample.php become /YourPathWHMCS/crons/liquid/config.php and then set this part :

    • Database connection
    $lq_cron_db = array(
            'host'     => 'localhost',
            'username' => 'username',
            'password' => 'password',
            'db'       => 'databaseName',
    );
    
    • Set liqu.id account
    $lq_cron_registrar = array(
        'liquid' => array(
            'api_url'     => 'https://api.liqu.id/v1/',
            'reseller_id' => '',
            'api_key'     => '',
        ),
        'resellercampid' => array(
            'api_url'     => 'https://api.liqu.id/v1/',
            'reseller_id' => '', // If you have account manage under resellercamp.id
            'api_key'     => '',
        ),
    );
    
    • Add Cronjob

      0 0 * * * php -q /YourPathWHMCS/crons/liquid/synctransferout.php Once a day call the script crons/liquid/synctransferout.php to chek poll message, if there is a domain transfer out from liqu.id the status will change become expired. You can view log syncron at /YourPathWHMCS/crons/liquid/report/synctransferout-Y-m-d.log.

WHMCS Addon - LIQUID PANDI Document Management Module

This module provides tools for registrar / domain resellers who use LIQUID software. This module is used for document management of domain registration requirements in PANDI. The required documents can be uploaded using the WHMCS member area and can be managed by registrar/reseller through the WHMCS admin page. Documents that are already uploaded will be automatically sent through URL api.liqu.id thus making the approval process easier.

WHMCS Addon Installation for Uploading Documents to Liquid

Before you start, please download WHMCS AddOn Module Document Upload below :

  1. Create a new folder and name it documents in whmcs installed.
  2. Copy the addon files to folder modules/addons.
  3. Login.
  4. Go to Setup menu > Addon Modules, then activate addon.
_images/whmcsuploaddoc1.png
  1. Configure addon, enter reseller id, apikey, and google recaptcha key (public & server). How to get a google recaptcha key can be seen here.
_images/whmcsuploaddoc-setup.png
  1. Modify template to add links to Document Upload page.

Note

Document Upload page can only be accessed in

http://domainname.com/index.php?m=liquid_upload_document&domain_id=ID_Domain

Link directing to the page can also be added in file clientareadomaindetails.tpl in folder templates/{active_template}/

Example of link code:

<a href=”index.php?m=liquid_upload_document&domain_id={$domainid}” class=”btn btn-primary”>Upload Document</a>

How to get Google Recaptcha Key
  1. Go to https://www.google.com/recaptcha/admin#list
  2. Create a new sitekey
_images/recaptcha1.png
  1. Select a sitekey
_images/recaptcha2.png
  1. Take public key and secret key
_images/recaptcha3.png _images/recaptcha4.png

Note

Since this addon uses a recaptcha service from google, you will need a captcha key you can get after registering in recaptcha.

WHMCS Addon - LIQUID DNSSec Management Module

This module provides tools for registrars/domain resellers who use LIQUID software. This software is used for DNSSec data management with LIQUID module registrar. To use this module, make sure that you already use LIQUID module registrar on the domain you register. Only domains that are already registered in LIQUID can use this DNSSec module.

WHMCS Addon Installation for DNSSec Management

Before you start, please download WHMCS AddOn Module Liquid DNSSec Management:

  1. Extract the files you just downloaded.
  2. Copy folder liquiddnssec from folder modules/addons to folder modules/addons in whmcs user directory.
  3. Login as administrator.
  4. Go to Setup menu > Addon Modules, and then activate addon.
_images/whmcsdnssec1.png
  1. Configure addon, enter Reseller ID and Apikey
_images/whmcsdnssec2.png
  1. After the installation and configuration is done, Liquid DNSSec submenu will appear in Addons menu on the admin page.
_images/whmcsdnssec3.png
  1. DNSSec Management submenu will also appear on the sidebar of Manage menu on the client domain details page.
_images/whmcsdnssec4.png
Demo Mode of DNSSec Management

Enter your demo account details under Setup menu > Addon Modules, in Liquid DNSSec. With the Test Mode checkbox ticked you can now manage your dnssec domain in WHMCS, the dnssec domain will appear on your demo ResellerCamp account but no domain will actually be registered and you will not be charged.

WHMCS Addon - LIQUID PANDI Premium Domain Management Module

This module provides tools for registrar / domain resellers who use LIQUID software. This module is used for management of PANDI Premium domain.

WHMCS Addon Installation for PANDI Premium Domain

Before you start, please download WHMCS AddOn Module PANDI Premium Domain below :

  1. Set min length restriction domain and max length restriction domain according to tld premium domain which will be registered in configuration.php file.
Example : $DomainMinLengthRestrictions[".co.id"] = 2;
          $DomainMaxLengthRestrictions[".co.id"] = 63;
  1. Extract the files you just download.
  2. Copy the addons file to folder modules/addons.
  3. Copy this template file according folder structure. The original file should be backup first.
a. /templates/orderforms/standart_cart/configureproductdomain.tpl
b. /templates/orderforms/standart_cart/domainregister.tpl
c. /templates/orderforms/standart_cart/viewcart.tpl
d. /templates/orderforms/standart_cart/common.tpl
e. /templates/orderforms/standart_cart/js/addons_liquid_domain_premium_price/scripts.js (for whmcs 8)
f. /templates/orderforms/standart_cart/js/addons_liquid_domain_premium_price/scripts.min.js (for whmcs 8)
  1. Login to your WHMCS Administration Area.
  2. Go to Setup menu > Addons Modules, and then activate addons.
_images/whmcsdomainpremium1.jpg
  1. Configure addon, Enter TLD and choose role user who can access this addons.
_images/whmcsdomainpremium2.jpg
  1. After the installation and configuration is done, Premium Domain .ID submenu will appear in Addons menu on the admin page.
_images/whmcsdomainpremium4.jpg
  1. And then, set domain TLD, currency, and enter price.
_images/whmcsdomainpremium3.jpg

Example :

_images/whmcsdomainpremium5.jpg
  1. When check premium domain availibilty at whmcs, it will show premium price.
_images/whmcsdomainpremium6.jpg

Feedback

If you find any issues with Resellercamp’s WHMCS registrar module, please use our ticketing support systems where we’ll be available and actively listening to all of your feedback.

Blesta Integrations

Liquid ResellerCamp Blesta Registrar Module Installations

  1. Get the API key
    1. Login to the ResellerCamp’s reseller control panel (the url will be in the email you received when you signed up) and then go to Settings -> API.
    2. Please note your reseller ID at the bottom of the page.
    3. Click Add API Key button, enter the label and the IP address of the server where Blesta is installed to authorize it for API access.
    4. On the same page, note down the API Key.
  2. Copy the Blesta module files
    1. Download ResellerCamp’s Blesta Registrar Module here.
    2. Extract the zip files to /YourLocalPath/components/modules
    3. Remember to replace “/YourLocalPath” with the actual location where you installed Blesta.
  3. Setup Blesta Configuration
    1. Now, login to your Blesta Administration Area
    2. Go to Setting and then choose menu Modules
    3. Choose Modules - Available
    4. Choose “Liquid” in the Available Modules. Click Install
    5. Go to menu Modules - Installed. Click Manage and then Add Account
    6. Enter both the Reseller ID and API Key noted below
    7. Then click Add Account
_images/resellercamp-blesta.png

And that’s it, Blesta will now be able to communicate with your ResellerCamp account to automate domain registration & management for your customers.

Demo Mode

To use the ResellerCamp demo mode or test mode, it’s not as simple as ticking the demo mode option in the configuration area. You must setup an account separately on the dedicated resellercamp’s demo system. Read the Creating Demo Reseller Account documentation.

Next enter your demo account details under Setting > Modules > Liquid. With the Sandbox checkbox ticked you can now place domain registration orders in Blesta, the domains will appear on your demo ResellerCamp account but no domain will actually be registered and you will not be charged.

Note

Live nameservers created at the Registry will return a Nameserver is not a valid Nameserver error unless they are created/registered in the demo environment.

The demo control panel will try to check the validity of the nameservers in the demo platform and not on the Registry, so you must register the nameservers first before attempting any domain registrations on the demo platform.

Feedback

If you find any issues with Resellercamp’s Blesta registrar module, please use our ticketing support systems where we’ll be available and actively listening to all of your feedback.

Boxbilling Integrations

Liquid ResellerCamp Boxbilling Registrar Module Installations

  1. Get the API key
    1. Login to the ResellerCamp’s reseller control panel (the url will be in the email you received when you signed up) and then go to Settings -> API.
    2. Please note your reseller ID at the bottom of the page.
    3. Click Add API Key button, enter the label and the IP address of the server where Boxbilling is installed to authorize it for API access.
    4. On the same page, note down the API Key.
  2. Copy the Boxbilling module files
    1. Download ResellerCamp’s Boxbilling Registrar Module here.
    2. Extract the zip files to /YourLocalPath/bb-library/Registrar/Adapter
    3. Remember to replace “/YourLocalPath” with the actual location where you installed Boxbilling.
  3. Setup Boxbilling Configuration
    1. Now, login to your Boxbilling Administration Area
    2. Go to Configuration and then choose menu Domain Registration
    3. Choose New domain registrar
    4. Choose “Liquid” in the Available Modules. Click Install
    5. Go to menu Registrar. Click Edit with Pencil icon
    6. Enter both the Reseller ID and Liquid API Key noted below
    7. Then click Update
_images/resellercamp-boxbilling.png

And that’s it, Boxbilling will now be able to communicate with your ResellerCamp account to automate domain registration & management for your customers.

Demo Mode

To use the ResellerCamp demo mode or test mode, it’s not as simple as ticking the demo mode option in the configuration area. You must setup an account separately on the dedicated resellercamp’s demo system. Read the Creating Demo Reseller Account documentation.

Next enter your demo account details under Setting > Modules > Liquid. With the Sandbox checkbox ticked you can now place domain registration orders in Boxbilling, the domains will appear on your demo ResellerCamp account but no domain will actually be registered and you will not be charged.

Note

Live nameservers created at the Registry will return a Nameserver is not a valid Nameserver error unless they are created/registered in the demo environment.

The demo control panel will try to check the validity of the nameservers in the demo platform and not on the Registry, so you must register the nameservers first before attempting any domain registrations on the demo platform.

Feedback

If you find any issues with Resellercamp’s Boxbilling registrar module, please use our ticketing support systems where we’ll be available and actively listening to all of your feedback.

HostBill Integrations

Liquid ResellerCamp HostBill Registrar Module Installations

  1. Get the API key
    1. Login to the ResellerCamp’s reseller control panel (the url will be in the email you received when you signed up) and then go to Settings -> API.
    2. Please note your reseller ID at the bottom of the page.
    3. Click Add API Key button, enter the label and the IP address of the server where HostBill is installed to authorize it for API access.
    4. On the same page, note down the API Key.
  2. Copy the HostBill module files
    1. Download `ResellerCamp’s HostBill Registrar Module:
    2. Extract the zip files to /YourLocalPath/includes/modules/Domain
    3. Remember to replace “/YourLocalPath” with the actual location where you installed HostBill.
  3. Setup HostBill Configuration
    1. Now, login to your HostBill Administration Area
    2. Go to Settings > Modules > Domain Modules
    3. Go to Inactive tab, then choose “Liquid” in the Modules. Click Activate
    4. Then will go to Add New App Menu.
    5. Make sure Application is selected Liquid, then enter Name and both the User Name dan Password with Reseller ID and API Key
    6. Then click Test Configuration, until display the success text at his side
    7. Then click Add New App
_images/resellercamp-hostbill.png

And that’s it, HostBill will now be able to communicate with your ResellerCamp account to automate domain registration & management for your customers.

Demo Mode

To use the ResellerCamp demo mode or test mode, it’s not as simple as ticking the demo mode option in the configuration area. You must setup an account separately on the dedicated resellercamp’s demo system. Read the Creating Demo Reseller Account documentation.

Next enter your demo account details under Settings > Apps > Name of your Reseller. With the Test Mode checkbox ticked you can now place domain registration orders in HostBill, the domains will appear on your demo ResellerCamp account but no domain will actually be registered and you will not be charged.

Note

Live nameservers created at the Registry will return a Nameserver is not a valid Nameserver error unless they are created/registered in the demo environment.

The demo control panel will try to check the validity of the nameservers in the demo platform and not on the Registry, so you must register the nameservers first before attempting any domain registrations on the demo platform.

Feedback

If you find any issues with Resellercamp’s HostBill registrar module, please use our ticketing support systems where we’ll be available and actively listening to all of your feedback.

PHP Integrations

Liquid ResellerCamp PHP HTTP Integrations APIs

API library

Libraries for the Liquid API can be downloaded in here.

API Endpoint

https://api.liqu.id/v1

Example Request Authentication

$apiClient = new \Liquid\Client\ApiClient();

You can set the default API key, or you can always pass a key directly to an object’s constructor. Authentication is transparently handled for you in subsequent method calls.

A sample test API key is included in all the examples on this page, so you can test any example right away. To test requests using your account, replace the sample API key with your actual API key.

HTTP status code summary

200 - OK Everything worked as expected.
400 - Invalid Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No or invalid authentication details are provided.
402 - Failed Request The parameters were valid but the request failed.
404 - Not Found The requested resource doesn’t exist.

Handling errors

Our API libraries raise exceptions for many reasons, such as a failed charge, invalid parameters, authentication errors, and network unavailability. We recommend writing code that gracefully handles all possible API exceptions.

try {
    // Use Liquid's library to make requests...
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
}

Expanding Objects

Many objects contain the ID of a related object in their response properties. For example, a Charge may have an associated Customer ID. Those objects can be expanded inline with the expand request parameter. Objects that can be expanded are noted in this documentation. This parameter is available on all API requests, and applies to the response of that request only.

Example Request

$apiClient = new \Liquid\Client\ApiClient();

// set Host to https://api.domainsas.com/v1 if you want to use Liquid Demo
$apiClient->getConfig()->setHost('https://api.liqu.id/v1');
// set Reseller ID here
$apiClient->getConfig()->setUsername('##1#');
// set Apikey here
$apiClient->getConfig()->setPassword('###21cs##');

Retrieving data using callApi()

Example Request to retrieve all domains with params:

$resourcePath = '/domains';
$method       = 'GET';
$formParams   = array();
$headerParams = array();

$queryParams['limit'] = 100;
$queryParams['tld']   = 'com';

try {
    list($response, $header) = $apiClient->callApi(
        $resourcePath,
        $method,
        $queryParams,
        $formParams,
        $headerParams
    );
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
    die;
}

// convert obj to array
$response = json_decode(json_encode($response), true);

print_r($response);

Example response:

[
    {
        "domain_id":"##1##",
        "domain_name":"#####testxyz.com",
        "approval_status_id":"1",
        "start_date":"2015-07-27 00:00:00",
        "end_date":"2016-07-27 00:00:00",
        "reseller_id":"##1#",
        "customer_id":"#1##",
        "tld_id":"#1",
        "order_status_id":"1",
        "lb_order_id":null,
        "is_migrate_cust":"0",
        "is_privacy":"0",
        "reg_contact_id":"##1",
        "adm_contact_id":"##1",
        "bill_contact_id":"##1",
        "tech_contact_id":"##1",
        "is_lock":"0",
        "is_suspend":"0",
        "is_theft_protection":"1",
        "raaVerificationStatus":null,
        "raaVerificationStartTime":null,
        "auth_code":null,
        "attr":"[]",
        "last_update":null,
        "ns1":"##demo1.#parkir##.net",
        "ns2":"##demo2.#parkir##.net",
        "ns3":"",
        "ns4":null,
        "ns5":null,
        "ns6":null,
        "ns7":null,
        "ns8":null,
        "ns9":null,
        "ns10":null,
        "ns11":null,
        "ns12":null,
        "ns13":null,
        "customer_name":"Customer Demo PHP",
        "expiry_date":"2016-07-27 00:00:00"
    },
    {
        "domain_id":"###1#",
        "domain_name":"domain#####123.com",
        "approval_status_id":"1",
        "start_date":"2015-07-27 00:00:00",
        "end_date":"2016-07-27 00:00:00",
        "reseller_id":"##1#",
        "customer_id":"#1##",
        "tld_id":"9#",
        "order_status_id":"1",
        "lb_order_id":null,
        "is_migrate_cust":"0",
        "is_privacy":"0",
        "reg_contact_id":"#1#",
        "adm_contact_id":"#1#",
        "bill_contact_id":"#1#",
        "tech_contact_id":"#1#",
        "is_lock":"0",
        "is_suspend":"0",
        "is_theft_protection":"1",
        "raaVerificationStatus":null,
        "raaVerificationStartTime":null,
        "auth_code":null,
        "attr":"[]",
        "last_update":null,
        "ns1":"##demo1.#parkir##.net",
        "ns2":"##demo2.#parkir##.net",
        "ns3":"",
        "ns4":null,
        "ns5":null,
        "ns6":null,
        "ns7":null,
        "ns8":null,
        "ns9":null,
        "ns10":null,
        "ns11":null,
        "ns12":null,
        "ns13":null,
        "customer_name":"Customer Demo PHP",
        "expiry_date":"2016-07-27 00:00:00"
    }
]

Creating data using callApi()

Example Request to create a new customer:

$resourcePath   = '/customers';
$method         = 'POST';
$queryParams    = array();
$headerParams   = array();

$formParams['email']          = 'liquid@liquid.local';
$formParams['name']           = 'Customer Demo PHP';
$formParams['password']       = '##21&^9##fA';
$formParams['company']        = 'Customer Demo PHP';
$formParams['address_line_1'] = 'Pajangan';
$formParams['city']           = 'Bantul';
$formParams['state']          = 'Yogyakarta';
$formParams['country_code']   = 'ID';
$formParams['zipcode']        = '55321';
$formParams['tel_cc_no']      = 62;
$formParams['tel_no']         = 85732#####;

try {
    list($response, $header) = $apiClient->callApi(
        $resourcePath,
        $method,
        $queryParams,
        $formParams,
        $headerParams
    );
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
    die;
}

// convert obj to array
$response = json_decode(json_encode($response), true);

print_r($response);

Example response:

{
    "customer_id":"##1##",
    "reseller_id":"#1##+",
    "status":"Active",
    "email":"demo##php###@em####il.com",
    "name":"Customer Demo PHP",
    "company":"Customer Demo PHP",
    "creation_date":"2015-11-09 07:40:29",
    "total_receipts":"0.00",
    "address_line_1":"Pajangan",
    "address_line_2":"",
    "address_line_3":"",
    "city":"Bantul",
    "state":"Yogyakarta",
    "country_code":"ID",
    "country_name":"Indonesia",
    "zipcode":"55321",
    "tel_cc_no":"62",
    "tel_no":"85732#####",
    "alt_tel_cc_no":null,
    "alt_tel_no":null,
    "mobile_cc_no":null,
    "mobile_no":null,
    "fax_cc_no":null,
    "fax_no":null,
    "lang_id":"English"
}

Updating data using callApi()

Example Request to update a customer:

$customer_id    = ##1##;
$resourcePath   = '/customers/' . $customer_id;
$method         = 'PUT';
$queryParams    = array();
$headerParams   = array();

$formParams['email']          = 'demo##php###@em####il.com';
$formParams['name']           = 'Update Customer Demo PHP';
$formParams['company']        = 'Update Customer Demo PHP';
$formParams['address_line_1'] = 'Pajangan';
$formParams['city']           = 'Bantul';
$formParams['state']          = 'Yogyakarta';
$formParams['country_code']   = 'ID';
$formParams['zipcode']        = '55321';
$formParams['tel_cc_no']      = 62;
$formParams['tel_no']         = 85732#####;

try {
    list($response, $header) = $apiClient->callApi(
        $resourcePath,
        $method,
        $queryParams,
        $formParams,
        $headerParams
    );
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
    die;
}

// convert obj to array
$response = json_decode(json_encode($response), true);

print_r($response);

Example response:

{
    "customer_id":"##1##",
    "reseller_id":"#1##",
    "status":"Active",
    "email":"demo##php###@em####il.com",
    "name":"Update Customer Demo PHP",
    "company":"Update Customer Demo PHP",
    "creation_date":"2015-07-27 02:18:42",
    "total_receipts":"80.00",
    "address_line_1":"Pajangan",
    "address_line_2":"",
    "address_line_3":"",
    "city":"Bantul",
    "state":"Yogyakarta",
    "country_code":"ID",
    "country_name":"Indonesia",
    "zipcode":"55321",
    "tel_cc_no":"62",
    "tel_no":"85732#####",
    "alt_tel_cc_no":null,
    "alt_tel_no":null,
    "mobile_cc_no":null,
    "mobile_no":null,
    "fax_cc_no":null,
    "fax_no":null,
    "lang_id":"English"
}

Deleting data using callApi()

Example Request to delete a customer:

$customer_id  = ##1##;
$resourcePath = '/customers/' . $customer_id;
$method       = 'DELETE';
$queryParams  = array();
$headerParams = array();
$formParams   = array();

try {
    list($response, $header) = $apiClient->callApi(
        $resourcePath,
        $method,
        $queryParams,
        $formParams,
        $headerParams
    );
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
    die;
}

// convert obj to array
$response = json_decode(json_encode($response), true);

print_r($response);

Example response:

{
    "customer_id":"##1##",
    "deleted":true
}

Retrieving data using available class api

Using DomainsApi() to retrieve all domains:

$apiDomains = new \Liquid\Client\Api\DomainsApi($apiClient);

$limit                      = 2;
$page_no                    = null;
$domain_id                  = null;
$reseller_id                = null;
$customer_id                = null;
$show_child_orders          = null;
$tld                        = null;
$status                     = null;
$domain_name                = null;
$privacy_protection_enabled = null;
$creation_time_start        = null;
$creation_time_end          = null;
$expiry_date_start          = null;
$expiry_date_end            = null;
$reseller_email             = null;
$customer_email             = null;
$exact_domain_name          = null;

try {
    list($response, $header) = $apiDomains->retrieve(
        $limit,
        $page_no,
        $domain_id,
        $reseller_id,
        $customer_id,
        $show_child_orders,
        $tld,
        $status,
        $domain_name,
        $privacy_protection_enabled,
        $creation_time_start,
        $creation_time_end,
        $expiry_date_start,
        $expiry_date_end,
        $reseller_email,
        $customer_email,
        $exact_domain_name
    );
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
    die;
}

// convert obj to array
$response = json_decode(json_encode($response), true);

print_r($response);

Example response:

[
    {
        "domain_id":"#1###",
        "domain_name":"test##domain#####.com",
        "approval_status_id":"1",
        "start_date":"2015-07-27 00:00:00",
        "end_date":"2016-07-27 00:00:00",
        "reseller_id":"#1###",
        "customer_id":"##1##",
        "tld_id":"#9",
        "order_status_id":"1",
        "lb_order_id":null,
        "is_migrate_cust":"0",
        "is_privacy":"0",
        "reg_contact_id":"1",
        "adm_contact_id":"1",
        "bill_contact_id":"1",
        "tech_contact_id":"1",
        "is_lock":"0",
        "is_suspend":"0",
        "is_theft_protection":"1",
        "raaVerificationStatus":null,
        "raaVerificationStartTime":null,
        "auth_code":null,
        "attr":"[]",
        "last_update":null,
        "ns1":"##demo1.#parkir##.net",
        "ns2":"##demo2.#parkir##.net",
        "ns3":"",
        "ns4":null,
        "ns5":null,
        "ns6":null,
        "ns7":null,
        "ns8":null,
        "ns9":null,
        "ns10":null,
        "ns11":null,
        "ns12":null,
        "ns13":null,
        "customer_name":"Customer Demo PHP",
        "expiry_date":"2016-07-27 00:00:00"
    },
    {
        "domain_id":"#1###",
        "domain_name":"Tets###Io.com",
        "approval_status_id":"1",
        "start_date":"2015-07-27 00:00:00",
        "end_date":"2016-07-27 00:00:00",
        "reseller_id":"#1###",
        "customer_id":"##1##",
        "tld_id":"1",
        "order_status_id":"1",
        "lb_order_id":null,
        "is_migrate_cust":"0",
        "is_privacy":"0",
        "reg_contact_id":"1",
        "adm_contact_id":"1",
        "bill_contact_id":"1",
        "tech_contact_id":"1",
        "is_lock":"0",
        "is_suspend":"0",
        "is_theft_protection":"1",
        "raaVerificationStatus":null,
        "raaVerificationStartTime":null,
        "auth_code":null,
        "attr":"[]",
        "last_update":null,
        "ns1":"##demo1.#parkir##.net",
        "ns2":"##demo2.#parkir##.net",
        "ns3":"",
        "ns4":null,
        "ns5":null,
        "ns6":null,
        "ns7":null,
        "ns8":null,
        "ns9":null,
        "ns10":null,
        "ns11":null,
        "ns12":null,
        "ns13":null,
        "customer_name":"Customer Demo PHP",
        "expiry_date":"2016-07-27 00:00:00"
    }
]

Creating data using available class api

Using BillingApi() to add fund a reseller:

$apiBilling = new \Liquid\Client\Api\BillingApi($apiClient);

$reseller_id = #1###;
$amount      = 150;
$description = 'add fund from API';

try {
    list($response, $header) = $apiBilling->addFundReseller(
        $reseller_id,
        $amount,
        $description
    );
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
    die;
}

// convert obj to array
$response = json_decode(json_encode($response), true);

print_r($response);

Example response:

{
    "transaction_id":"1",
    "reseller_id":"#1###",
    "transaction_type":"deposit",
    "amount":150,
    "balance":350,
    "date":"2015-11-09 08:15:32",
    "description":"add fund from API",
    "status":"pending"
}

Updating data using available class api

Using ResellersApi() to update a reseller:

$apiReseller = new \Liquid\Client\Api\ResellersApi($apiClient);

$reseller_id      = #1###;
$email            = 'demo##php###@em####il.com';
$name             = 'Reseller Demo PHP';
$company          = 'Reseller Demo PHP';
$address_line_1   = 'Pajangan';
$city             = 'Bantul';
$state            = 'Yogyakarta';
$country_code     = 'ID';
$zipcode          = '55321';
$tel_cc_no        = 62;
$tel_no           = 857######;
$selling_currency = 'USD';
$address_line_2   = null;
$address_line_3   = null;
$alt_tel_cc_no    = null;
$alt_tel_no       = null;
$mobile_cc_no     = null;
$mobile_no        = null;
$fax_cc_no        = null;
$fax_no           = null;

try {
    list($response, $header) = $apiReseller->updateReseller(
        $reseller_id,
        $email,
        $name,
        $company,
        $address_line_1,
        $city,
        $state,
        $country_code,
        $zipcode,
        $tel_cc_no,
        $tel_no,
        $selling_currency,
        $address_line_2,
        $address_line_3,
        $alt_tel_cc_no,
        $alt_tel_no,
        $mobile_cc_no,
        $mobile_no,
        $fax_cc_no,
        $fax_no
    );
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
    die;
}

// convert obj to array
$response = json_decode(json_encode($response), true);

print_r($response);

Example response:

{
    "reseller_id":"#1###",
    "parent_reseller_id":"#1##",
    "status":"Active",
    "email":"demo##php###@em####il.com",
    "name":"Reseller Demo PHP",
    "brand_name":"Reseller Demo PHP",
    "company":"Reseller Demo PHP",
    "creation_date":"2014-10-27 03:06:38",
    "total_receipts":"159.00",
    "address_line_1":"Pajangan",
    "address_line_2":"",
    "address_line_3":"",
    "city":"Bantul",
    "state":"Yogyakarta",
    "country_code":"ID",
    "country_name":"Indonesia",
    "zipcode":"55321",
    "tel_cc_no":"62",
    "tel_no":"857######",
    "alt_tel_cc_no":null,
    "alt_tel_no":null,
    "mobile_cc_no":null,
    "mobile_no":null,
    "fax_cc_no":null,
    "fax_no":null,
    "selling_currency":"USD",
    "accounting_currency":"USD",
    "parentselling_currency":"USD",
    "lang_id":"English"
}

Deleting data using available class api

Using ResellersApi() to delete a reseller:

$apiReseller = new \Liquid\Client\Api\ResellersApi($apiClient);

$reseller_id = #1##;

try {
    list($response, $header) = $apiReseller->delete_(
        $reseller_id
    );
} catch (Liquid\Client\ApiException $e) {
    echo 'Caught exception: ', $e->getMessage(), "\n";
    echo '<br>HTTP response headers: ', $e->getResponseHeaders(), "\n";
    echo '<br>HTTP response body: ', $e->getResponseBody(), "\n";
    echo '<br>HTTP status code: ', $e->getCode(), "\n";
    die;
}

// convert obj to array
$response = json_decode(json_encode($response), true);

print_r($response);

Example response:

{
    "reseller_id":"#1##",
    "deleted":true
}

Available class api list

AccountApi() CustomerApi() EmailforwardingApi()
BillingApi() DnsApi() PrivacyprotectionApi()
CommonApi() DomainforwardingApi() ResellersApi()
ContactsApi() DomainsApi()  

Feedback

If you find any issues with Liquid Resellercamp’s PHP integration APIs, please use our ticketing support systems where we’ll be available and actively listening to all of your feedback.

FAQ

isinya