Get target events

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

This API is being phased out and will no longer be available for viewing milestones.

To view milestones, use the Get Details of all Loyalty Promotions API


This API fetches the events that are associated with a target or streak for a customer. Enter a userId (customer Id) and the targetRuleId of the target the customer is enrolled in to fetch the data of the customer events (behavioural and non-behavioural).

👍

Note

For detailed information about the APIs and for hands-on testing, refer to the API overview documentation and step-by-step guide on making your first API call.

Prerequisites

  • Authentication: Basic/OAuth authentication
  • Default access group

Resource Information

URI/users/USERID/trackedTargetEvents/{targetRuleId}
HTTP methodGET
PaginationYes. Sorting is not supported. Results are displayed in chronological order.
Rate limitNA
Batch supportNA

API cURL example

curl --location 'https://eu.api.capillarytech.com/v3/users/564332013/trackedTargetEvents/1986?periodId=9889&limit=5&offset=0' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic bmFtYW5fZG9jOmEzY2I2MmEy' \
--header 'Cookie: _cfuvid=zcU0pObn4E.A.gGF79a_o-1737693237027-0.0.1.1-604800000'

Path parameters

Parameter NameData TypeDescription
userIdLongUnique ID of the customer.
targetRuleIdLongUnique ID of the target rule.

Use the Get associated target groups of a user API to fetch the targetRuleId for a customer enrolled in a milestone target. |

Query parameters

Parameter NameData TypeDescription
periodIdLongUnique ID of the target period. Provide a periodId to filter events for a specific time period / target cycle within the target.

Use the Get target periods API and use the targetGroupId of the target to fetch the periodId for a customer enrolled in a milestone / target.
limitIntegerNumber of events to display per page. For example, if the total events are 15 and the limit is 5, the first page will display the first 5 events.
offsetIntegerPage number to retrieve. To view the first page, set the value to 0.
periodIdLongUnique ID of the target period. Provide a periodId to filter events for a specific time period target cycle within the target.

Response parameters

ParameterDescription
paginationObject containing details of the page.
.limitNumber of events displayed on the page.
.offsetCurrent page number.
.totalTotal number of pages.
dataObject containing details of the events.
.eventLogIdUnique ID of the event that is triggered.
.eventNameName of the event. Possible values: GENERIC_EVENT, ADD_TRANSACTION, RETURN_BILL, ENROL, UNENROL
.customerIdUnique ID of the customer who triggered the event.
.eventDisplayNameUnique name of the behavioral event that is triggered. null for transactional events.
.uniqueIdUnique ID of the event. Behavioral: requestId. Non-behavioral: eventSubjectId.
.eventDateDate when the event is triggered in ISO 8601 format.
Note: This field will be deprecated in the future and is being replaced by eventDateISO.
.eventDateISO

Indicates the creation date and time of the event in ISO 8601 format, returned in the server time zone.

EU server example
2025-12-16T14:30:45Z → 16 December 2025, 14:30:45 (UTC)

India server example
2025-12-16T14:30:45+05:30 → 16 December 2025, 14:30:45 (IST)

Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.

.eventProcessedDateDate when the event is processed ISO 8601 format.
Note: This field will be deprecated in the future and is being replaced by eventProcessedDateISO.
.eventProcessedDateISO

Indicates the creation date and time when the event was processed in ISO 8601 format, returned in the server time zone.

EU server example
2025-12-16T14:30:45Z → 16 December 2025, 14:30:45 (UTC)

India server example
2025-12-16T14:30:45+05:30 → 16 December 2025, 14:30:45 (IST)

Note: The response time zone always matches the server time zone, regardless of the time zone offset in the request.

