/srs/get_contact


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

Returns the details for a domain contact.

Query Parameters

ParameterTypeRequiredDescription
client_idintegerYesThe ID for the client.Example: 1
contact_idintegerYesThe contact ID number.Example: 2

Code Samples

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

xmlHttp.send();

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

response = requests.get(uri)

Response

200:

application/json
{
  "return": {
    "ContactID": "2",
    "ClientID": "1",
    "Name": "Example",
    "RegistrantName": "Example",
    "PostalAddress": "1 Example Rd",
    "Suburb": "",
    "PostCode": "0612",
    "Province": "",
    "City": "Auckland",
    "Country": "NZ",
    "PhoneCountry": "0064",
    "PhoneArea": "09",
    "PhoneLocal": "123456",
    "MobileCountry": "",
    "MobileArea": "",
    "MobileLocal": "",
    "FaxCountry": "",
    "FaxArea": "",
    "FaxLocal": "",
    "Email": "example@example.com",
    "Phone": "0064-09-123456",
    "Fax": "--",
    "Mobile": "--",
    "DomainCount": "1",
    "RegistrantCount": "1"
  },
  "msg": "Successful.",
  "status": true
}