def get_ecommerce_client(url_postfix='', site_code=None):
    """
    Get client for fetching data from ecommerce API.
    Arguments:
        site_code (str): (Optional) The SITE_OVERRIDES key to inspect for site-specific values
        url_postfix (str): (Optional) The URL postfix value to append to the ECOMMERCE_API_ROOT value.

    Returns:
        EdxRestApiClient object
    """
    ecommerce_api_root = get_configuration('ECOMMERCE_API_ROOT', site_code=site_code)
    signing_key = get_configuration('JWT_SECRET_KEY', site_code=site_code)
    issuer = get_configuration('JWT_ISSUER', site_code=site_code)
    service_username = get_configuration('ECOMMERCE_SERVICE_USERNAME', site_code=site_code)
    return EdxRestApiClient(
        ecommerce_api_root + url_postfix, signing_key=signing_key, issuer=issuer, username=service_username)