Ajax Members Loyalty Accounts

This section describes all of the Loyalty Accounts methods.

Ajax Method Group: Ajax_Frontend_Members_LoyaltyAccounts

getAccountExpiryDate

Overview

Permission Required: None

Method Call: /ajax/Ajax_Frontend_Members_LoyaltyAccounts/getAccountExpiryDate

Aurora Demo Example: http://www.aurorademo.co.uk/members/loyalty-accounts

📘

This method gets the account expiry date for the provided discount card number and last name.

Method Description

This method requires two parameters to be passed:

Param NameDetailsExample
card_numberThe card number that will be used as an identifier to get accounts from EagleEye123123
last_nameThe last name of the consumer that is identified by the card numberHardcastle

Data Returned

On success the following will be returned:

{
	"success": 1,
	"data": 
	{
		"date_expires":"2018-11-25T12:55:50+00:00",
		"has_expired":0
	}
}

Errors

If the request fails then the response returned will have a success value of 0 and an error message will be included if appropriate.

🚧

If there is a missing parameter, the following response will be returned:

{
	"success": 0,
	"error": 
	{
		"code":-1,
		"message":"Missing card number or last name, please provide both"
	}
}

If no account is found for the provided discount card number:

{
	"success": 0,
	"error": 
	{
		"code":-1,
		"message":"No accounts found in EagleEye for the provided card number"
	}
}

If no account is found with a matching last name:

{
	"success": 0,
	"error": 
	{
		"code":-1,
		"message":"No discount card found with that last name in EagleEye"
	}
}

If the EagleEye Wallet integration is not enabled:

{
	"success": 0,
	"error": 
	{
		"code":-1,
		"message":"EagleEye Wallet is not enabled"
	}
}

See the EagleEye integration doc for help with enabling and setting up the EagleEye Wallet integration.

If called without an authenticated session present (i.e. called by a user that has not yet logged in), this script returns a simple failure message as shown below.

{
    "success": 0,
    "error": {
        "code": 1,
        "message": "Access denied."
    }
}

Related Aurora Demo Example JS

example.com/_js/members_loyalty_accounts.js