def get_cis_certificate(session, base_url, order_id):
    """Retrieve certificate order id from Digicert API, including the chain"""
    certificate_url = f"{base_url}/platform/cis/certificate/{order_id}/download"
    session.headers.update({"Accept": "application/x-pkcs7-certificates"})
    response = session.get(certificate_url)
    session.headers.pop("Accept")
    response_content = handle_cis_response(session, response)

    cert_chain_pem = convert_pkcs7_bytes_to_pem(response_content)
    if len(cert_chain_pem) < 3:
        raise Exception("Missing the certificate chain")
    return cert_chain_pem
Retrieve certificate order id from Digicert API, including the chain
lemur/plugins/lemur_digicert/plugin.py