このエンドポイントを使用して、証明書オーダーについての推定価格を取得します。
推定額が確定できない場合、エンドポイントは 0
の推定価格を返してきます。
curl -X POST \
https://www.digicert.com/services/v2/finance/order-pricing \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"certificate": {
"dns_names": [
"example.com",
"example.org",
"example.biz",
"test-example.com"
]
},
"validity_years": 2,
"product_name_id": "ssl_multi_domain"
}'
import requests
url = "https://www.digicert.com/services/v2/finance/order-pricing"
payload = "{\n \"certificate\": {\n \t\"dns_names\": [\n \t\t\"example.com\",\n \t\t\"example.org\",\n \t\t\"example.biz\",\n \t\t\"test-example.com\"\n \t]\n },\n \"validity_years\": 2,\n \"product_name_id\": \"ssl_multi_domain\"\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/finance/order-pricing"
payload := strings.NewReader("{\n \"certificate\": {\n \t\"dns_names\": [\n \t\t\"example.com\",\n \t\t\"example.org\",\n \t\t\"example.biz\",\n \t\t\"test-example.com\"\n \t]\n },\n \"validity_years\": 2,\n \"product_name_id\": \"ssl_multi_domain\"\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/finance/order-pricing',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ certificate:
{ dns_names:
[ 'example.com',
'example.org',
'example.biz',
'test-example.com' ] },
validity_years: 2,
product_name_id: 'ssl_multi_domain' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"base_price": 680,
"total_price": 937,
"addons_price": 257,
"addons": [
{
"subtotal": 257,
"product_id": 12,
"units": 1,
"additional_name_price": "257.00"
}
]
}
名前 | 申請/オプション | 種別 | 説明 |
---|---|---|---|
certificate | 必須 | object | 安全保護するドメインについての詳細 |
.. dns_names | 必須 | array | 証明書で安全保護するドメインのリスト |
validity_years | 必須 | int |
有効年数 許可値: 1 ,2
|
custom_expiration_date | 任意 | string |
証明書のカスタム有効期限日 含めた場合、このパラメータは validity_years を無視します。形式: YYYY-MM-DD
|
is_out_of_contract | 任意 | int |
契約中の場合は、契約外の価格を返す必要がある場合に指定します。 許可値: 0 (契約価格)、1 (契約外価格)デフォルト: 0
|
product_name_id | 必須 | string |
オーダーする契約製品 「用語集 — 製品識別子」を参照してください |
名前 | 種別 | 説明 |
---|---|---|
base_price | int | 指定した製品タイプの基本コスト |
total_price | int | オーダーの合計推定コスト |
addons_price | int | アドオンすべてのコスト |
addons | array | オーダーアドオンについての詳細 |
.. subtotal | int |
アドオンコスト小計units に additional_name_price を乗じて計算します。
|
.. product_id | int |
アドオンの製品 ID 可能な値: 12 (追加 SAN)
|
.. units | int | オーダーに追加したアドオンの数 |
.. additional_name_price | string | 製品アドオンの単価 |