Questa chiamata consente di inviare un comando per attivare o disattivare il blocco trasferimento per un dominio. Questa funzione non è supportata da tutte le estensioni.
Parametri della richiesta
Parametro | Tipo | Descrizione | Richiesto |
---|---|---|---|
domain | stringa | Il nome del dominio | Richiesto |
lockstatus | bool | true o false a seconda che vuoi attivare o disattivare il blocco trasferimento per il dominio | Richiesto |
Parametri della risposta
Parametro | Tipo | Descrizione |
---|---|---|
result | stringa | Il risultato dell’operazione: success o error |
Esempio di richiesta (PHP cUrl)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://my.supporthost.com/domainapi.php/domain/idprotect',
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": "colibri.com",
"idprotect": false
}',
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",
}
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
- This domain extension do not support lock