Created changeValidationMethod (markdown)

master
Igors Savins 2019-05-29 13:27:42 +03:00
parent bf77d74245
commit a48e05af2c
1 changed files with 65 additions and 0 deletions

65
changeValidationMethod.md Normal file

@ -0,0 +1,65 @@
**URL**: /orders/ssl/change_validation_method/:order_id/
**METHOD**: POST
Change of dcv method validation for a domain - works with both CNAME domains and those listed in SANs.
### Request parameters:
**domain** - one of the domains specified with the order
**new_method** - new validation method for the specified domain. Valid values for Comodo are: valid email address or http, https, dns. Possible values for Symantec / Thawtee: e-mail address
### Response
If no errors in request following parameters will be returned:
**message** - Text message on successful operation
**success** - Boolean value
```json
{
"message": "Change Validation request submitted.",
"success": true
}
```
### Example code
```php
$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;
}
```