Check website name or domain prices with us. When you call this method, you must understand that you must have credit enough to buy at least one website name or domain. One currency is cheked per API call, by default it is the currency matching your account with us.
Request Parameters
Response Parameters
Parameter |
Type |
Description |
result |
string |
The result of the operation: success or error |
currency |
string |
An array of information about the associated currency. |
pricing |
string |
An array of pricing and other information for configured TLDs. The items in this array are conditional and only appear when a user has already configured pricing (including a price of 0). |
Example Request (CURL)
<?php
//Invalid Payment Method. Valid options include pai,banktransfer,metamaskusdterc20,paypal,payfast
$apiUrl = 'https://sive.host/includes/sivehost-api.php'; // Change to your API endpoint
$username = 'Ikhaka'; // Your API username
$password = 'Mph#th9mi$'; // Your API password
$postfields = array(
'api_key' => 'G2dskdXb7BlDwlvbrD1zVEe5ZKQIybXn', // If needed
'api_secret' => 'CtIJVZf8OM1p4iLxwiKFjlU4bPVmEycS', // If needed
'action' => 'NamePrice',
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiUrl);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($postfields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); // Basic Authentication
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // Use true in production with a valid SSL
$response = curl_exec($ch);
// Check for cURL errors
if (curl_errno($ch)) {
echo 'cURL Error: ' . curl_error($ch);
}
curl_close($ch);
// Output response
echo $response;
?>
Example Response JSON
{
"result": "success",
"currency": "available",
"pricing": "nnn"
}
Error Responses
Error Message |
Cause |
Unauthorized access! |
Request from unauthorized IP |
Invalid API Key or secret. |
Incorrect API credentials |
Invalid Product or Operating System. |
Unknown product or Operating System for that product |
Missing action parameter. |
action not specified eg. NameCheck |
Insufficient credit to place the order. |
Not enough account balance. Load credit on Sive.Host client area. |
Invalid Payment Method. Valid options include |
Payment method not specified on payload. |
Version History
Version |
Changelog |
1.0 |
Initial Version |