使用此端点列出来自子帐户和次级子帐户的所有订单。
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 | 订单编号。 |
.. certificate | object |
订购的证书的相关详细信息。 仅对由直接子帐户下达的订单返回。 |
.. .. id | int | 证书编号。 |
.. .. 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 查询字符串进行修改。 |