/srs/get_domain


GET https://api.sitehost.nz/1.3/srs/get_domain.json

Returns the details for a registered domain.

Query Parameters

ParameterTypeRequiredDescription
client_idintegerYesThe ID for the client.Example: 1
domainstringYesThe domain name.Example: example.nz

Code Samples

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

xmlHttp.send();

var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.3/srs/get_domain.json?apikey=your_key_here&client_id=1&domain=example.nz");
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.3/srs/get_domain.json?apikey=your_key_here&client_id=1&domain=example.nz")
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.3/srs/get_domain.json?apikey=your_key_here&client_id=1&domain=example.nz'

response = requests.get(uri)

Response

200:

application/json
{
  "return": {
    "ClientID": "1",
    "Domain": "example.nz",
    "State": "Active",
    "RState": "0",
    "RegistrantName": "Example",
    "DateRegistered": "2016-04-18 11:56:01",
    "DateModified": "2016-04-18 11:56:01",
    "DateBilledUntil": "2017-04-18 11:56:01",
    "DateCancelled": "0000-00-00 00:00:00",
    "DateLocked": "0000-00-00 00:00:00",
    "DateRenewed": "0000-00-00 00:00:00",
    "autorenew_term": "0",
    "autorenew_days_remaining": "0",
    "RegistrantContactID": "2",
    "AdminContactID": "2",
    "TechnicalContactID": "2",
    "Locked": "0",
    "Pending": "0",
    "TransferStatus": "",
    "TransferID": "0"
  },
  "msg": "Successful.",
  "status": true
}