Loyalty

Get statistics for loyalty dashboard

[!note] Management API endpoints are not meant to be used in real-time integrations that directly serve your end users. Rate limit: 3 requests per second.

Retrieve the statistics displayed on the specified loyalty program's dashboard, such as the total active points, pending points, spent points, and expired points.

[!important] The returned data does not include the current day. All statistics are updated daily at 11:59 PM in the loyalty program time zone.

get/v1/loyalty_programs/{loyaltyProgramId}/dashboard

Request

Path parameters

loyaltyProgramIdinteger required

Identifier of the loyalty program. You can get the ID with the List loyalty programs endpoint.

Query parameters

subledgerIdstring

The ID of the subledger by which we filter the data.

rangeStartstring date-time required

Only return results from after this timestamp.

[!note] Note

  • This must be an RFC3339 timestamp string.
  • You can include a time component in your string, for example, T23:59:59 to specify the end of the day. The time zone setting considered is UTC. If you do not include a time component, a default time value of T00:00:00 (midnight) in UTC is considered.
rangeEndstring date-time required

Only return results from before this timestamp.

[!note] Note

  • This must be an RFC3339 timestamp string.
  • You can include a time component in your string, for example, T23:59:59 to specify the end of the day. The time zone setting considered is UTC. If you do not include a time component, a default time value of T00:00:00 (midnight) in UTC is considered.

Response

OK

totalResultSizeinteger required

Example response

{
  "totalResultSize": 1,
  "data": [
    {
      "totalActivePoints": 9756,
      "totalPendingPoints": 548,
      "totalSpentPoints": 25668,
      "totalExpiredPoints": 1156,
      "totalNegativePoints": 32,
      "totalMembers": 2582,
      "newMembers": 3,
      "spentPoints": {
        "createdManually": 125,
        "createdViaRuleEngine": 9631
      },
      "earnedPoints": {
        "createdManually": 125,
        "createdViaRuleEngine": 9631
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.