Questa chiamata consente di interrogare il sistema per ottenere le informazioni su un dominio nel tuo account.
Parametri della richiesta
Parametro | Tipo | Descrizione | Richiesto |
---|---|---|---|
domain | stringa | Il nome del dominio da controllare | Richiesto |
whois | stringa | Va impostata su “yes” se vuoi vedere il whois del dominio | Opzionale |
nameservers | stringa | Va impostata su “yes” se vuoi vedere i nameservers del dominio | Opzionale |
lockstatus | stringa | Va impostata su “yes” se vuoi vedere se il dominio è bloccato o meno | Opzionale |
epp | stringa | Va impostata su “yes” se vuoi vedere il codice EPP o auth code del dominio | Opzionale |
Parametri della risposta
Parametro | Tipo | Descrizione |
---|---|---|
result | stringa | Il risultato dell’operazione: success o error |
domain | stringa | Il dominio che siamo controllando |
data | json | Le informazioni base del dominio, come il suo stato, il costo del rinnovo, le date di registrazione, rinnovo e scadenza, lo stato del rinnovo automatico |
whoisData | json | Il dettaglio dei dati WHOIS del dominio |
nameservers | json | Una string json coi nameservers del dominio |
lockstatus | json | Una string json che indica lo stato di lock del dominio |
epp | json | Una string json con il codice EPP (auth code) del dominio |
Esempio di richiesta (PHP cUrl)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://my.supporthost.com/domainapi.php/domain/info?domain=supporthost.it&whois=yes&nameservers=yes&lockstatus=yes&epp=yes',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'X-Email: your_email',
'X-Api-Key: your_apikey'
),
));
$response = curl_exec($curl);
curl_close($curl);
Esempio di risposta (JSON)
{
"result": "success",
"domain": "supporthost.it",
"data": {
"domain": "supporthost.it",
"status": "Active",
"recurringamount": "9.84",
"registrationperiod": 1,
"registrationdate": "2014-02-15",
"expirydate": "2026-07-03",
"nextduedate": "2026-07-03",
"donotrenew": 0
},
"whoisData": {
"result": "success",
"Registrant": {
"Name": "xxxxxxxxxx",
"Company": "xxxxxxxxxx",
"City": "xxxxxxxxxx",
"State": "xxxxxxxxxx",
"Country": "xxxxxxxxxx",
"Postcode": "xxxxxxxxxx",
"Phone_Number": "xxxxxxxxxx",
"Email": "xxxxxxxxxx",
"Address": "xxxxxxxxxx",
"entityType": "1",
"itNationality": "IT",
"regCode": "xxxxxxxxxx",
"consentForPublishing": "false"
},
"Admin": {
"Name": "xxxxxxxxxx",
"Company": "xxxxxxxxxx",
"City": "xxxxxxxxxx",
"State": "xxxxxxxxxx",
"Country": "xxxxxxxxxx",
"Postcode": "xxxxxxxxxx",
"Phone_Number": "xxxxxxxxxx",
"Email": "xxxxxxxxxx",
"Address": "xxxxxxxxxx3"
},
"Tech": {
"Name": "xxxxxxxxxx",
"Company": "xxxxxxxxxx",
"City": "xxxxxxxxxx",
"State": "xxxxxxxxxx",
"Country": "xxxxxxxxxx",
"Postcode": "xxxxxxxxxx",
"Phone_Number": "xxxxxxxxxx",
"Email": "xxxxxxxxxx",
"Address": "xxxxxxxxxx3"
}
},
"nameservers": {
"result": "success",
"ns1": "glen.ns.cloudflare.com",
"ns2": "jamie.ns.cloudflare.com"
},
"lockstatus": {
"result": "success",
"lockstatus": "Unknown"
},
"epp": {
"result": "success",
"eppcode": "xxxxxxxxxx5"
}
}
Risposte di errore
- Connection refused from unauthorized host. IP xxx.xxx.xxx.xxx is NOT allowed to access your account
- Invalid email or not a reseller.
- Invalid API key.
- The domain field is required.
- Domain not found in your account