이 엔드포인트를 사용하여 인증서 주문에 대한 가격 견적을 받습니다.
견적을 결정할 수 없는 경우, 엔드포인트는 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 | 제품 애드온의 단위별 비용입니다. |