Skip to content

changeValidationMethod

Igors Savins edited this page May 17, 2021 · 3 revisions

URL: /orders/ssl/change_validation_method/:order_id/

METHOD: POST

Method to change DCV method validation for the common name (base domain) OR SAN item.

Request parameters:

domain - common name (base domain) or SAN item

new_method - new validation method for the specified domain. Valid values are valid email address or HTTP, HTTPS and DNS.

Response

If no errors in request the following parameters will be returned:

message - Text message on successful operation

success - Boolean value

{
    "message": "Change Validation request submitted.",
    "success": true
}

Example code

$token = 'my_api_token';
$order_id = 'my_order_id';
$domain = 'my_domain.com';
$new_method = 'https';

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://my.gogetssl.com/api/orders/ssl/change_validation_method/{$order_id}/?auth_key={$token}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_POSTFIELDS => "domain={$domain}&new_method={$new_method}",
    CURLOPT_HTTPHEADER => [
        "content-type: application/x-www-form-urlencoded"
    ]

));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
    echo "cURL Error #:" . $err;
} else {
    echo $response;
}
Clone this wiki locally