/srs/get_domain_price
GET https://api.sitehost.nz/1.0/srs/get_domain_price.json
Returns the pricing for a domain.
Query Parameters
Parameter | Type | Required | Description |
client_id | integer | Yes | The ID for the client.Example: 1 |
domain | string | Yes | The domain name.Example: example.nz |
term | integer | The registration term (in months).Example: 12 | |
params[force_base_price] | string | The force base price parameter. 1 for yes and 0 for noExample: 1 | |
params[protect] | string | Protect the domain. 1 for yes and 0 for noExample: 1 |
Code Samples
JavaScript PHP Rails Pythonvar xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "https://api.sitehost.nz/1.0/srs/get_domain_price.json?apikey=your_key_here&client_id=1&domain=example.nz&term=12¶ms[force_base_price]=1¶ms[protect]=1", false);
xmlHttp.send();
var response = xmlHttp.responseText;
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.sitehost.nz/1.0/srs/get_domain_price.json?apikey=your_key_here&client_id=1&domain=example.nz&term=12¶ms[force_base_price]=1¶ms[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.0/srs/get_domain_price.json?apikey=your_key_here&client_id=1&domain=example.nz&term=12¶ms[force_base_price]=1¶ms[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.0/srs/get_domain_price.json?apikey=your_key_here&client_id=1&domain=example.nz&term=12¶ms[force_base_price]=1¶ms[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,
"time": 13.04
}
"return": {
"DomainPrice": 29,
"total_price": 29,
"tiered_price": "29.00",
"base_price": "29.00"
},
"msg": "Successful.",
"status": true,
"time": 13.04
}