Purpose
Retrieve a customer's loyalty wallet by returning their cash balance, points balance, and expiration details.
During the initial integration phase, you specify which unique identifier your system uses for customers. Deliverect sends that identifier as a request parameter when it retrieves an individual customer record.
Accepted unique identifiers are:
- Phone number in E.164 international format
- Provider Id
For example, if the unique customer identifier is email, the request url will be sent as: http://yourwebhook.com/customer/wallet?email=john.doe%40email.com
For phone number as unique identifier, the request request url will be sent as:
http://yourwebhook.com/customer/wallet?phoneNumber=%2B32111111111
For your own provider ID, the request url wil be sent as:
http://yourwebhook.com/customer/wallet?providerId=%partner-customer-id-123
Note: All request parameters are URL encoded.
If the customer does not exist in your platform, return a 404 status code.
URL Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Yes if used as unique identifier | This parameter will always be sent if your integration uses the email as a unique identifier |
phoneNumber | string | Yes if used as unique identifier | This parameter will always be sent if your integration uses the phone number as a unique identifier. (E.164 international standard) |
providerId | string | Yes | This parameter is the customer's identifier in your integration |
accountId | string | Yes | The merchant's account ID in Deliverect |
loyaltyProfileId | string | Yes | The Id of the profile where the response configuration was stored |
locationId | string | No | The location ID related to the merchant's account in Deliverect |
channelLinkId | string | No | The channel link ID related to the location of the merchant's account in Deliverect |
Return at least one wallet object: cash or points.
Response
| Customer Wallet Attributes | Type | Required | Description |
|---|---|---|---|
cash | Object | Yes | See cash object description below. |
points | Object | Yes | See points object description below. |
| Cash Attributes | Type | Required | Description |
|---|---|---|---|
balanceAmount | integer | No (defaults to zero) | Cash balance that the customer uses to redeem programs. It should be sent as an integer with 2 decimal digits e.g. 1 dollar would be sent as 100. |
expirations | list[Object] | No (defaults to empty array) | See expirations object description below. |
| Cash Expirations Attributes | Type | Required | Description |
|---|---|---|---|
amount | integer | Yes if your integration uses cash to redeem programs | Amount of cash balance to expire according to the date. |
date | date | Yes if your integration uses cash to redeem programs | Expiration date of the amount to be expired. |
| Points Attributes | Type | Required | Description |
|---|---|---|---|
balance | float | No (defaults to zero) | Cash balance that the customer uses to redeem programs. |
expirations | list[Object] | No (defaults to empty array) | See expirations object description below. |
| Points Expirations Attributes | Type | Required | Description |
|---|---|---|---|
amount | float | Yes if your integration uses points to redeem programs | Amount of points balance to expire according to the date. |
date | date | Yes if your integration uses points to redeem programs | Expiration date of the amount to be expired. |
Example response
{
"cash": {
"balanceAmount": 1054,
"expirations": [
{
"amount": 54,
"date": "2030-01-01"
}
]
},
"points": {
"balance": 40.5,
"expirations": [
{
"amount": 5.5,
"date": "2030-01-01"
}
]
}
}