Skip to content

Analytics

lsambridge edited this page Mar 25, 2025 · 5 revisions

/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.

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

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"
    }
  ],
  "impressions": [
    {
      "title": "Promotional Banner",
      "total": 2500,
      "type": "banner",
      "brand": "BrandName"
    },
    {
      "title": "Rewards Catalog",
      "total": 1200,
      "type": "catalog",
      "brand": "BrandName"
    }
  ]
}

Field Definitions

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

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

Clone this wiki locally