更新续订通知设置

PUT
https://www.digicert.com/services/v2/order/certificate/{{order_id}}/renewal-emails/{{status}}

使用此端点为订单启用或禁用续订通知电子邮件。

如需查看是否已经为订单启用或禁用续订通知,请检查订单信息端点的响应数据中的disable_renewal_notifications属性。

示例请求和响应

cURL
curl --request PUT 'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/renewal-emails/{{status}}' \
--header 'X-DC-DEVKEY: {{api_key}}' \
--header 'Content-Type: application/json'
Python
import requests

url = "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/renewal-emails/{{status}}"

payload  = {}
headers = {
  'X-DC-DEVKEY': {{api_key}},
  'Content-Type': 'application/json'
}

response = requests.request("PUT", url, headers=headers, data = payload)

print(response.text.encode('utf8'))
Go
package main

import (
		"fmt"
		"strings"
		"net/http"
		"io/ioutil"
)

func main() {

		url := "https://www.digicert.com/services/v2/order/certificate/{{order_id}}/renewal-emails/{{status}}"
		method := "PUT"

		payload := strings.NewReader("")

		client := &http.Client {
		}
		req, err := http.NewRequest(method, url, payload)

		if err != nil {
				fmt.Println(err)
		}
		req.Header.Add("X-DC-DEVKEY", {{api_key}})
		req.Header.Add("Content-Type", "application/json")

		res, err := client.Do(req)
		defer res.Body.Close()
		body, err := ioutil.ReadAll(res.Body)

		fmt.Println(string(body))
}
NodeJS
var request = require('request');
var options = {
  'method': 'PUT',
  'url': 'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/renewal-emails/{{status}}',
  'headers': {
    'X-DC-DEVKEY': {{api_key}},
    'Content-Type': 'application/json'
  }
};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});
204 No Content
// No Content

路径参数

名称 请求/选项 描述
order_id 必填 需要更新续订通知设置的订单 ID。
状态 必填 订单的续订通知设置的状态。
允许的值:
  • enable - 为订单启用续订电子邮件通知。
  • disable - 为订单禁用续订电子邮件通知。