From a48e05af2c5df79b6bcecf8520ddc35c67b01864 Mon Sep 17 00:00:00 2001 From: Igors Savins Date: Wed, 29 May 2019 13:27:42 +0300 Subject: [PATCH] Created changeValidationMethod (markdown) --- changeValidationMethod.md | 65 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 changeValidationMethod.md diff --git a/changeValidationMethod.md b/changeValidationMethod.md new file mode 100644 index 0000000..271ad27 --- /dev/null +++ b/changeValidationMethod.md @@ -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; +} +```