/srs/list_valid_tlds


GET https://api.sitehost.nz/1.0/srs/list_valid_tlds.json

Returns a list of valid TLDs.

Query Parameters

ParameterTypeRequiredDescription
client_idintegerYesThe ID for the client.Example: 1
renewstringRenew flag. 1 for yes and 0 for noExample: 1

Code Samples

JavaScript PHP Rails Python
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.0/srs/list_valid_tlds.json?apikey=your_key_here&client_id=1&renew=1", false);

xmlHttp.send();

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.0/srs/list_valid_tlds.json?apikey=your_key_here&client_id=1&renew=1");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
require 'net/http'
require 'uri'

uri = URI.parse("https://api.sitehost.nz/1.0/srs/list_valid_tlds.json?apikey=your_key_here&client_id=1&renew=1")
http = Net::HTTP.new(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

response = http.request(request)
import requests

uri = 'https://api.sitehost.nz/1.0/srs/list_valid_tlds.json?apikey=your_key_here&client_id=1&renew=1'

response = requests.get(uri)

Response

200:

application/json
{
  "return": [
    {
      "tld": "ac.nz",
      "term": "1",
      "type": "NZRS",
      "can_transfer": "1",
      "can_protect": "0"
    },
    {
      "tld": "am",
      "term": "12",
      "type": "DotSRSHigh2",
      "can_transfer": "0",
      "can_protect": "0"
    },
    {
      "tld": "ar.com",
      "term": "12",
      "type": "DotSRSHigh",
      "can_transfer": "0",
      "can_protect": "0"
    }
  ],
  "msg": "Successful.",
  "status": true,
  "time": 55.63
}