fb-pixel

API Call: Rinnovo dominio (Reseller domini)


Questa chiamata consente di inviare un comando per rinnovare un dominio. 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 rinnovare
Richiesto
regperiod
INT
il numero di anni per il rinnovo, da 1 a 9 (compresi)
Richiesto

Parametri della risposta

Parametro
Tipo
Descrizione
result
stringa
Il risultato dell’operazione: success o error
latestinvoiceid
INT
L’id della fattura di rinnovo 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/renew',
  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_POSTFIELDS =>'{
    "domain": "dominio.it",
    "regperiod": 1
}',
  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",
    "latestinvoiceid": 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 renewal
  • 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

Prova gratis e senza impegno uno dei nostri piani hosting per 14 giorni. Non è richiesto nessun dato di pagamento!