其他電郵

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

使用此端點更新與訂單關聯的其他電郵。

新增到 additional_emails 陣列中的電郵地址接收指定訂單的續訂、重新發行、複本的電郵通知。

此端點對 additional_emails 陣列有破壞性。現有的陣列將遭到已傳送的新陣列覆寫。您可以傳送空陣列從訂單上移除所有其他電郵地址。

cURL
curl -X PUT \
  'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/additional-emails' \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}' \
  -d '{
	"additional_emails": [
		"jill.valentine@example.com",
		"leon.kennedy@example.com"
	]
}'
Python
import requests

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

payload = "{\n\t\"additional_emails\": [\n\t\t\"jill.valentine@example.com\",\n\t\t\"leon.kennedy@example.com\"\n\t]\n}"
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

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

print(response.text)
Go
package main

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

func main() {

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

	payload := strings.NewReader("{\n\t\"additional_emails\": [\n\t\t\"jill.valentine@example.com\",\n\t\t\"leon.kennedy@example.com\"\n\t]\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
NodeJS
var request = require("request");

var options = { method: 'PUT',
  url: 'https://www.digicert.com/services/v2/order/certificate/{{order_id}}/additional-emails',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' },
  body: { additional_emails: [ 'jill.valentine@example.com', 'leon.kennedy@example.com' ] },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
204 No Content
// empty

要求參數

名稱 必填/選填 類型 說明
additional_emails 必填 array 接收憑證通知電郵的其他電郵地址 (例如憑證發行、重複憑證、憑證續訂等)。