Appelez ce point de terminaison pour obtenir une estimation du prix d’une commande de certificat.
S’il n’a pas été possible d’estimer le prix, le point de terminaison renvoie l’estimation 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"
}
]
}
Nom | Obligatoire/facultatif | Type | Description |
---|---|---|---|
certificate | Obligatoire | object | Détails relatifs aux domaines à protéger |
.. dns_names | Obligatoire | array | Liste des domaines que le certificat doit protéger |
validity_years | Obligatoire | int |
Nombre d’années de validité Valeurs autorisées : 1 , 2
|
custom_expiration_date | Facultatif | string |
Date d’expiration personnalisée du certificat Si définie, ce paramètre remplace la valeur validity_years .Format : YYYY-MM-DD
|
is_out_of_contract | Facultatif | int |
Si un contrat est établi, indique si le prix hors contrat doit être renvoyé. Valeurs autorisées : 0 (prix contractuel), 1 (prix non contractuel)Valeur par défaut : 0
|
product_name_id | Obligatoire | string |
Produit de certification à commander Consultez le Glossaire — Identificateurs de produits |
Nom | Type | Description |
---|---|---|
base_price | int | Coût de base du type de produit spécifié |
total_price | int | Estimation du coût total de la commande |
addons_price | int | Coût de tous les composants additionnels |
addons | array | Détails relatifs aux composants additionnels commandés |
.. subtotal | int |
Sous-total des composants additionnels Calculé en multipliant units par additional_name_price .
|
.. product_id | int |
ID produit du composant additionnel Valeurs possibles : 12 (nom SAN supplémentaire)
|
.. units | int | Nombre de composants additionnels ajoutés à la commande |
.. additional_name_price | string | Coût unitaire du composant additionnel |