Questa chiamata consente di inviare un comando per recuperare un dominio cancellato. I domini cancellati possono essere recuperati a seguito di un pagamento di un costo di recupero. Se c’è abbastanza credito nell’account la fattura viene segnata come pagata in automatico.
Parametri della richiesta
Parametro | Tipo | Descrizione | Richiesto |
---|---|---|---|
domain | stringa | Il nome del dominio da recuperare | Richiesto |
Parametri della risposta
Parametro | Tipo | Descrizione |
---|---|---|
result | stringa | Il risultato dell’operazione: success o error |
invoiceid | INT | L’id della fattura di recupero creata. Non ricevi una email con la fattura creata, ma puoi trovarla in area clienti. |
Esempio di richiesta (PHP cUrl)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://my.supporthost.com/domainapi.php/domain/restore?domain=dominio.it',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
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",
"invoiceid": 12345
}
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.
- Domain not found in your account
- The status of the domain doesn’t allow restore
- The domain has been cancelled. You need to restore it.
- There is already a renewal invoice for this domain. Go to the SupportHost clientarea and pay it to renew