GetLoyaltyRuleonAccount
Action: POST
Endpoint: /api/CoreCredit/Rewards/GetLoyaltyRuleonAccount
The purpose of this API is to return all the Loyalty Rules which are either applicable to the account( i.e via which Account can earn rewards) or which are already applied to the account( i.e via which account is already earnning rewards).
Request fields details
Fields | Description |
---|---|
Source string Mandatory |
Source of API Consumer For external system expected sources will be WEB. Allowable Values: 50 |
IPAddress string Optional |
IP Address of Client / Application Hosting Server Example: 10.206.0.204 Allowable Values: 15 |
DateFormat string Optional |
Place Holder for Future Use. Values are: 1 : MM/dd/yyyy HH:MM:SS (Default) 2 : MM/dd/yy HH:MM:SS 3 : dd/MM/yyyy HH:MM:SS Allowable Values: 25 |
CurrencyCode string Optional |
Currency Code Place Holder for Future Use. Valid Values: Refer Appendix Section - Currency Code Example:840 = US Dollar Condition:If no value is passed, default value = 840 Allowable Values: 10 |
CurrencySymbolType string Optional |
Place Holder for Future Use. CurrencySymbolType: 1: Currency Sign like $ 2: 3 ALPHA Currency Code like USD Allowable Values: 10 |
Language string Optional |
Place Holder for Future Use. Language: en: means use English Default: en - English Allowable Values: 10 |
ExternalIP string Mandatory |
IP Address of end user of API Allowable Values: 50 |
SessionID string Optional |
Session identifier of the API Example: 000028;026;1349906692 Allowable Values: 100 |
APIVersion string Mandatory |
Version of the API to be invoked. Example: 2.0 API Version Current Version 2.0 Allowable Values: 10 |
CallerID string Optional |
Caller ID of source from where API is initiated it is End User Caller ID Example: 7204454214 (phone number applicable in Case of IVR) Allowable Values: 20 |
CalledID string Optional |
Called ID of destination for which API is initiated It is Destination Called ID Example: 7314145404 (phone number applicable in Case of IVR) Allowable Values: 20 |
RequestTime datetime Optional |
Request Date Time of API Format: MM/dd/yyyy HH:mm:ss Example:01/15/2020 10:05:23 |
AccountNumber string Conditional |
Account number of cardholder. Valid Values: 0-9 Format:XXXXXXXXXXXXXXXX Example:1236547896325874 Condition:At least one of AdminNumber/CardNumber/AccountNumber/AccountID is required. Allowable Values: 19 |
AdminNumber int64 Conditional |
Details can be obtain by admin number (Embossing Acct-id) Valid Values: 0-9 Format:XXXXXXXXXXXXXXXX Example:1236547896325874 Condition:At least one of AdminNumber/CardNumber/AccountNumber/AccountID is required. |
CardNumber string Conditional |
Card Number of account holder. Valid Values:0-9 Format:XXXXXXXXXXXXXXXX Example:1236547896541236 Condition:At least one of AdminNumber/CardNumber/AccountNumber/AccountID is required. Allowable Values: 19 |
DecisionFlag integer Optional |
This flag decide if loyalty rules applicable to the account should return or the already applied rules should return. Valid Values: 1 = Applied Rule on Accounts 2 = Applicable Rule on Accounts 3 = Both(Applied and Applicable) rule on Account. 4 = Expired Rule on Accounts Example:3 |
StartDate datetime Optional |
StartDate(Activities will be fetched from given date). If not provided then default start date is Account Creation Date. Format: MM/DD/YYYY HH:MM:SS Example: 01/01/2020 11:05:05 |
EndDate datetime Optional |
EndDate(Activities will be fetched from given date). If not provided then default End date is Current Date. Format: MM/DD/YYYY HH:MM:SS Example: 01/01/2020 11:05:05 |
Sample request body
{ "Source": "Web", "IPAddress": "10.120.0.0", "DateFormat": null, "CurrencyCode": null, "CurrencySymbolType": null, "Language": null, "ExternalIP": "10.120.0.0", "SessionID": null, "APIVersion": "2.0", "CallerID": null, "CalledID": null, "RequestTime": null, "AccountNumber": "8110000000000125", "AdminNumber": 167550, "CardNumber": null, "DecisionFlag": 1, "StartDate": null, "EndDate": null }
Response fields details
Fields | Description |
---|
Sample response body
{ "Message": "Rule Details Returned Successfully.", "Status": true, "ErrorCode": "ERR01135", "ResponseData": { "AccountNumber": "8110000000000125", "AppliedRuleDetails": [ { "RuleID": 1458, "RuleName": null, "RuleDescription": null, "RuleType": null, "RuleApplication": null, "RuleSetupOn": null, "RuleStatus": null, "StartDate": "01/01/2020 00:00:00", "EndDate": "02/01/2020 00:00:00", "RewardPercent": null, "RewardAmountPoints": null, "TotalAmountSpent": 450.0, "NumberofTransaction": "6", "RewardGenerateOn": "3/10/2021 12:00:00 AM", "NumberofGoodPaymentsRequired": "6", "NumberofGoodPaymentsMade": "3" } ], "ApplicableRuleDetails": null, "ExpiredRuleDetails": null } }