Get historical points

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Retrieve historical loyalty points activity imported from an external or legacy loyalty program for a specific customer. The API reads from the historical points log and returns imported entries such as points earned, points redeemed, event dates, and bill numbers.

This API is read-only. It doesn't calculate points or modify balances. If no historical data has been imported for the customer, the API returns an empty array.

Note: This API is for organizations migrating customers from an external or legacy loyalty program. The data reflects points activity imported from the source system, not points earned through the current loyalty program.

Example request

curl -X POST "https://{host}/v2/historicalPoints/getHistoricalPoints/<CUSTOMER_ID>" \
  -H "Authorization: Basic <YOUR_AUTH_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "filterType": "NONE",
      "filterValues": []
    },
    "pageDetails": {
      "offset": 0,
      "limit": 10
    }
  }'
curl -X POST "https://{host}/v2/historicalPoints/getHistoricalPoints/<CUSTOMER_ID>" \
  -H "Authorization: Basic <YOUR_AUTH_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "filterType": "DATE",
      "filterValues": ["2026-01-01T00:00:00+05:30", "2026-12-31T23:59:59+05:30"]
    },
    "pageDetails": {
      "offset": 0,
      "limit": 10
    }
  }'
curl -X POST "https://{host}/v2/historicalPoints/getHistoricalPoints/<CUSTOMER_ID>" \
  -H "Authorization: Basic <YOUR_AUTH_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "filterType": "PROGRAM_ID",
      "filterValues": ["<PROGRAM_ID>"]
    },
    "pageDetails": {
      "offset": 0,
      "limit": 10
    }
  }'
curl -X POST "https://{host}/v2/historicalPoints/getHistoricalPoints/<CUSTOMER_ID>" \
  -H "Authorization: Basic <YOUR_AUTH_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "filter": {
      "filterType": "POINTS_ACTIVITY",
      "filterValues": ["EARNED"]
    },
    "pageDetails": {
      "offset": 0,
      "limit": 10
    }
  }'

Prerequisites

  • Historical points data must be imported for your organization before this API returns results. If no historical points have been imported, the API returns an empty array.
  • To import historical points, go to Settings > Master Data Management > Data Import and use the Historical points import profile under the Customer entity.

Path parameters

FieldTypeRequiredDescription
customerIdintegerRequiredThe internal customer ID of the customer whose historical points you want to retrieve. Returned by the Add Customer or Get Customer APIs.

Body parameters

FieldTypeRequiredDescription
filterobjectRequiredObject containing the filter criteria for the request.
.filterTypeenumRequiredThe filter to apply. Must be one of: NONE, DATE, TRANSACTION_TYPE, BILL_NUMBER, LOYALTY_PROGRAM_NAME, POINTS_ACTIVITY, PROGRAM_ID. Case-sensitive. See Filter types for details.
.filterValuesarrayRequiredList of values for the selected filter. Pass an empty array [] when filterType is NONE. See Filter types for the required format per filter.
pageDetailsobjectRequiredObject containing pagination settings.
.offsetintegerOptionalNumber of records to skip. Defaults to 0.
.limitintegerRequiredMaximum number of records to return per page.

Filter types

Filter typeDescriptionRequired filterValues format
NONEReturns all historical points records without filtering.Empty array []
DATEFilters by event date range (inclusive on both ends).Two ISO 8601 timestamps with timezone offset: ["2026-01-01T00:00:00+05:30", "2026-12-31T23:59:59+05:30"]. Plain dates (2026-01-01) and space-separated formats (2026-01-01 00:00:00) are not accepted.
TRANSACTION_TYPEFilters by the type of points transaction.One or more values: ["CREDIT"] or ["DEBIT"]
BILL_NUMBERFilters by bill number. When multiple values are provided, only the first value is used.One or more bill number strings: ["BILL-12345"]
LOYALTY_PROGRAM_NAMEFilters by the name of the loyalty program in the source system.One or more program name strings: ["Legacy Loyalty Program"]
POINTS_ACTIVITYFilters by the points activity label from the source system (for example, EARNED or REDEEMED).One or more activity label strings: ["EARNED"]
PROGRAM_IDFilters by loyalty program ID.A single numeric value as a string: ["973"]. Non-integer values return error 2204.

Example response

{
  "orgId": "<ORG_ID>",
  "customerId": "<CUSTOMER_ID>",
  "historicalPointsData": [
    {
      "entryType": "CREDIT",
      "points": 100.00000,
      "pointsActivity": "EARNED",
      "loyaltyProgramName": "Legacy Loyalty Program",
      "billNumber": "BILL-1001",
      "eventDate": "2026-01-12 00:00:00",
      "externalUniqueId": "<EXTERNAL_ID>",
      "programId": "<PROGRAM_ID>"
    },
    {
      "entryType": "DEBIT",
      "points": 20.00000,
      "pointsActivity": "REDEEMED",
      "loyaltyProgramName": "Legacy Loyalty Program",
      "billNumber": "BILL-1002",
      "eventDate": "2026-01-12 00:00:00",
      "externalUniqueId": "<EXTERNAL_ID>",
      "programId": "<PROGRAM_ID>"
    }
  ],
  "warnings": []
}

Response parameters

FieldTypeDescription
orgIdintegerID of the organization.
customerIdintegerInternal ID of the customer.
historicalPointsDataarrayList of historical points entries for the customer. Empty array if no data has been imported.
.entryTypestringPossible values: CREDIT (points earned), DEBIT (points redeemed).
.pointsdecimalNumber of points for this entry.
.pointsActivitystringPoints activity label from the source system (for example, EARNED or REDEEMED). The value is whatever was set during import.
.loyaltyProgramNamestringName of the loyalty program in the source system. The value is whatever was set during import.
.billNumberstringBill or transaction reference number from the source system.
.eventDatestringDate when the points activity occurred in the source system, in yyyy-MM-dd HH:mm:ss format.
.externalUniqueIdstringUnique identifier assigned to this record during import, from the source system.
.programIdintegerID of the loyalty program this record is associated with. Returns -1 if no program ID was set during import.
warningsarrayList of warning messages. Empty array if there are no warnings.
errorsarrayList of error objects. Present only when an error occurs.

Error & warning codes

CodeError numberTypeDescription
CUSTOMER_NOT_FOUND8015ErrorNo customer was found for the provided customerId. HTTP 200.
ERR_HISTORICAL_POINTS_FETCH_FAILED2204ErrorFailed to fetch historical points. This occurs when filterValues are invalid, for example a non-integer value for PROGRAM_ID, or a date string that isn't in ISO 8601 format with a timezone offset for DATE. HTTP 200.
400ErrorThe request body is missing a required field. Returned when filter or pageDetails is omitted entirely.
401ErrorAuthentication failed. Check your Authorization header.
Path Params
string
required
Body Params
filter
object
required
pageDetails
object
required
Headers
string
string
Responses

400

Missing required field in the request body.

401

Authentication failed. Check the Authorization header.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json