此頁面描述有 document_signing
群組名稱的產品 (請參閱詞彙 – 產品識別碼)。
使用此端點提交使用 document_signing_org_1
或 document_signing_org_2
作為 document_certificate_id 的文件簽章憑證要求訂單。
curl -X POST \
'https://www.digicert.com/services/v2/order/certificate/{{document_certificate_id}}' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"certificate": {
"server_platform": {
"id": 21
},
"signature_hash": "sha256"
},
"cs_provisioning_method": "ship_token",
"use_org_as_common_name": true,
"validity_years": 2,
"comments": "Comments for the the approver.",
"organization": {
"id": 334455
},
"container": {
"id": 221122
},
"ship_info": {
"name": "Erin Guerra",
"addr1": "360 Taylor Street",
"addr2": "Floor 74",
"city": "Richmond",
"state": "va",
"zip": "69662",
"country": "us",
"method": "standard"
},
"subject": {
"name": "Rene Pierce",
"job_title": "School Counselor",
"phone": "054-139-0798",
"email": "rene.pierce@yahoo.com"
},
"csa_agreed_to": 1,
"skip_approval": true,
"payment_method": "balance"
}'
import requests
url = "https://www.digicert.com/services/v2/order/certificate/{{document_certificate_id}}"
payload = "{\n \"certificate\": {\n \"server_platform\": {\n \"id\": 21\n },\n \"signature_hash\": \"sha256\"\n },\n \"cs_provisioning_method\": \"ship_token\",\n \"use_org_as_common_name\": true,\n \"validity_years\": 2,\n \"comments\": \"Comments for the the approver.\",\n \"organization\": {\n \"id\": 334455\n },\n \"container\": {\n \"id\": 221122\n },\n \"ship_info\": {\n \"name\": \"Erin Guerra\",\n \"addr1\": \"360 Taylor Street\",\n \"addr2\": \"Floor 74\",\n \"city\": \"Richmond\",\n \"state\": \"va\",\n \"zip\": \"69662\",\n \"country\": \"us\",\n \"method\": \"standard\"\n },\n \"subject\": {\n \"name\": \"Rene Pierce\",\n \"job_title\": \"School Counselor\",\n \"phone\": \"054-139-0798\",\n \"email\": \"rene.pierce@yahoo.com\"\n },\n \"csa_agreed_to\": 1,\n \"skip_approval\": true,\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/{{document_certificate_id}}"
payload := strings.NewReader("{\n \"certificate\": {\n \"server_platform\": {\n \"id\": 21\n },\n \"signature_hash\": \"sha256\"\n },\n \"cs_provisioning_method\": \"ship_token\",\n \"use_org_as_common_name\": true,\n \"validity_years\": 2,\n \"comments\": \"Comments for the the approver.\",\n \"organization\": {\n \"id\": 334455\n },\n \"container\": {\n \"id\": 221122\n },\n \"ship_info\": {\n \"name\": \"Erin Guerra\",\n \"addr1\": \"360 Taylor Street\",\n \"addr2\": \"Floor 74\",\n \"city\": \"Richmond\",\n \"state\": \"va\",\n \"zip\": \"69662\",\n \"country\": \"us\",\n \"method\": \"standard\"\n },\n \"subject\": {\n \"name\": \"Rene Pierce\",\n \"job_title\": \"School Counselor\",\n \"phone\": \"054-139-0798\",\n \"email\": \"rene.pierce@yahoo.com\"\n },\n \"csa_agreed_to\": 1,\n \"skip_approval\": true,\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/{{document_certificate_id}}',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ certificate: { server_platform: { id: 21 }, signature_hash: 'sha256' },
cs_provisioning_method: 'ship_token',
use_org_as_common_name: true,
validity_years: 2,
comments: 'Comments for the the approver.',
organization: { id: 334455 },
container: { id: 221122 },
ship_info:
{ name: 'Erin Guerra',
addr1: '360 Taylor Street',
addr2: 'Floor 74',
city: 'Richmond',
state: 'va',
zip: '69662',
country: 'us',
method: 'standard' },
subject:
{ name: 'Rene Pierce',
job_title: 'School Counselor',
phone: '054-139-0798',
email: 'rene.pierce@yahoo.com' },
csa_agreed_to: 1,
skip_approval: true,
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 | 憑證詳細資料。 |
.. csr | 選填* | string |
憑證簽章要求 (CSR)。 * 在 cs_provisioning_method 為 email 時必填。
|
.. server_platform | 選填 | object |
伺服器平台類型。 預設: -1 (其他)
|
.. .. id | 必填 | int |
伺服器平台 ID。 請參閱詞彙 — 伺服器平台 |
.. signature_hash | 必填 | string |
用於簽署憑證的雜湊演算法。 允許的值: sha256
|
cs_provisioning_method | 選填 | string |
說明您要接收權杖的方法。 請參閱詞彙 — CS 建置方法 |
use_org_as_common_name | 選填 | bool |
說明是否應使用組織名稱作為憑證上的一般名稱。 預設: true
|
validity_years | 必填 | int |
憑證有效的年數。 允許的值: 1 ,2 ,3
|
comments | 選填 | string | 與核准者的訂單有關的註解。 |
organization | 必填 | object | 與訂單關聯的組織。 |
.. id | 必填 | int | 組織 ID。 |
container | 選填 | object | 視需要說明在其之下下訂單的容器。 |
.. id | 必填 | int | 容器 ID。 |
ship_info | 選填 | object | 指定權杖的出貨地址。 |
.. name | 必填 | string | |
.. addr1 | 必填 | string | |
.. addr2 | 選填 | string | |
.. city | 必填 | string | |
.. state | 必填 | string | |
.. zip | 必填 | string | |
.. country | 必填 | string | |
.. method | 必填 | string |
權杖的傳送優先順序。 允許的值: standard ,expedited (產生額外的費用)
|
subject | 必填 | object | 憑證的主體資訊。 |
.. name | 必填 | string | 主體全名 |
.. job_title | 必填 | string | 主體職稱。 |
.. phone | 必填 | string | 主體電話號碼。 |
必填 | string | 主體電郵地址。 | |
custom_fields | 選填* | object |
特定帳戶自訂欄位。 *是否需要這些欄位視您的自訂欄位設定而定。 |
.. metadata_id | 必填 | int | 自訂欄位 ID。 |
.. value | 必填 | string |
自訂欄位的值。 資料驗證類型視您的自訂欄位設定而定。 |
user_id_assignments | 選填 | array | 可以管理訂單的使用者 ID 清單。 |
skip_approval | 選填 | bool |
說明訂單是否應跳過核准步驟,並在完成時立刻提交進行驗證和發行。 預設: false
|
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 時傳回。
|