Use this endpoint to get price estimates for a certificate order.
If an estimate can't be determined, the endpoint returns a price estimate of 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.net",
"example.org"
]
},
"validity_years": 1,
"product_name_id": "ssl_basic",
"renewal_of_order_valid_till": "2021-06-20"
}'
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.net\",\n \t\t\"example.org\"]\n },\n \"validity_years\": 1,\n \"product_name_id\": \"ssl_basic\"\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.net\"]\n },\n \"validity_years\": 1,\n \"product_name_id\": \"ssl_basic\"\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.net',
'example.org'] },
validity_years: 1,
product_name_id: 'ssl_basic' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"base_price": 782,
"total_price": 782,
"addons_price": 0,
"san_package_price": 0,
"benefits_discount_total": 0,
"fqdns": {
"subtotal": 0,
"units": 0
},
"wildcards": {
"subtotal": 0,
"units": 0
},
"balance": 0,
"currency": "USD",
"tax": "0.00",
"tax_error": false
}
Name | Req/Opt | Type | Description |
---|---|---|---|
certificate | required | object | Details about the domains to secure. |
.. dns_names | required | array | List of domains to secure with the certificate. |
validity_years | required | int |
Validity period for the order, in years. Allowed values: Varies by product type. For valid ranges, see the Order endpoint documentation for the product that you want a price estimate for. |
custom_expiration_date | optional | string |
Custom expiration date for the order. If included, this parameter overrides validity_years .Format: YYYY-MM-DD
|
is_out_of_contract | optional | int |
If the account is under a contract, specify if the request should return the non-contract price. Allowed values: 0 (contract price), 1 (non-contract price)Default: 0
|
product_name_id | required | string |
Certificate product to order. See Glossary – Product identifiers |
billing_address | optional | object |
Billing address details. Used to calculate estimated tax. If not provided, we calculate estimated tax using the billing address associated with the account used to send the request. |
.. country | required | string | Billing country. |
.. city | required | string | Billing city. |
.. state | required | string |
Billing state or province. Optional for some countries. |
.. zip | required | string |
Zip/postal code. Optional for some countries. |
renewal_of_order_valid_till | optional | string |
If estimating the price of a renewal order, include the expiration date of the order being renewed. Format: YYYY-MM-DD
|
Name | Type | Description |
---|---|---|
base_price | int | Base cost for the specified product type. |
total_price | int | Total cost estimate for the order, including estimated tax. |
addons_price | int | Cost of all add-ons. |
addons | array |
Details about order add-ons. Not included in the response if the order does not have add-ons. |
.. subtotal | int |
Add-ons cost subtotal. Calculated by multiplying units by additional_name_price .
|
.. product_id | int |
Product ID of the add-on. Possible values: 12 (additional SAN)
|
.. units | int | Number of add-ons added to the order. |
.. additional_name_price | string | Per-unit cost of the product add-on. |
fqdns | object | Object with details about the price estimate for FQDNs on the order. |
.. subtotal | int | Price estimate for FQDNs on the order. |
.. units | int | Number of FQDNs on the order. |
wildcards | object | Object with details about the price estimate for wildcards on the order. |
.. subtotal | int | Price estimate for wildcards on the order. |
.. units | int | Number of wildcards on the order. |
balance | int | Current account balance. |
currency | string |
Currency code for the monetary values in this estimate. Possible values: See Glossary – DigiCert currencies. |
tax | float |
Estimated tax for the order. Returns 0 if an error prevents tax calculation. Note: Estimated tax may change when you place the order. |
tax_error | bool |
Returns true if an internal error prevents tax calculation.
|