Service URL: GET /accounts/search/{?accountType}{?accountId}{?pan}{?hashedPan}{?currencyId}{?locationId}
Request Headers:
Header | Description | Example |
---|---|---|
enactor-device-id | This header will identify the id of the device making the request | pos1@0001.enactor |
enactor-location-id | This header will specify the location of the device making the request | 0001 |
enactor-user-id | This header will specify the id of the user making the requestNote that unlike the subject header, this identifier should be for information only and should not be used for authorisation. | 1 |
subject | Customer number to identify and verify the customer who is making the request has the required permission to access an account | 1 |
Query Parameters:
accountType | Type of the account CustomerLoyaltyAccount , CustomerDepositAccount , CustomerCreditAccount , CustomerSpendAccount , etc. |
accountId | Account Id |
pan | Card numbernceResponse |
hashedPan | Hashed card number |
currencyId | Currency Id |
locationId | Location Id |
Response Body: A list of AccountBalanceEnquiryResponse
Example Request:
GET: http://localhost:8080/WebRestApi/rest/accounts/search/?accountType=customerLoyaltyAccount&accountId=887
enactor-device-id: pos1@0001.enactor
enactor-location-id: 0001
enactor-user-id: 1
subject: 1
Example Response:
{
"accountBalanceEnquiryResponses": [
{
"@type": "accountBalanceEnquiryResponse",
"accountBalanceEnquiryOutput": {
"@type": "accountBalanceEnquiryOutput",
"account": {
"@type": "customerLoyaltyAccount",
"loyaltySchemeId": {
"@type": "loyaltySchemeKey",
"id": "LOYALTY_UK"
},
"tierCode": "UK",
"manualTierReview": true,
"accountId": "0101025190527144502028",
"accountType": "customerLoyaltyAccount",
"accountOpenedDate": 1247596200000,
"status": "ACTIVE",
"customerNumber": "1",
"currencyId": {
"@type": "currencyKey",
"id": "GBP"
}
},
"accountDescription": "Customer Loyalty Account - Club",
"customer": {
"@type": "customer",
"addresses": [
{
"@type": "address",
"country": "GBR",
"isPreferred": true,
"county": "London",
"street2": "Chsiwick",
"street3": "street3",
"town": "London"
}
],
"customerNumber": "100000000000001",
"emailAddresses": [
{
"@type": "emailAddress",
"emailAddress": "validCustomer@enactor.co.uk",
"typeId": {
"@type": "contactTypeKey"
}
}
],
"phoneNumbers": [
{
"@type": "phoneNumber",
"number": "020 8234 4321",
"typeId": {
"@type": "contactTypeKey"
}
}
],
"customerName": {
"@type": "name",
"surname": "User",
"forename": "Test",
"title": "Mr"
}
},
"accountBalance": {
"@type": "accountBalance",
"accountId": "123456",
"accountType": "customerLoyaltyAccount",
"accountBalance": 1000,
"cardNumber": "8934736829037",
"currencyId": "GBP",
"balanceDate": 1625140844717,
"lastUpdated": 1625054444717
},
"customerCard": {
"@type": "customerCard",
"accountId": "0101025190527144502028",
"status": "NEW",
"accountType": "customerLoyaltyAccount",
"pan": "8934736829037",
"expiryDate": 1638100844718,
"issueDate": 1620820844718,
"nameOnCard": "Test User",
"issuedAt": {
"@type": "locationKey",
"id": "0001"
},
"createdOn": 1620734444718
},
"customerGroup": [
{
"@type": "groupKey",
"groupTypeId": "customerGroup",
"groupHierarchyId": "GOLD",
"id": "GOLD"
}
],
"customerLoyaltyAccountTotal": {
"@type": "customerLoyaltyAccountTotal",
"accountId": "0101025190527144502028",
"currencyId": {
"@type": "currencyKey",
"id": "GBP"
},
"numberOfTransactions": 3434,
"numberOfVisits": 8,
"totalSpend": 2980
},
"alternativeAmount": 888
},
"dynamicPromotions": [
{
"@type": "dynamicPromotion",
"promotionId": {
"@type": "promotionKey",
"promotionId": "PROMO",
"groupKey": {
"@type": "groupKey",
"groupTypeId": "customerGroup",
"groupHierarchyId": "GOLD",
"id": "GOLD"
}
},
"promotion": {
"@type": "promotion",
"promotionId": "TEST",
"groupKey": {
"@type": "groupKey",
"groupTypeId": "customerGroup",
"groupHierarchyId": "GOLD",
"id": "GOLD"
},
"description": "Birthday Promotion",
"priority": 99,
"overlapping": false,
"distributeSavingsOverAllItems": true,
"operationWithPreviousPromotions": "GROSS",
"raiseNearMissAlert": true,
"maximumTriggersPerTransaction": 10,
"timetableTrigger": {
"@type": "timetableTrigger",
"startDate": "2021-03-23T00:00:00.000+05:30",
"endDate": "2021-10-09T23:59:59.000+05:30",
"triggerPeriods": [
{
"timePeriod": {
"dayOfWeek": 1
}
},
{
"timePeriod": {
"dayOfWeek": 2
}
},
{
"timePeriod": {
"dayOfWeek": 3
}
},
{
"timePeriod": {
"dayOfWeek": 4
}
},
{
"timePeriod": {
"dayOfWeek": 5
}
},
{
"timePeriod": {
"dayOfWeek": 6
}
},
{
"timePeriod": {
"dayOfWeek": 7
}
}
]
},
"allowedForEmployeeSale": true,
"adjustEmployeeBalance": true
}
}
],
"messages": [
{
"@type": "uiMessage",
"messageBase": "Pos/Birthday/BirthdayMessages",
"messageId": "CUSTOMER_BIRTHDAY"
}
],
"errorMessage": {}
}
]
}