此頁面描述有 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 | 如果訂單是續訂的,請輸入之前訂單的 ID。 |
skip_approval | 選填 | bool |
說明訂單是否應跳過核准步驟,並在完成時立刻提交進行驗證和發行。 預設: false
|
organization | 必填 | object | 與訂單關聯的組織。 |
.. id | 必填 | int | 組織 ID。 |
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 | 訂單 ID。 |
organization | object |
適用於新組織詳細資料的容器。 僅在建立有訂單的新組織時傳回。 |
.. id | int | 適用於新組織的組織 ID。 |
requests | array | 包含與要求有關的資訊。 |
.. id | int | 要求 ID。 |
.. status | string |
要求狀態。 可能的值: pending ,submitted ,approved ,rejected
|
certificate_id | int |
憑證 ID。 要求狀態是 approved 時傳回。
|