Get Loyalty Customer Wallet

Purpose

Retrieve a customer's loyalty wallet by returning either their cash or points balance along with any expiration details.

Format

A Loyalty platform can specify the unique identifier used in their system to identify customers. Deliverect will send that identifier as a request parameter on the provided endpoint. 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

Request Parameters

ParameterDescriptionExample URLFormat
accountIdThe merchant's account ID in DeliverectString
locationIdThe merchant's location ID in DeliverectString
channelLinkIdThe unique Id of the ordering channelString
loyaltyProfileIdUnique Id of the Loyalty platformString
emailCustomer's email address sent if your integration uses the email as a unique identifierhttp://yourwebhook.com/customer/wallet?email=john.doe%40email.comString
phoneNumberCustomer's phone number in E.164 international format sent if your integration uses the phone number as a unique identifier.http://yourwebhook.com/customer/wallet?phoneNumber=%2B32111111111String
providerIdUnique customer identifier known to the loyalty providerhttp://yourwebhook.com/customer/wallet?providerId=%partner-customer-id-123String

All request parameters are URL encoded.

Response Body

The loyalty provider must return the customer’s available balance, including loyalty points and optionally, wallet cash. This enables Deliverect Direct channels and Kiosk, as well as external partners, to display the customer’s current funds so they can decide how to use their rewards.

{
  "points": {
    "balance": 150,
    "expirations": [
      {
        "amount": 500,
        "date": "YYYY-MM-DD"
      }
    ]
  },
  "cash": {
    "balanceAmount": 1000,
    "expirations": [
      {
        "amount": 150,
        "date": "YYYY-MM-DD"
      }
    ]
  }
}

If the customer does not exist in your platform, return a 404 status code.

Return at least one wallet object: cash or points.

Response

Customer Wallet AttributesTypeRequiredDescription
cashObjectYesSee cash object description below.
pointsObjectYesSee points object description below.

Cash AttributesTypeRequiredDescription
balanceAmountintegerNo (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.
expirationslist[Object]No (defaults to empty array)See expirations object description below.

Cash Expirations AttributesTypeRequiredDescription
amountintegerYes if your integration uses cash to redeem programsAmount of cash balance to expire according to the date.
datedateYes if your integration uses cash to redeem programsExpiration date of the amount to be expired.

Points AttributesTypeRequiredDescription
balancefloatNo (defaults to zero)Cash balance that the customer uses to redeem programs.
expirationslist[Object]No (defaults to empty array)See expirations object description below.
Points Expirations AttributesTypeRequiredDescription
amountfloatYes if your integration uses points to redeem programsAmount of points balance to expire according to the date.
datedateYes if your integration uses points to redeem programsExpiration date of the amount to be expired.
Response

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json