此页描述具有 client_certificate
组名称的产品(请参阅词汇表 - 产品标识符)。
使用此端点提交使用 client_premium_sha2
,client_email_security_plus
,client_authentication_plus
或 client_digital_signature_plus_sha2
作为 client_certificate_id 的客户端证书请求订单。
curl -X POST \
'https://www.digicert.com/services/v2/order/certificate/{{client_certificate_id}}' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"certificate": {
"common_name": "Lock Cole",
"emails": [
"locke.cole@example.com"
],
"signature_hash": "sha256",
"organization_units": [
"Accounting"
],
"csr": "<csr>"
},
"skip_approval": true,
"organization": {
"id": 112233
},
"container": {
"id": 445566
},
"validity_years": 1,
"payment_method": "balance"
}'
import requests
url = "https://www.digicert.com/services/v2/order/certificate/{{client_certificate_id}}"
payload = "{\n \"certificate\": {\n \"common_name\": \"Lock Cole\",\n \"emails\": [\n \"locke.cole@example.com\"\n ],\n \"signature_hash\": \"sha256\",\n \"organization_units\": [\n \"Accounting\"\n ],\n \"csr\": \"<csr>\"\n },\n \"skip_approval\": true,\n \"organization\": {\n \"id\": 112233\n },\n \"container\": {\n \"id\": 445566\n },\n \"validity_years\": 1,\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/{{client_certificate_id}}"
payload := strings.NewReader("{\n \"certificate\": {\n \"common_name\": \"Lock Cole\",\n \"emails\": [\n \"locke.cole@example.com\"\n ],\n \"signature_hash\": \"sha256\",\n \"organization_units\": [\n \"Accounting\"\n ],\n \"csr\": \"<csr>\"\n },\n \"skip_approval\": true,\n \"organization\": {\n \"id\": 112233\n },\n \"container\": {\n \"id\": 445566\n },\n \"validity_years\": 1,\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/{{client_certificate_id}}',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ certificate:
{ common_name: 'Lock Cole',
emails: [ 'locke.cole@example.com' ],
signature_hash: 'sha256',
organization_units: [ 'Accounting' ],
csr: '<csr>' },
skip_approval: true,
organization: { id: 112233 },
container: { id: 445566 },
validity_years: 1,
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
}
名称 | 请求/选项 | 类型 | 描述 |
---|---|---|---|
certificate | 必填 | object | 证书详细信息。 |
.. common_name | 必填 | string | 要保护的名称。 |
.. emails | 必填 | array | 要放置在证书上的电子邮件。 |
.. signature_hash | 必填 | string |
用于给证书签名的哈希算法。 允许的值: sha256
|
.. organization_units | 可选 | array | 与证书关联的组织部门。 |
.. csr | 可选 | string | 证书签名请求 (CSR)。 |
auto_renew | 可选 | int | 证书的自动续订次数。 |
renewal_of_order_id | 可选 | int | 如果订单可续订,请输入上一个订单的编号。 |
skip_approval | 可选 | bool |
指定订单是否应跳过审批步骤并且立即提交验证并且在完成验证后颁发。 默认值: false
|
organization | 必填 | object | 与订单关联的组织。 |
.. id | 必填 | int | 组织编号。 |
container | 可选 | object | 如果需要,请指定应在其中放置订单的容器。 |
.. id | 可选 | int | 容器 ID。 |
validity_years | 必填 | int |
证书的有效年限。 可以替换为 custom_expiration_date 。允许的值: 1 ,2
|
custom_expiration_date | 可选 | string |
证书的自定义到期日期。日期必须在将来的 825 天以内。 覆盖 validity_years 格式: yyyy-MM-dd
|
custom_fields | 可选* | object |
特定于帐户的自定义字段。 *这些字段是否为必填字段,取决于您的自定义字段设置。 |
.. metadata_id | 必填 | int | 自定义字段 ID。 |
.. value | 必填 | string |
自定义字段的值。 数据验证类型取决于您的自定义字段设置。 |
payment_method | 可选 | string |
指定要使用的付款方式。 允许的值: balance ,card ,profile 默认值: balance
|
名称 | 类型 | 描述 |
---|---|---|
id | int | 订单编号。 |
organization | object |
新组织详细信息的容器。 仅当通过订单创建新组织时才返回。 |
.. id | int | 新组织的组织 ID。 |
requests | array | 包含关于请求的信息。 |
.. id | int | 请求编号。 |
.. status | string |
请求状态。 可能的值: pending ,submitted ,approved ,rejected
|
certificate_id | int |
证书编号。 当请求状态为 approved 时返回。
|