/srs/get_domain_price


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

Returns the pricing for a domain.

Query Parameters

ParameterTypeRequiredDescription
client_idintegerYesThe ID for the client.Example: 1
domainstringYesThe domain name.Example: example.nz
termintegerThe registration term (in months).Example: 12
params[force_base_price]stringThe force base price parameter. 1 for yes and 0 for noExample: 1
params[protect]stringProtect the domain. 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.3/srs/get_domain_price.json?apikey=your_key_here&client_id=1&domain=example.nz&term=12&params[force_base_price]=1&params[protect]=1", false);

xmlHttp.send();

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

response = requests.get(uri)

Response

200:

application/json
{
  "return": {
    "DomainPrice": 29,
    "total_price": 29,
    "tiered_price": "29.00",
    "base_price": "29.00"
  },
  "msg": "Successful.",
  "status": true
}