Introduction
In the following, we will explain how to use an API (Application Programming Interface) provided by PlanetHoster to set up the purchase of domains and World accounts for your own customers, without having to go through your member area.
It should be noted that this article has been written for the resellers or customers having advanced knowledge in mind.
Prerequisites
Enter the following address in your web browser: https://my.planethoster.com.
Access to the Interface
In the menu, click on My Account -> API.
Access Informations
The Access Informations section at the bottom of the interface provides you with several pieces of information you will need to use the API:
Locate the API Key and your API User, as these are required in the HTTP header.
You must also whitelist your IPs. The IPs of your servers are listed under Whitelisted IPs.
Make sure your account Status is Active.
With Credit Remaining, it is essential to confirm that you have your minimum of 10 credits if you want to be able to do the following actions: domain registration, domain transfer, domain renewal and adding “id protection”. For The World plan, credits are needed for the “upgrade_plan” action, which consists of increasing the maximum resources that can be allocated.
Now that you know the access information, we can describe the two main functions of the API:
- domain resale (Domain API);
- hosting (World API).
Domain API
This secure API allows you to query our web service for features such as:
- check domain availability;
- view funds in your PlanetHoster account;
- register a domain;
- change WHOIS information;
- request resale prices by TLD;
- change domain nameservers;
- lock/unlock a domain;
- retrieve Authinfo/EPP.
First and foremost, when you place orders on our platform, we use the credit in your account to pay for them. Once that is done, we then take care of all the necessary actions on our end: registering the domain, renewing it and so on. When a domain is active, you will see it in your account, and you can manage it at your convenience by clicking on the API Documentation button (this button is a link at https://apidoc.planethoster.com/en/) and then clicking on the Reseller API tab:
Moreover, if you are using WHMCS as your shopping cart and domain management solution, we have provided an extension that you can easily install in just a few minutes. By clicking on the WHMCS Module button (or by entering the URL https://my.planethoster.com/downloads/planethoster_whmcs_module_v0.1.2.zip in your browser, which is the same thing), you can link your billing system directly to PlanetHoster.
Domain Prices
As a domain reseller, it is very useful to know the different prices for each extension. The Domain Prices button provides access to a table of the same name, designed for this purpose:
In this table, you will find, for each extension:
- its register price for 1 year;
- its transfer price;
- its renew price (for one year).
To help you target domains within defined price ranges, the Filters drop-down list is very useful:
You can also use the Search field to find the particulars of a specific extension.
World API
With the World Unlimited web hosting API, you can unlock an infinite world of possibilities. Among other things, you can:
- create World hosting accounts on the fly;
- automate recurring tasks;
- integrate hosts into your own control panel.
To do this, after authorizing the IP address that will make the requests to the API, please consult the API documentation, which sets out the various methods available. You can access it via the URL https://apidoc.planethoster.com/en/#tag/World-API and by clicking on the World API tab: