此页描述具有 securesite_ssl_certificate
组名称的产品(请参阅词汇表 - 产品标识符)。
使用此端点提交使用 ssl_ev_securesite
,ssl_ev_securesite_multi_domain
,ssl_securesite
,ssl_securesite_multi_domain
,或 ssl_securesite_wildcard
作为 ssl_certificate_id 的私有证书请求订单。
curl -X POST \
'https://www.digicert.com/services/v2/order/certificate/{{ssl_certificate_id}}' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"certificate": {
"common_name": "example.com",
"dns_names": [
"sub.example.com",
"app.example.com"
],
"csr": "<csr>",
"server_platform": {
"id": 45
},
"signature_hash": "sha256",
"organization_units": [
"Accounting department"
]
},
"validity_years": 2,
"comments": "Message for the approver",
"disable_renewal_notifications": true,
"locale": "en",
"payment_method": "balance",
"skip_approval": true,
"organization": {
"id": 123456
},
"custom_fields": [
{
"metadata_id": 11,
"value": "Invoice #00001"
}
]
}'
import requests
url = "https://www.digicert.com/services/v2/order/certificate/{{ssl_certificate_id}}"
payload = "{\n \"certificate\": {\n \"common_name\": \"example.com\",\n \"dns_names\": [\n \"sub.example.com\",\n \"app.example.com\"\n ],\n \"csr\": \"<csr>\",\n \"server_platform\": {\n \"id\": 45\n },\n \"signature_hash\": \"sha256\",\n \"organization_units\": [\n \"Accounting department\"\n ]\n },\n \"validity_years\": 2,\n \"comments\": \"Message for the approver\",\n \"disable_renewal_notifications\": true,\n \"locale\": \"en\",\n \"payment_method\": \"balance\",\n \"skip_approval\": true,\n \"organization\": {\n \"id\": 123456\n },\n \"custom_fields\": [\n {\n \"metadata_id\": 11,\n \"value\": \"Invoice #00001\"\n }\n ]\n}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("POST", url, data=payload, headers=headers)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/order/certificate/{{ssl_certificate_id}}"
payload := strings.NewReader("{\n \"certificate\": {\n \"common_name\": \"example.com\",\n \"dns_names\": [\n \"sub.example.com\",\n \"app.example.com\"\n ],\n \"csr\": \"<csr>\",\n \"server_platform\": {\n \"id\": 45\n },\n \"signature_hash\": \"sha256\",\n \"organization_units\": [\n \"Accounting department\"\n ]\n },\n \"validity_years\": 2,\n \"comments\": \"Message for the approver\",\n \"disable_renewal_notifications\": true,\n \"locale\": \"en\",\n \"payment_method\": \"balance\",\n \"skip_approval\": true,\n \"organization\": {\n \"id\": 123456\n },\n \"custom_fields\": [\n {\n \"metadata_id\": 11,\n \"value\": \"Invoice #00001\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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))
}
var request = require("request");
var options = { method: 'POST',
url: 'https://www.digicert.com/services/v2/order/certificate/{{ssl_certificate_id}}',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ certificate:
{ common_name: 'example.com',
dns_names: [ 'sub.example.com', 'app.example.com' ],
csr: '<csr>',
server_platform: { id: 45 },
signature_hash: 'sha256',
organization_units: [ 'Accounting department' ] },
validity_years: 2,
comments: 'Message for the approver',
disable_renewal_notifications: true,
locale: 'en',
payment_method: 'balance',
skip_approval: true,
organization: { id: 123456 },
custom_fields: [ { metadata_id: 11, value: 'Invoice #00001' } ] },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "pending"
}
]
}
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "submitted"
}
]
}
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "approved"
}
],
"certificate_id": 113
}
{
"id": 112233,
"certificate_id": 113
}
{
"id": 112233,
"certificate_id": 113,
"certificate_chain": [
{
"subject_common_name": "example.com",
"pem": "<pem_certificate>"
},
{
"subject_common_name": "DigiCert SHA2 Secure Server CA",
"pem": "<pem_certificate>"
},
{
"subject_common_name": "DigiCert Global Root CA",
"pem": "<pem_certificate>"
}
]
}
有关对证书字段允许的值的信息,请参阅公共可信证书 - 违反行业标准的数据条目。
名称 | 请求/选项 | 类型 | 描述 |
---|---|---|---|
certificate | 必填 | object | 证书详细信息。 |
.. common_name | 必填 | string | 要保护的域。 |
.. dns_names | 可选 | array |
要保护的附加域。 可能产生额外费用。(请参阅最佳实践 - 免费获取域的两个版本。) |
.. csr | 必填 | string | 证书签名请求 (CSR)。 |
.. signature_hash | 必填 | string |
用于给证书签名的哈希算法。 代码签名证书仅支持 SHA-256。 |
.. organization_units | 可选 | array | 在您的组织中使用该证书的部门。 |
.. server_platform | 可选 | object |
服务器平台类型。 默认值: -1 (其他)
|
.. .. id | 必填 | int |
服务器平台 ID。 请参阅词汇表 - 服务器平台 |
.. profile_option | 可选 | string | 如果使用自定义证书配置文件,请指定配置文件名称。 |
renewed_thumbprint | 可选 | string | 如果订单可续订,请输入上一个订单的主要证书的 SHA-1 指纹。 |
validity_years | 必填 | int |
证书的有效年限。 可以替换为 validity_days 或 custom_expiration_date 。允许的值: 1 ,2
|
custom_expiration_date | 可选 | string |
证书的自定义到期日期。日期必须在将来的 825 天以内。 覆盖 validity_days 和 validity_years 格式: yyyy-MM-dd
|
comments | 可选 | string | 给审批者的订单备注。 |
auto_renew | 可选 | int |
指定证书是否应自动续订。 默认值: 0 允许的值: 0 (禁用),1 (启用)
|
custom_renewal_message | 可选 | string | 要包括在续订通知中的自定义消息。 |
disable_renewal_notifications | 可选 | bool |
指定是否应禁用续订通知电子邮件。 默认值: false
|
additional_emails | 可选 | array | 用于接收证书通知电子邮件(例如,证书颁发、重复证书、证书续订等)的附加电子邮件地址。 |
locale | 可选 | string |
DCV 电子邮件应该使用的语言。 请参阅词汇表 - 区域代码 |
renewal_of_order_id | 可选 | int | 如果订单可续订,请输入上一个订单的编号。 |
payment_method | 可选 | string |
指定要使用的付款方式。 允许的值: balance ,card ,profile 默认值: balance
|
dcv_method | 可选 | string |
在验证域控制权时要使用的 DCV 方法。 请参阅词汇表 - DCV 方法 |
skip_approval | 可选 | bool |
指定订单是否应跳过审批步骤并且立即提交验证并且在完成验证后颁发。 默认值: false
|
disable_ct | 可选 | bool |
指定是否应对证书禁用 CT 日志记录。 必须启用特定于订单的 CT 日志记录或将其忽略。请参阅允许用户将证书从 CT 日志排除。 默认值: false
|
organization | 必填 | object | 组织详细信息的容器。 |
.. id | 必填 | int |
与订单关联的组织的 ID。 或者,您可以在提交订单时传递此组织对象以添加新组织。请参阅创建组织了解对象结构要求。 |
container | 可选 | object | 如果需要,请指定应在其中放置订单的容器。 |
.. id | 必填 | int | 容器 ID。 |
custom_fields | 可选* | array |
特定于帐户的自定义字段。 *这些字段是否为必填字段,取决于您的自定义字段设置。 |
.. metadata_id | 必填 | int | 自定义字段 ID。 |
.. value | 必填 | string |
自定义字段的值。 数据验证类型取决于您的自定义字段设置。 |
名称 | 类型 | 描述 |
---|---|---|
id | int | 订单编号。 |
organization | object |
新组织详细信息的容器。 仅当通过订单创建新组织时才返回。 |
.. id | int | 新组织的组织 ID。 |
requests | array | 包含关于请求的信息。 |
.. id | int | 请求编号。 |
.. status | string |
请求状态。 可能的值: pending ,submitted ,approved ,rejected
|
certificate_id | int |
证书编号。 当请求状态为 approved 时返回。
|