--- title: "Certificate chain" source_url: https://dev.digicert.com/certcentral-apis/services-api/certificates/certificate-chain.html api_method: GET api_endpoint: "/services/v2/certificate/{{certificate_id}}/chain" api_url: "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/chain" --- **GET** `https://www.digicert.com/services/v2/certificate/{{certificate_id}}/chain` Use this endpoint to list the certificate chain for an issued certificate. ## Example requests and responses **cURL** ```bash curl -X GET \ 'https://www.digicert.com/services/v2/certificate/{{certificate_id}}/chain' \ -H 'Content-Type: application/json' \ -H 'X-DC-DEVKEY: {{api_key}}' ``` **Python** ```python import requests url = "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/chain" payload = "" headers = { 'X-DC-DEVKEY': "{{api_key}}", 'Content-Type': "application/json" } response = requests.request("GET", url, data=payload, headers=headers) print(response.text) ``` **Go** ```go package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://www.digicert.com/services/v2/certificate/{{certificate_id}}/chain" 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)) } ``` **NodeJS** ```javascript var request = require("request"); var options = { method: 'GET', url: 'https://www.digicert.com/services/v2/certificate/{{certificate_id}}/chain', 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 ```json { "intermediates": [ { "subject_common_name": "www.digicert.com", "pem": "" }, { "subject_common_name": "DigiCert SHA2 Extended Validation Server CA", "pem": "" }, { "subject_common_name": "DigiCert High Assurance EV Root CA", "pem": "" } ] } ``` ## Response parameters
Name Type Description
intermediates array List of certificates in the chain.
.. subject_common_name string Common name on the certificate.
.. pem string PEM encoded certificate.
Note: The pem response parameter includes newline characters \r\n, which are an inherent part of PEM-encoded certificates.