Sign in

Reward Balances By Person

GET https://{organization}.myguper.com/api/loyalty/report/rewardBalances/person/{person}

Returns the consolidated loyalty balance of a single customer, summing all of the customer's cards with no date window. This is the canonical endpoint to read a customer's current balance — use the available field as the amount ready to redeem.

This is a GET and takes no request body. The only input is the person (customer) id in the path.

Monetary wallets return values in cents (divide by 100 to get the amount in the org currency). Point wallets (rewardType: point) return the point quantity.

Response fields

Field Type Description
total int Everything ever credited to the customer (sum of all credits, historical)
available int Balance available to redeem right now (cards not expired and not canceled)
expired int Balance that expired without being redeemed
canceled int Balance on canceled cards
used int Balance already redeemed
byWallet object Same metrics broken down per wallet (policy), keyed by wallet id
byWallet[id].name string Wallet name
byWallet[id].rewardType string monetary or point

Try-it values populated from environment ACME (Demo)


Authentication

Token

Send your user token in the x-guper-authorization header. Endpoints that support a Public mode (e.g. acúmulo and resgate previews) accept the same request without the header — Private mode adds customer data and a confirmation token to the response.

Headers

Name Type Description
x-guper-authorization * string User token issued by Guper. Omit only on endpoints that explicitly support a Public mode.
Content-Type * string Always `application/json` for endpoints that accept a JSON body.

Path parameters

Name Type Description
person * number Customer (person) id in Guper

Responses

{
    "total": 306943,
    "available": 111541,
    "expired": 88938,
    "canceled": 0,
    "used": 106464,
    "byWallet": {
        "12": {
            "name": "Cashback",
            "rewardType": "monetary",
            "total": 306943,
            "available": 111541,
            "expired": 88938,
            "canceled": 0,
            "used": 106464
        }
    }
}
Copied to clipboard