使用此端点提交 Secure Site Pro SSL 证书申请单。
curl -X POST \
https://www.digicert.com/services/v2/order/certificate/ssl_securesite_flex \
-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>",
"signature_hash": "sha256",
"organization_units": [
"Shared Services"
],
"server_platform": {
"id": 2
}
},
"comments": "Certificate for app server.",
"container": {
"id": 334455
},
"auto_renew": 1,
"custom_renewal_message": "Keep this renewed.",
"organization": {
"id": 123456,
"contacts": [
{
"contact_type": "organization_contact",
"user_id": 565611
},
{
"contact_type": "technical_contact",
"first_name": "Jill",
"last_name": "Valentine",
"job_title": "STAR Member",
"telephone": "8017019600",
"email": "jill.valentine@digicert.com"
}
]
},
"validity_years": 2,
"payment_method": "balance"
}'
import requests
url = "https://www.digicert.com/services/v2/order/certificate/ssl_securesite_pro"
payload = "{\n \"certificate\": {\n \"common_name\": \"example.com\",\n \"dns_names\": [\n \"example2.com\",\n \"example3.com\"\n ],\n \"csr\": \"<csr>\",\n \"signature_hash\": \"sha256\",\n \"organization_units\": [\n \"Shared Services\"\n ],\n \"server_platform\": {\n \"id\": 2\n }\n },\n \"comments\": \"Certificate for app server.\",\n \"container\": {\n \"id\": 334455\n },\n \"auto_renew\": 1,\n \"custom_renewal_message\": \"Keep this renewed.\",\n \"organization\": {\n \"id\": 123456,\n \"contacts\": [\n {\n \"contact_type\": \"organization_contact\",\n \"user_id\": 565611\n },\n {\n \"contact_type\": \"technical_contact\",\n \"first_name\": \"Jill\",\n \"last_name\": \"Valentine\",\n \"job_title\": \"STAR Member\",\n \"telephone\": \"8017019600\",\n \"email\": \"jill.valentine@digicert.com\"\n }\n ]\n },\n \"validity_years\": 2,\n \"payment_method\": \"balance\"\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_securesite_pro"
payload := strings.NewReader("{\n \"certificate\": {\n \"common_name\": \"example.com\",\n \"dns_names\": [\n \"example2.com\",\n \"example3.com\"\n ],\n \"csr\": \"<csr>\",\n \"signature_hash\": \"sha256\",\n \"organization_units\": [\n \"Shared Services\"\n ],\n \"server_platform\": {\n \"id\": 2\n }\n },\n \"comments\": \"Certificate for app server.\",\n \"container\": {\n \"id\": 334455\n },\n \"auto_renew\": 1,\n \"custom_renewal_message\": \"Keep this renewed.\",\n \"organization\": {\n \"id\": 123456,\n \"contacts\": [\n {\n \"contact_type\": \"organization_contact\",\n \"user_id\": 565611\n },\n {\n \"contact_type\": \"technical_contact\",\n \"first_name\": \"Jill\",\n \"last_name\": \"Valentine\",\n \"job_title\": \"STAR Member\",\n \"telephone\": \"8017019600\",\n \"email\": \"jill.valentine@digicert.com\"\n }\n ]\n },\n \"validity_years\": 2,\n \"payment_method\": \"balance\"\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_securesite_pro',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ certificate:
{ common_name: 'example.com',
dns_names: [ 'example2.com', 'example3.com' ],
csr: '<csr>',
signature_hash: 'sha256',
organization_units: [ 'Shared Services' ],
server_platform: { id: 2 } },
comments: 'Certificate for app server.',
container: { id: 334455 },
auto_renew: 1,
custom_renewal_message: 'Keep this renewed.',
organization:
{ id: 123456,
contacts:
[ { contact_type: 'organization_contact', user_id: 565611 },
{ contact_type: 'technical_contact',
first_name: 'Jill',
last_name: 'Valentine',
job_title: 'STAR Member',
telephone: '8017019600',
email: 'jill.valentine@digicert.com' } ] },
validity_years: 2,
payment_method: 'balance' },
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。 或者,您可以在提交订单时传递此组织对象以添加新组织。请参阅创建组织了解对象结构要求。 |
.. contacts | 可选 | array |
订单的组织联系人的列表。 注意:如果忽略,则为指定组织使用默认联系人。 |
.. .. contact_type | 必填 | string |
指定的联系人类型。 允许的值: organization_contact ,technical_contact ,ev_approver
|
.. .. user_id | 必填* | int |
帐户的现有用户或联系人的 ID。 *如果添加新联系人,可以忽略。 |
.. .. first_name | 可选 | string |
新联系人的名字。 注意:忽略 user_id 时必填。如果不忽略 user_id ,将使用新值更新指定用户的信息。
|
.. .. last_name | 可选 | string |
新联系人的姓氏。 注意:忽略 user_id 时必填。如果不忽略 user_id ,将使用新值更新指定用户的信息。
|
.. .. job_title | 可选 | string |
新联系人的职位名称。 注意:忽略 user_id 时必填。如果不忽略 user_id ,将使用新值更新指定用户的信息。
|
.. .. telephone | 可选 | string |
新联系人的电话号码。 注意:忽略 user_id 时必填。如果不忽略 user_id ,将使用新值更新指定用户的信息。
|
可选 | string |
新联系人的电子邮件地址。 注意:忽略 user_id 时必填。如果不忽略 user_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 时返回。
|