使用此端点获取关于单位数量订单的信息。
curl --request GET 'https://www.digicert.com/services/v2/units/order/1234' \
--header {{api_key}} \
--header 'Content-Type: application/json' \
import requests
url = "https://www.digicert.com/services/v2/units/order/1234"
payload = {}
headers = {
'X-DC-DEVKEY': {{api_key}},
'Content-Type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/units/order/1234"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
}
req.Header.Add("X-DC-DEVKEY", {{api_key}})
req.Header.Add("Content-Type", "application/json")
res, err := client.Do(req)
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://www.digicert.com/services/v2/units/order/1234',
'headers': {
'X-DC-DEVKEY': {{api_key}},
'Content-Type': 'application/json'
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
{
"id": 1234,
"unit_account_id": 1234567,
"unit_account_name": "Example subaccount",
"bundle": [
{
"product_name_id": "ssl_securesite_flex",
"product_name": "Secure Site OV",
"units": 5,
"cost": 1995.00
},
{
"product_name_id": "ssl_ev_securesite_flex",
"product_name": "Secure Site EV",
"units": 20,
"cost": 19900.00
}
],
"cost": 21895.00,
"status": "completed",
"expiration_date": "2022-01-11",
"created_date": "2021-01-11 09:34:56",
"can_cancel": true
}
名称 | 类型 | 描述 |
---|---|---|
id | integer | 单位数量订单 ID。 |
unit_account_id | integer | 订单上的子帐户的帐号。 |
unit_account_name | string | 订单上的子帐户用户名。 |
bundle | array | 对象列表,其中含有为订单上每种类型的产品购买的单位数量及费用。 |
.. product_name_id | string |
产品的唯一标识符。 可能的值:请参阅词汇表 - 产品标识符。 |
.. product_name | string | 产品的名称。 |
.. units | integer | 为产品订购的单位数量。 |
.. cost | double | 该组合单位数量的费用。 |
cost | double | 总订单费用。 |
status | string |
订单状态。 可能的值: completed , canceled
|
expiration_date | string |
单位数量到期日期。 格式: YYYY-MM-DD
|
created_date | string |
创建订单的时间戳。 格式: YYYY-MM-DD hh:mm:ss
|
can_cancel | boolean |
如果 true ,可以取消订单。否则为 false 。
|