def get_certificate_id(session, base_url, order_id):
    """Retrieve certificate order id from Digicert API."""
    order_url = f"{base_url}/services/v2/order/certificate/{order_id}"
    response_data = handle_response(session.get(order_url))
    if response_data["status"] != "issued":
        raise Exception("Order not in issued state.")

    return response_data["certificate"]["id"]
Retrieve certificate order id from Digicert API.
lemur/plugins/lemur_digicert/plugin.py