Download certificate
2 minute read
GET
Use this endpoint to download a certificate using the https://www.digicert.com/services/v2/certificate/{{certificate_id}}/download/platform
certificate_id. certificate_id is a numeric identifier assigned by DigiCert to each certificate at the time of issuance.Note
The returned certificate format is based on theserver_platform.id on the order. To download the certificate for a different platform, append /{{platform_id}} to this endpoint. For valid platform_id values, see Glossary – Server platforms.Where to locate the Certificate ID?
You can find the Certificate ID using the following methods:
- Certificate Order API Response: Access the certificate ID in the
certificate_idresponse parameter if the certificate has been successfully issued. - CertCentral API: Use the Order info API endpoint to obtain the certificate ID. The certificate ID is returned in the
idresponse parameter, nested under thecertificateobject. Ensure you have the correspondingorder_idfrom the administrator before using the API endpoint. - CertCentral Platform: Retrieve the certificate ID from the CertCentral UI. In CertCentral, in the left menu, go to Certificates > Orders. On the Orders page, in the Order # column, select the Quick View link of the corresponding certificate. In the Order # details pane (on the right), under Certificate information, you’ll see the Certificate id.
- Order Confirmation Email: Locate the certificate ID in the order confirmation email.
Example requests and responses
curl -X GET \
'https://www.digicert.com/services/v2/certificate/{{certificate_id}}/download/platform' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'import requests
url = "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/download/platform"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("GET", url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/download/platform"
req, _ := http.NewRequest("GET", url, nil)
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: 'GET',
url: 'https://www.digicert.com/services/v2/certificate/{{certificate_id}}/download/platform',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' } };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});200 OK
// platform-specific certificate output
Was this page helpful?
Provide feedback