Sign in

Reward Balances

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

Returns the organization-wide loyalty balances aggregated over a date window. Cards are filtered by their creation date (createAt) between dateStart and dateEnd.

This is a GET and takes no request body. Both dates are required path params (YYYY-MM-DD).

To read the current balance of a single customer, use Reward Balances By Person instead — it sums all of the customer's cards with no date window.

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 credited on cards created in the window (sum of all credits)
available int Balance still available to redeem (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
dateStart * string Start of the window, filters cards by createAt (YYYY-MM-DD)
dateEnd * string End of the window, filters cards by createAt (YYYY-MM-DD)

Responses

{
    "total": 1284500,
    "available": 642100,
    "expired": 310200,
    "canceled": 12000,
    "used": 320200,
    "byWallet": {
        "12": {
            "name": "Cashback",
            "rewardType": "monetary",
            "total": 1284500,
            "available": 642100,
            "expired": 310200,
            "canceled": 12000,
            "used": 320200
        }
    }
}
Copied to clipboard