Authorization header:customerSuccess permission. Missing, invalid, expired, or under-permissioned keys currently return HTTP 401.page is 1-based and defaults to 1.limit defaults to 100 and cannot exceed 500.from and to are optional ISO 8601 date-times. They filter by the client's community membership join timestamp, inclusively.client_id.data.pagination until page reaches totalPages. An empty result is successful and returns HTTP 200 with data.data: [].| Field | Meaning |
|---|---|
client_id | Internal Returning.AI member ID represented as a string; unchanged. |
hashed_client_id | Optional current external identifier from the community's active custom client_id text field; omitted when unavailable. |
email | Client email when available. Treat as personal data. |
current_xp_balance | Current XP balance. |
current_coin_balance | Current loyalty coin balance. |
lifetime_coins_redeemed | Lifetime number of coins redeemed through the Returning.AI store. |
roles | Community role titles currently resolved for the client. |
login_count | Count of recorded daily loyalty visits. |
first_loyalty_login | Community membership join timestamp used by from and to; may be null. |
last_loyalty_login | Most recent recorded application login timestamp; may be null. |
hashed_client_id is an optional string on each row in data.data. It contains the existing external identifier from the community's active custom client_id single-line-text field. Returning.AI does not compute a new hash and does not relabel another custom identifier field.hashed_client_id is omitted rather than returned as null or an empty string. Treat the value as an opaque identifier; do not assume a particular hash algorithm, length, or format.client_id as the internal Returning.AI member ID represented as a string. User logs retain their existing fields and do not introduce an internal client_id where none was previously present.400: Fix invalid pagination or date-time query values. page must be at least 1; limit must be between 1 and 500.401: Check that the Bearer key is present, valid, active, scoped to the correct community, and has customerSuccess permission. Do not retry unchanged credentials repeatedly.429: The community request limit was exceeded. Inspect the RateLimit response header and retry after the indicated window resets.500: Retry with bounded backoff. If the error persists, contact Returning.AI support with the request time and non-sensitive request details.from and to filter the community membership join timestamp, not the last login or redemption date.from is later than to currently returns an empty successful result; validate the range in your client.curl --location 'https://api.returning.ai/v1/community-analytics/loyalty-overview?page=1&limit=100&from=2026-01-01T00%3A00%3A00.000Z&to=2026-01-31T23%3A59%3A59.999Z' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "Loyalty overview fetched successfully",
"data": {
"data": [
{
"client_id": "123456",
"email": "client@example.com",
"current_xp_balance": 2450.5,
"current_coin_balance": 380.25,
"lifetime_coins_redeemed": 1250,
"roles": [
"Client"
],
"login_count": 42,
"first_loyalty_login": "2026-01-05T08:30:00.000Z",
"last_loyalty_login": "2026-08-16T14:22:10.000Z",
"hashed_client_id": "external-client-hash"
}
],
"pagination": {
"total": 224,
"page": 1,
"limit": 100,
"totalPages": 3
}
}
}