Skip to content

Analytics

lsambridge edited this page Mar 25, 2025 · 5 revisions

Analytics /v2/meta/ Endpoint Documentation

Overview

The Meta API endpoint provides access to analytical data about rewards usage for a partner within a specified date range. This endpoint requires authentication and returns structured metadata and analytics specific to the authenticated partner's rewards program usage, including login counts, reward activities, and impression data.

Endpoint Details

URL: /v2/meta/
Method: GET
Authentication: Required (JWT Bearer Token)
Authorization: Required

Request Parameters

Parameter Type Required Description
fromDate DateTime Yes The start date of the range to retrieve metadata
toDate DateTime Yes The end date of the range to retrieve metadata

Data Collected

The endpoint aggregates the following data points:

  1. Total Logins: Number of user logins within the specified date range for the partner
  2. Reward Activities: Tracked user interactions with rewards, grouped by reward title and type
  3. Impressions: Data on how many times rewards have been displayed or viewed

Responses

Success Response

Code: 200 OK
Content Type: application/json
Response Body: MetaDataResponse object

The response contains analytics data about rewards usage including:

{
  "totalLogins": 1234,
  "activities": [
    {
      "title": "Reward Redemption",
      "total": 85,
      "type": "redemption",
      "uniqueUsers": 42,
      "brand": "BrandName"
    },
    {
      "title": "Points Earned",
      "total": 156,
      "type": "earning",
      "uniqueUsers": 65,
      "brand": "BrandName"
    },
    {
      "title": "Rewards Catalog",
      "total": 1200,
      "type": "view",
      "brand": "BrandName"
    },
    {
      "title": "Featured Reward",
      "total": 350,
      "type": "click",
      "brand": "BrandName"
    }
  ],
  "impressions": [
    {
      "title": "Promotional Banner",
      "total": 2500,
      "type": "impression",
      "brand": "BrandName"
    },
    
  ]
}

Field Definitions

Field Type Description
totalLogins integer The total number of user logins in the date range for the partner
activities array List of reward activities that occurred in the date range
activities.title string The name/title of the reward associated with the activity
activities.total integer The total count of this activity type for the reward
activities.type string The category or type of activity (from TrackingActivities table)
activities.uniqueUsers integer Number of distinct users who performed this activity
activities.brand string The brand name associated with the reward
impressions array List of impressions (views) of reward-related content
impressions.title string The title of the reward
impressions.total integer The total number of impressions for this reward
impressions.type string The impression type - one of: "impression", "view", or "click"
impressions.brand string The brand name associated with the reward

Error Responses

Code: 404 Not Found
Conditions: When either fromDate or toDate parameters are not provided
Content Type: application/json
Response Body: BaseHttpResult object

Example:

{
  "resultDetails": "No From Date Supplied",
  "result": "400- NOT OK"
}

OR

{
  "resultDetails": "No To Date Supplied",
  "result": "400- NOT OK"
}

Security

  • This endpoint requires a valid JWT Bearer token for authentication
  • The endpoint is protected with authorization requirements
  • The user's partner ID is extracted from the token and used to scope the data

Telemetry and Auditing

  • All calls to this endpoint are tracked for telemetry purposes
  • All calls are logged in the audit system, including request details and response status

Related Endpoints

  • /v2/meta/OrgUnitLevels (GET) - Retrieves organization unit levels for the authenticated partner
  • /v2/meta/OrgUnitLevels (POST) - Saves organization unit levels for the authenticated partner
  • /v2/meta/OrgUnitLevels (PATCH) - Updates organization unit levels for the authenticated partner

Clone this wiki locally