Get Historical Points

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

Use the v2/getHistoricalPoints POST API is used to retrieve historical loyalty points activity for a specific customer.

This API reads from the Historical Points Log and returns imported points entries, such as:

  • Points earned (CREDIT)
  • Points redeemed (DEBIT)
  • Event date
  • Points activity (Earned/Burned, etc)
  • Bill number

The API supports filtering by:

  • Date range
  • Transaction type (CREDIT or DEBIT)
  • Bill number
  • No filter (retrieve all records)
📘

Notes

  • Use pagination to control the number of records returned per request.
  • This API is read-only. It does not calculate points or modify balances. It only returns data previously imported into the system.
  • If no historical data exists for the customer, the API returns an empty array.

BusinessCase: Display six-month loyalty ledger

The business requires the loyalty application to display a customer’s ledger for the last six months from the current date.

The system must maintain and retrieve 180 days of historical ledger entries to support this rolling six-month view.

The ledger view must present consistent data across web and mobile channels.

Prerequisites

  • Historical points data must be imported for your organization. If no historical points have been imported, the API returns an empty array.
  • Configure historical points import using the Data Import Framework. The "Historical points import" profile is available under the Customer entity. Access Settings > Master Data Management > Data Import and select the appropriate profile.
📘

Note

This API is for organizations migrating customers from an external or legacy loyalty program to Capillary. The data reflects points activity (credits and debits) imported from the source system.

Example request

curl --location 'https://eu.intouch.capillarytech.com/v2/historicalPoints/getHistoricalPoints/564582355' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bmVZhNGNjZGMzMzQzMWVmOWFjOQ==' \
--data '{
    "filter":{
        "filterType":"DATE", 
        "filterValues":[
       "2024-06-30T00:00:00+05:30",
  "2024-07-02T00:00:00+05:30"
]
         
    },
    "pageDetails":{
            "offset":0,
            "limit": 10
        }
    
        
}'
curl --location 'https://eu.intouch.capillarytech.com/v2/historicalPoints/getHistoricalPoints/564582355' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic mOWFjOQ==' \
--data '{
    "filter":{
        "filterType":"NONE"
        
    },
    "pageDetails":{
            "offset":0,
            "limit": 10
        }
    
            
}'
curl --location 'https://eu.intouch.capillarytech.com/v2/historicalPoints/getHistoricalPoints/564582355' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bmVlcmFqLmZhNGNjZGMzMzQzMWVmOWFjOQ==' \
--data '{
    "filter":{
        "filterType":"BILL_NUMBER", 
        "filterValues":[
       "BILL240302"
]
         
    },
    "pageDetails":{
            "offset":0,
            "limit": 10
        }
    
        
}'

Path parameters

ParameterTypeRequiredDescription
Customer IDIntegerYesUnique identifier of the customer whose historical points data you want to retrieve.

Body parameters

🚧

These are query parameters but defined in the body section of the API.

ParameterTypeRequiredDescription
filterobjectYesFilter criteria for narrowing down results.
.filterTypestringYesType of filter to apply. Supported values: TRANSACTION_TYPE, DATE, BILL_NUMBER, NONE. Any of the filters is mandatory.
.filterValuesarrayYesList of values to filter by. Pass empty array [] when filterType is NONE.
pageDetailsobjectYesPagination settings.
.offsetintegerOptionalNumber of records to skip. The count starts from 0.
.limitintegerYesMaximum number of records to return per page.

Filter types

Filter TypeDescriptionExample filterValues
TRANSACTION_TYPEFilters by the type of points transaction (credit or debit).["CREDIT"] or ["DEBIT"]
DATEFilters by event timestamp in an inclusive time range (start and end both inclusive). Requires two ISO‑8601 date‑time values with timezone.`["2024-07-01T00:00:00+05:30", "2024-07-02T00:00:00+05:30"]
BILL_NUMBERFilters by bill number. If multiple bill numbers are provided, only the first bill number is considered.["BILL12345"]
NONEReturns all historical points without filtering.[]

Example response

{
    "orgId": 50224,
    "customerId": 348918999,
    "historicalPointsData": [
        {
            "entryType": "DEBIT",
            "points": 20.00000,
            "pointsActivity": "null",
            "loyaltyProgramName": "null",
            "billNumber": "538579470",
            "eventDate": "2026-01-12 00:00:00",
            "externalUniqueId": "test3"
        }
    ],
    "warnings": []
}

Response parameters

ParameterDatatypeDescription
-orgIdintegerOrganization ID.
-customerIdintegerUnique identifier of the customer.
-historicalPointsDataarrayList of historical points entries.
--entryTypestringType of points transaction: CREDIT (points earned) or DEBIT (points redeemed).
--pointsdecimalNumber of points for this entry.
--pointsActivitystringDescription of the points activity from the legacy system.
--billNumberstringBill or transaction reference number.
--eventDatestringDate when the points activity occurred in the source system in the format you imported the data. Ex- yyyy-MM-dd HH:mm:ss format.
externalUniqueIdstringExternal unique ID of the customer provided during the import.
warningsarrayList of warning messages.
errorsarrayList of error messages.

API specific error code

Error CodeDescriptionReason
8015Customer not found for the given identifiersInvalid or missing customerId.
Path Params
string
required
Body Params
filter
object
pageDetails
object
Headers
string
required
Defaults to Basic dGlsbGh1aHU6MjAyY2I5NjJhYzU5MDc1Yjk2NGIwNzE1MmQyMzRi
Response

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