Questa pagina descrive i prodotti con il nome gruppo code_signing_certificate
(consulta Glossario – Identificatori prodotto).
Usa questo endpoint per inviare un ordine di richiesta certificato di firma codice usando code_signing
o code_signing_ev
come code_signing_certificate_id.
curl -X POST \
'https://www.digicert.com/services/v2/order/certificate/{{code_signing_certificate_id}}' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"certificate": {
"organization_units": [
"Engineering"
],
"server_platform": {
"id": 52
},
"signature_hash": "sha256"
},
"cs_provisioning_method": "ship_token",
"validity_years": 1,
"comments": "Message for the approver",
"skip_approval": true,
"organization": {
"id": 123456
},
"ship_info": {
"name": "Erin Guerra",
"addr1": "360 Taylor Street",
"addr2": "Floor 74",
"city": "Richmond",
"state": "va",
"zip": "69662",
"country": "us",
"method": "EXPEDITED"
},
"auto_renew": 1,
"custom_renewal_message": "Renew this please.",
"custom_fields": [
{
"metadata_id": 12,
"value": "123456"
}
],
"payment_method": "balance"
}'
import requests
url = "https://www.digicert.com/services/v2/order/certificate/{{code_signing_certificate_id}}"
payload = "{\n \"certificate\": {\n \"organization_units\": [\n \"Engineering\"\n ],\n \"server_platform\": {\n \"id\": 52\n },\n \"signature_hash\": \"sha256\"\n },\n \"cs_provisioning_method\": \"ship_token\",\n \"validity_years\": 1,\n \"comments\": \"Message for the approver\",\n \"skip_approval\": true,\n \"organization\": {\n \"id\": 123456\n },\n \"container\": {\n \"id\": 654321\n },\n \"ship_info\": {\n \"name\": \"Erin Guerra\",\n \"addr1\": \"360 Taylor Street\",\n \"addr2\": \"Floor 74\",\n \"city\": \"Richmond\",\n \"state\": \"va\",\n \"zip\": \"69662\",\n \"country\": \"us\",\n \"method\": \"EXPEDITED\"\n },\n \"auto_renew\": 1,\n \"custom_renewal_message\": \"Renew this please.\",\n \"custom_fields\": [\n {\n \"metadata_id\": 12,\n \"value\": \"123456\"\n }\n ],\n \"payment_method\": \"balance\"\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/order/certificate/{{code_signing_certificate_id}}"
payload := strings.NewReader("{\n \"certificate\": {\n \"organization_units\": [\n \"Engineering\"\n ],\n \"server_platform\": {\n \"id\": 52\n },\n \"signature_hash\": \"sha256\"\n },\n \"cs_provisioning_method\": \"ship_token\",\n \"validity_years\": 1,\n \"comments\": \"Message for the approver\",\n \"skip_approval\": true,\n \"organization\": {\n \"id\": 123456\n },\n \"container\": {\n \"id\": 654321\n },\n \"ship_info\": {\n \"name\": \"Erin Guerra\",\n \"addr1\": \"360 Taylor Street\",\n \"addr2\": \"Floor 74\",\n \"city\": \"Richmond\",\n \"state\": \"va\",\n \"zip\": \"69662\",\n \"country\": \"us\",\n \"method\": \"EXPEDITED\"\n },\n \"auto_renew\": 1,\n \"custom_renewal_message\": \"Renew this please.\",\n \"custom_fields\": [\n {\n \"metadata_id\": 12,\n \"value\": \"123456\"\n }\n ],\n \"payment_method\": \"balance\"\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/order/certificate/{{code_signing_certificate_id}}',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ certificate:
{ organization_units: [ 'Engineering' ],
server_platform: { id: 52 },
signature_hash: 'sha256' },
cs_provisioning_method: 'ship_token',
validity_years: 1,
comments: 'Message for the approver',
skip_approval: true,
organization: { id: 123456 },
container: { id: 654321 },
ship_info:
{ name: 'Erin Guerra',
addr1: '360 Taylor Street',
addr2: 'Floor 74',
city: 'Richmond',
state: 'va',
zip: '69662',
country: 'us',
method: 'EXPEDITED' },
auto_renew: 1,
custom_renewal_message: 'Renew this please.',
custom_fields: [ { metadata_id: 12, value: '123456' } ],
payment_method: 'balance' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "pending"
}
]
}
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "submitted"
}
]
}
{
"id": 112233,
"requests": [
{
"id": 113,
"status": "approved"
}
],
"certificate_id": 113
}
I parametri con un asterisco (*) vengono usati solo per gli ordini di firma codice EV.
Nome | Rich/Opz | Tipo | Descrizione |
---|---|---|---|
certificate | obbligatorio | object | Dettagli certificato. |
.. csr | facoltativo | string |
Richiesta di firma certificato (CSR). Non obbligatorio per alcun certificato di firma codice EV. Obbligatorio se il valore server_platform.id è 55 (Sun Java)
|
.. signature_hash | obbligatorio | string |
Algoritmo hash usato per firmare il certificato. Valori consentiti: sha256
|
.. server_platform | facoltativo | object |
Tipo di piattaforma server. Predefinita: -1 (altro)
|
.. .. id | obbligatorio | int |
ID piattaforma server. Consulta Glossario — Piatteforme server |
.. organization_units | facoltativo | array | Reparto nella tua organizzazione associata al certificato. |
auto_renew | facoltativo | int | Numero di volte in cui il certificato deve rinnovarsi automaticamente. |
additional_emails | facoltativo | array | Altri indirizzi e-mail per ricevere e-mail di notifica certificato (ad es. emissione del certificato, certificato duplicato, rinnovi certificato, ecc.). |
renewal_of_order_id | facoltativo | int | Se un ordine prevede un rinnovo, inserisci l’ID dell’ordine precedente. |
skip_approval | facoltativo | bool |
Specifica se l’ordine deve saltare la fase di approvazione ed essere inviato immediatamente per la convalida ed emesso se completato. Predefinita: false
|
organization | obbligatorio | object | Organizzazione da associare all’ordine. |
.. id | obbligatorio | int | ID organizzazione. |
container | facoltativo | object | Se necessario, specificare il contenitore in cui deve essere posizionato l’ordine. |
.. id | obbligatorio | int | ID contenitore. |
validity_years | obbligatorio | int |
Numero di anni in cui è valido il certificato. Valori consentiti: 1 , 2 , 3
|
cs_provisioning_method* | obbligatorio | string |
Per i certificati di firma codice EV, specifica come vuoi ricevere il token. Consulta Glossario — Metodi di provisioning CS |
ship_info* | facoltativo | object | Per i certificati di firma codice EV, specifica l’indirizzo di spedizione per il token. |
.. name | obbligatorio | stringa | |
.. addr1 | obbligatorio | stringa | |
.. addr2 | facoltativo | stringa | |
.. city | obbligatorio | stringa | |
.. state | obbligatorio | stringa | |
.. zip | obbligatorio | stringa | |
.. country | obbligatorio | stringa | |
.. method | obbligatorio | string |
Priorità di spedizione per il token. Valori consentiti: STANDARD , EXPEDITED (sono previsti costi aggiuntivi)
|
custom_fields | facoltativo* | object |
Campi personalizzati specifici dell’account. *L’obbligatorietà di questi campi dipende dalle impostazioni dei campi personalizzati. |
.. metadata_id | obbligatorio | int | ID campo personalizzato. |
.. value | obbligatorio | string |
Valore per il campo personalizzato. Il tipo di convalida dati dipende dalle impostazioni dei campi personalizzati. |
payment_method | facoltativo | string |
Specifica il metodo di pagamento da usare. Valori consentiti: balance , card , profile Predefinita: balance
|
Nome | Tipo | Descrizione |
---|---|---|
id | int | ID ordine. |
organization | object |
Contenitore per i nuovi dettagli organizzazione. Riportato solo se è stata creata una nuova organizzazione con l’ordine. |
.. id | int | ID organizzazione per la nuova organizzazione. |
requests | array | Contiene le informazioni sulla richiesta. |
.. id | int | ID richiesta |
.. status | string |
Stato richiesta. Valori possibili: pending , submitted , approved , rejected
|
certificate_id | int |
ID certificato. Riportato se lo stato richiesta. è approved .
|