使用此端點列出來自帳戶和子帳戶的所有訂單。
curl -X GET \
https://www.digicert.com/services/v2/account/subaccount/order \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v2/account/subaccount/order"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("GET", url, headers=headers)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/account/subaccount/order"
req, _ := http.NewRequest("GET", url, nil)
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: 'GET',
url: 'https://www.digicert.com/services/v2/account/subaccount/order',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"orders": [
{
"id": 123456,
"subaccount": {
"account_id": 112233,
"account_type": "enterprise",
"organization_name": "Sub account organization"
},
"product": {
"name_id": "ssl_plus",
"name": "Standard SSL",
"type": "ssl_certificate"
},
"order_price": {
"cost": 198,
"currency": "USD"
},
"status": "pending",
"number_of_sans": 1,
"date_created": "2019-05-07T09:33:08+00:00",
"validity_years": 1
},
{
"id": 123457,
"certificate": {
"id": 101015,
"thumbprint": "03F6",
"serial_number": "0FDA",
"common_name": "example.com",
"dns_names": [
"sub1.example.com",
"sub2.example.com",
"sub3.example.com",
"sub4.example.com"
],
"valid_till": "2020-06-15",
"organization_units": [
"IT Dept."
],
"signature_hash": "sha256"
},
"subaccount": {
"account_id": 123445,
"account_type": "enterprise",
"organization_name": "Sub account organization"
},
"product": {
"name_id": "ssl_multi_domain",
"name": "Multi-Domain SSL",
"type": "ssl_certificate"
},
"order_price": {
"cost": 358,
"currency": "USD"
},
"status": "issued",
"number_of_sans": 4,
"date_created": "2019-06-11T07:08:04+00:00",
"date_issued": "2019-06-11T07:09:00+00:00",
"validity_years": 1
},
{
"id": 123458,
"certificate": {
"id": 3179443638,
"common_name": "example2.com",
"dns_names": [
"sub.example2.com"
],
"organization_units": [
"Finance Department"
],
"signature_hash": "sha256"
},
"subaccount": {
"account_id": 123445,
"account_type": "enterprise",
"organization_name": "Sub account organization"
},
"product": {
"name_id": "ssl_securesite",
"name": "Secure Site SSL",
"type": "ssl_certificate"
},
"order_price": {
"cost": 399,
"currency": "USD"
},
"status": "pending",
"number_of_sans": 1,
"date_created": "2019-06-21T09:06:47+00:00",
"validity_years": 1
}
],
"page": {
"total": 3,
"limit": 1000,
"offset": 0
}
}
名稱 | 必填/選填 | 類型 | 說明 |
---|---|---|---|
offset | 選填 | int |
在指定頁數開始清單。 預設: 0
|
limit | 選填 | int |
將清單裁剪為指定頁數。 最大: 1000 (預設)
|
名稱 | 類型 | 說明 |
---|---|---|
orders | array | 傳回的訂單的清單。 |
.. id | int | 訂單 ID。 |
.. certificate | object |
與訂購的憑證有關的詳細資料。 僅在由中繼子帳戶下訂單時傳回。 |
.. .. id | int | 憑證 ID。 |
.. .. thumbprint | string |
憑證的指紋。 僅在憑證狀態是 issued 時傳回。
|
.. .. serial_number | string |
憑證的序號。 僅在憑證狀態是 issued 時傳回。
|
.. .. common_name | string | 由憑證保護安全的名稱。 |
.. .. dns_names | array | 由憑證保護安全的其他名稱的清單。 |
.. .. valid_till | string |
憑證有效期限結束日期。 僅在憑證狀態是 issued 時傳回。格式: yyyy-MM-dd
|
.. .. organization_units | array | 憑證上的組織單位的清單。 |
.. .. signature_hash | string | 憑證使用的簽章演算法。 |
.. subaccount | object | 與訂購憑證的子帳戶有關的詳細資料。 |
.. .. account_id | int | 子帳戶 ID。 |
.. .. account_type | string | 子帳戶類型。 |
.. .. organization_name | string | 子帳戶的主要組織。 |
.. product | object | 與訂購的產品有關的詳細資料。 |
.. .. name_id | string |
產品的名稱 ID。 請參閱詞彙 — 產品識別碼 |
.. .. name | string |
顯示產品名稱。 請參閱詞彙 — 產品識別碼 |
.. .. type | string |
產品類型。 請參閱詞彙 — 產品類型 |
.. order_price | object | 與訂單價格有關的詳細資料。 |
.. .. cost | int | 總訂單費用 |
.. .. currency | string |
貨幣單位。 可能的值: USD
|
.. status | string |
訂單的狀態。 請參閱詞彙 — 訂單狀態 |
.. number_of_sans | int |
在 dns_names 陣列中的網域數目。
|
.. date_created | string |
訂單建立日期。 格式:UTC 時區和 ISO 8601 日期 |
.. date_issued | string |
發行憑證時的日期。 僅在憑證狀態是 issued 時傳回。格式: yyyy-MM-dd
|
.. validity_years | int | 憑證將有效的年數。 |
頁面 | object |
與結果有關的詳細資料。 使用 URL 查詢字串修改。 |