younifyd
Menu

Get Dashboard Statistics

Get statistics for loyalty dashboard

GET/v1/loyalty_programs/{loyaltyProgramId}/dashboard

Use it in a workflow

  1. Add a step and choose the Talon.One connector.
  2. Pick the Get Dashboard Statistics action (under management).
  3. Fill in the fields below, then reference the result from later steps as {{getDashboardStatistics.response.data}}.

Request

Path parameters

loyaltyProgramIdinteger (int64)required

Identifier of the loyalty program. You can get the ID with the [List loyalty programs](https://docs.talon.one/management-api#tag/Loyalty/operation/getLoyaltyPrograms) 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

Returns 200 with an object. Read it in later steps with {{getDashboardStatistics.response.data.<field>}}.

totalResultSizeinteger (int64)
dataarray<object>
datestring (date-time)required

Date at which data point was collected.

totalActivePointsnumberrequired

Total of active points for this loyalty program.

totalPendingPointsnumberrequired

Total of pending points for this loyalty program.

totalSpentPointsnumberrequired

Total of spent points for this loyalty program.

totalExpiredPointsnumberrequired

Total of expired points for this loyalty program.

totalNegativePointsnumberrequired

Total of negative points for this loyalty program.

totalMembersnumberrequired

Number of loyalty program members.

newMembersnumberrequired

Number of members who joined on this day.

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

Need more? See the Talon.One guide for connection setup and behaviour shared by every action.