Get by Identifiers
This call is executed to obtain the details of customers (which includes details about their loyalty benefits) by their customer IDs. The parameters of this call are dynamic based on the business setup of the account’s profile.
GET
/accounts
Request elements
Requires either phone number or email.
Parameter | Type | Required | Description |
---|---|---|---|
accountId | String | Yes | Unique ID generated for the customer |
phone | String | Yes | Phone number of the customer |
String | Yes | Email ID of the customer | |
includeLoyalty | Boolean | Yes | Flag to indicate to return loyalty information |
Error messages
Error Code | Error Message |
---|---|
1005 | Data Not Found |
EXAMPLE REQUEST:
GET http://[subdomain].datanuum.com/accounts?
accountId=f64f2940&phone=971520000000&includeLoyalty=true
EXAMPLE RESPONSE:
{
"profile": {
"phone": 971520000000,
"email": "john@email.com",
"accountId": "f64f2940",
"first": "John",
"last": "Samuel",
"birthdate": "1988-06-06",
"gender": "M",
"city": null,
"country": null,
"nationality": "India",
"language": null,
"businessFields": {
"title": "Mr.",
"maritalStatus": "Married",
"ethnicity": "Asian"
}
},
"loyalty" : {
"program" : {
"name" : "Loyalty Program Name",
"logo" : "URL path to image.jpg"
},
"tier" : {
"name" : "Loyalty tier name",
"logo" : "URL path to image.jpg",
"order" : 3,
"expiry" : "2019-09-09 00:00:00",
"benefits": "Provide the description of the benefits provided"
},
"wallets" : [{
"countryIso" : "AE",
"countryName": null,
"currency" : "AED",
"point" : 1575,
"value" : 15.75
}],
"redeemable": [
{
"countryIso": "AE",
"countryName": null,
"currency": "AED",
"point": 1000,
"value": 10,
}
],
"expiry": {
"point": 256,
"date": "2018-07-03"
},
"toNextTier": 200,
"cumulativeCredit": 12366.27,
"balanceDetails": [
{
"loyaltyPointsGained": 2345,
"loyaltyPointsRedeemed": 0,
"loyaltyPointsExpired": 0,
"expires": "2018-12-31 00:00:00UTC"
},
{
"loyaltyPointsGained": 142,
"loyaltyPointsRedeemed": 0,
"loyaltyPointsExpired": 0,
"expires": "2020-10-15 00:00:00 UTC"
}
]
}