.periodIdUnique ID of the target period.
.targetGroupIdUnique ID of the target group.
.targetRuleIdUnique ID of the target rule.
.targetValueTotal transaction amount for transactional events; always 1.000 for behavioral events.
errorsObject containing errors, if any.
warningsObject containing warnings, if any.
{
  "pagination": {
    "limit": 10,
    "offset": 0,
    "total": 4
  },
  "data": [
    {
      "eventLogId": -1,
      "eventName": "ENROL",
      "customerId": 564709342,
      "eventDisplayName": null,
      "uniqueId": null,
      "eventDate": null,
      "eventProcessedDate": null,
      "eventDateISO": null,
      "eventProcessedDateISO": null,
      "periodId": 29318,
      "targetGroupId": 2514,
      "targetRuleId": 2711,
      "targetValue": 999
    },
    {
      "eventLogId": 636678134,
      "eventName": "ADD_TRANSACTION",
      "customerId": 564709342,
      "eventDisplayName": null,
      "uniqueId": "889282751",
      "eventDate": "2025-07-29 04:00:00.0",
      "eventProcessedDate": "2025-07-29 04:00:00.0",
      "eventDateISO": "2025-07-29T04:00:00Z",
      "eventProcessedDateISO": "2025-07-29T04:00:00Z",
      "periodId": 29324,
      "targetGroupId": 2514,
      "targetRuleId": 2711,
      "targetValue": 20
    },
    {
      "eventLogId": 636678182,
      "eventName": "ADD_TRANSACTION",
      "customerId": 564709342,
      "eventDisplayName": null,
      "uniqueId": "889282761",
      "eventDate": "2025-07-29 04:00:00.0",
      "eventProcessedDate": "2025-07-29 04:00:00.0",
      "eventDateISO": "2025-07-29T04:00:00Z",
      "eventProcessedDateISO": "2025-07-29T04:00:00Z",
      "periodId": 29324,
      "targetGroupId": 2514,
      "targetRuleId": 2711,
      "targetValue": 20
    },
    {
      "eventLogId": 636678190,
      "eventName": "ADD_TRANSACTION",
      "customerId": 564709342,
      "eventDisplayName": null,
      "uniqueId": "889282764",
      "eventDate": "2025-07-29 04:00:00.0",
      "eventProcessedDate": "2025-07-29 04:00:00.0",
      "eventDateISO": "2025-07-29T04:00:00Z",
      "eventProcessedDateISO": "2025-07-29T04:00:00Z",
      "periodId": 29324,
      "targetGroupId": 2514,
      "targetRuleId": 2711,
      "targetValue": 1959
    }
  ],
  "errors": [],
  "warnings": []
}
{
    "pagination": {
        "limit": 1,
        "offset": 0,
        "total": 2
    },
    "data": [
        {
            "eventLogId": 31748158,
            "eventName": "GENERIC_EVENT",
            "customerId": 387544807,
            "eventDisplayName": "testBehavioural",
            "uniqueId": "6621dee9-6c2a-43ad-aa41-be2bf138de04",
            "eventDate": "2024-12-05 00:00:00.0",
            "eventProcessedDate": "2024-12-12 18:42:52.0",
            "periodId": 77865,
            "targetGroupId": 52065,
            "targetRuleId": 79192,
            "targetValue": 1.000
        }
    ],
    "errors": [],
    "warnings": []
}
{
    "pagination": {
        "limit": 30,
        "offset": 0,
        "total": 2
    },
    "data": [
        {
            "eventLogId": 615460983,
            "eventName": "ADD_TRANSACTION",
            "customerId": 564332013,
            "eventDisplayName": null,
            "uniqueId": "881101809",
            "eventDate": "2025-01-22 14:00:00.0",
            "eventProcessedDate": "2025-01-22 14:00:00.0",
            "periodId": 9889,
            "targetGroupId": 1717,
            "targetRuleId": 1986,
            "targetValue": 1000
        },
        {
            "eventLogId": 615461137,
            "eventName": "ADD_TRANSACTION",
            "customerId": 564332013,
            "eventDisplayName": null,
            "uniqueId": "881101873",
            "eventDate": "2025-01-22 14:00:00.0",
            "eventProcessedDate": "2025-01-22 14:00:00.0",
            "periodId": 9889,
            "targetGroupId": 1717,
            "targetRuleId": 1986,
            "targetValue": 1000
        }
    ],
    "errors": [],
    "warnings": []
}

API error codes

Error CodeDescriptionReason
310019Target period not foundperiodId is incorrect or invalid.
310018Target rule not foundruleId is incorrect or invalid.
310011Invalid userIduserId is incorrect or invalid.
310149No record found in user target for given UserId and TargetIdNo events are recorded for the user.
Path Params
int64
required
int64
required
Query Params
int64
int32
Defaults to 10
int32
Defaults to 0
Response

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