getCustomerReferrals

Access all of the referral data for a customer

RivoJS.getCustomerReferrals().then(function(resp){
  console.log(resp)
});

Sample response

{
    "referral_code": "ZzeBK4ZXiyeGJzZg1",
    "url": "https://example.myshopify.com?referral_code=ZzeBK4ZXiyeGJzZg1",
    "completed": 1,
    "referrals": [
        {
            "id": 2,
            "status": "completed",
            "email": "[email protected]",
            "discount_code": "BAL-99f152914a5f",
            "reward": {
                "id": 4,
                "name": "$5 off coupon",
                "enabled": true,
                "points_amount": 0,
                "points_type": "fixed",
                "reward_type": "fixed_amount",
                "source": "referrer",
                "pretty_display_rewards": "$5 off coupon (0 points required)",
                "icon_url": null,
                "terms_of_service": {
                    "reward_type": "fixed_amount",
                    "applies_to": "entire",
                    "show_tos": false
                }
            }
        },
        {
            "id": 1,
            "status": "unclaimed",
            "email": "[email protected]",
            "discount_code": null,
            "reward": {
                "id": 4,
                "name": "$5 off coupon",
                "enabled": true,
                "points_amount": 0,
                "points_type": "fixed",
                "reward_type": "fixed_amount",
                "source": "referrer",
                "pretty_display_rewards": "$5 off coupon (0 points required)",
                "icon_url": null,
                "terms_of_service": {
                    "reward_type": "fixed_amount",
                    "applies_to": "entire",
                    "show_tos": false
                }
            }
        }
    ],
    "metadata": {
        "next_page": null,
        "prev_page": null
    }
}