Herald
OpenapiPoints

Points consumption statistics for the admin statistics page.

Requires the `points.view` permission. Consumption is attributed to the transaction's creation day.

GET
/api/points/stats/consumption

Requires the points.view permission. Consumption is attributed to the transaction's creation day.

Authorization

bearer_auth
headerAuthorizationBearer <token>

Query Parameters

days?|

Statistics window in days; only 7 or 30 are accepted. Defaults to 7.

Formatint32

Response Body

Points consumption statistics for the requested window

application/json
  1. response

Points consumption statistics over a fixed window, measured from consume transactions only — revoked/reclaimed points never offset these figures.

buckets*array<>
consumingUsers*integer
Formatint64
consumptionTrend*array<>
totalConsumedPoints*integer
Formatint64
windowDays*integer
Formatint32
Example Request
curl -X GET 'https://example.com/api/points/stats/consumption'
Example Response
{
  "buckets": [
    {
      "bucketId": "1980377d-7926-47e0-9e64-a9d0c746404d",
      "bucketKey": "string",
      "bucketName": "string",
      "consumedPoints": 0
    }
  ],
  "consumingUsers": 0,
  "consumptionTrend": [
    {
      "consumedPoints": 0,
      "date": "string"
    }
  ],
  "totalConsumedPoints": 0,
  "windowDays": 0
}