Create target based on Behavioural event

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 creating new milestones.

To create a new milestone, use the Create a Loyalty Promotion API


Behavioral Events Target Group API

Behavioral events track specific user actions (e.g., profile updates, reviews, step counts). Brands reward users upon achieving milestones based on these events.

Behavioral events are a way using which brands track the behavioral properties of their customers. For example:

  1. Whether a user has updated the profile picture?
  2. Whether a user has provided the product review?
  3. Whether a user has walked 5000 steps?

Using the milestones, brands can track these behavioral events and reward their users. For example:

  1. Give 100 points to the user for updating the profile picture 2 times a month.
  2. Give a $1 coupon to the user for giving 3 product reviews in a quarter.
  3. Give a fitness badge to the user for walking 5000 steps in 2 days.
📘

Note

Unlike targets such as QUANTITY, SALES, GROSS_SALES, REGULAR_POINTS, PROMOTIONAL_POINTS,
ALL_POINTS, EXTENDED_FIELD, where the user has to make 3 API calls (target-group, period, and target) to create a single target, the behavioural type of targets can be created using a single call by placing the entire information in the single call itself. It means the definition of all the keys will be the same except for the following:

  1. targetEntity = "Event".
  2. eventName = "name of the behavioral event".
    1. This key will be present in the request body for the behavioural event type of targets.
  3. targetType = "COUNT"/"VISIT"/"EVENT_ATTRIBUTE". Only these 3 are supported.
    1. When the targetType is given as "EVENT_ATTRIBUTE", then:
      1. An "extendedFieldInfo object is applicable that contains 2 parameters:
        1. aggregateFunction: "SUM"
        2. name: Name of the attribute of the behavioral event on which SUM needs to happen.
        3. "targetEntity": "EVENT",
          "eventName": "removedFromCart",
          "targetType": "EVENT_ATTRIBUTE",
          "extendedFieldInfo": {
              "name": "cartId",
              "aggregateFunction": "SUM"}
          "targetEntity": "EVENT",
          "eventName": "removedFromCart",
          "targetType": "COUNT"/"VISIT",
          "extendedFieldInfo": {
              "name": "cartId",
              "aggregateFunction": "SUM"}

👍

Note

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

API endpoint example

Using create target group: https://eu.api.capillarytech.com/v3/targetGroups

Request Body Example

curl -L 'https://eu.api.capillarytech.com/v3/targetGroups' \
-H 'Content-Type: application/json' \
-H 'Cookie: _cfuvid=aidEostKQWmdskBHmh1pchvz2wSoA1O27JghNUFOpHw-1728306311172-0.0.1.1-604800000; _cfuvid=2ieM2eqBqFdNAAdfQMYR0zNvTd6WWmQxVVyU.OyFiEw-1728475108732-0.0.1.1-604800000' \
-H 'Authorization: Basic Dc1NWE3NQ==' \
-d '{
    "active": true,
    "name": "uatTargetGroupBE02",
    "preferredTillId": 75155297,
    "fromDate": "2026-01-01T10:30:00Z",
    "toDate": "2026-01-01T10:30:00Z",
    "targetCycleStartDateISO": "2026-01-01T10:30:00+05:30",
    "targetCycleEndDateISO": "2026-02-01T10:30:00+05:30",
    "trackingType": "DEFAULT",
    "totalPeriods": 2,
    "frequency": 1,
    "recurringCycles": 1,
    "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
    "targetCycleStartDate": "2025-07-17T00:00:00.529Z",
    "periods": [
        {
            "active": true,
            "description": "p1",
            "endDate": "2025-07-18T23:00:00.529Z",
            "periodStatus": "RUNNING",
            "refCode": "Cycle_1",
            "startDate": "2025-07-17T00:00:00.529Z"
        },
        {
            "active": true,
            "description": "p2",
            "endDate": "2025-07-20T00:00:00.529Z",
            "periodStatus": "NOT_STARTED",
            "refCode": "Cycle_2",
            "startDate": "2025-07-19T00:00:00.529Z"
        }
    ],
    "targets": [
        {
            "targetEntity": "EVENT",
            "targetType": "EVENT_ATTRIBUTE",
            "eventName": "TestingEvent_FE",
            "extendedFieldInfo": {
                "name": "Customer",
                "aggregateFunction": "SUM"
            },
            "defaultValues": [
                {
                    "defaultValue": 2
                },
                {
                    "defaultValue": 3
                }
            ],
            "targetMilestoneTriggers": [],
            "expression": "true",
            "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
            "filters": [],
            "name": "uat_target_group_be_02",
            "enrolmentMethod": "TRANSACTION"
        }
    ]
}'
curl -L 'https://eu.api.capillarytech.com/v3/targetGroups' \
-H 'Content-Type: application/json' \
-H 'Cookie: _cfuvid=aidEostKQWmdskBHmh1pchvz2wSoA1O27JghNUFOpHw-1728306311172-0.0.1.1-604800000; _cfuvid=2ieM2eqBqFdNAAdfQMYR0zNvTd6WWmQxVVyU.OyFiEw-1728475108732-0.0.1.1-604800000' \
-H 'Authorization: Basic MmM1ZDc1NWE3NQ==' \
-d '{
    "active": true,
    "name": "uatTargetGroupBE01",
    "preferredTillId": 75155297,
    "fromDate": "2026-01-01T10:30:00Z",
    "toDate": "2026-01-01T10:30:00Z",
    "targetCycleStartDateISO": "2026-01-01T10:30:00+05:30",
    "targetCycleEndDateISO": "2026-02-01T10:30:00+05:30",
    "trackingType": "DEFAULT",
    "totalPeriods": 2,
    "frequency": 1,
    "recurringCycles": 1,
    "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
    "targetCycleStartDate": "2025-07-17T00:00:00.529Z",
    "periods": [
        {
            "active": true,
            "description": "p1",
            "endDate": "2025-07-18T23:00:00.529Z",
            "periodStatus": "RUNNING",
            "refCode": "Cycle_1",
            "startDate": "2025-07-17T00:00:00.529Z"
        },
        {
            "active": true,
            "description": "p2",
            "endDate": "2025-07-20T00:00:00.529Z",
            "periodStatus": "NOT_STARTED",
            "refCode": "Cycle_2",
            "startDate": "2025-07-19T00:00:00.529Z"
        }
    ],
    "targets": [
        {
            "targetEntity": "EVENT",
            "targetType": "COUNT",
            "eventName": "TestingEvent_FE",
            "extendedFieldInfo": {
                "name": "price",
                "aggregateFunction": "SUM"
            },
            "defaultValues": [
                {
                    "defaultValue": 2
                },
                {
                    "defaultValue": 3
                }
            ],
            "targetMilestoneTriggers": [],
            "expression": "true",
            "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
            "filters": [],
            "name": "uat_target_group_be_01",
            "enrolmentMethod": "TRANSACTION"
        }
    ]
}'

Prerequisites

  • Authentication: Basic/OAuth authentication
  • Default access group

Resource information

URIv3/targetGroups
HTTP methodPOST
PaginationNA
Rate limitNA
Batch supportNA

Request body parameters

Parameter NameData TypeDescription
activeBooleanIndicates if the tracking is active or not.
descriptionStringA brief description of the target group.
name*StringThe name identifier for the target group. The character limit for the name is 200 characters.
preferredTillIdNumberIdentifier for a preferred till.
trackingTypeEnumThe type of tracking the milestone is created for. Supported values: - Default (single target tracking),- Unified (tracking multiple targets as a unit),- Streak (Tracking the achievement of a user across the cycles continuously),- Capping (Tracking the number of points a user has got over a period, so that capping can be applied).- Non continuous streak (Non-continuous streaks is a variation of streak, where the user is not required to perform specified activity continously).
targetEvaluationTypeEnumThe evaluation strategy for the targets. Supported values: FIXED_CALENDAR_WINDOW - Each cycle runs for a defined period from the selected start date. CYCLIC_WINDOW - Cycle starts after customer's 1st transaction post enrolment. PERIOD_AGNOSTIC_WINDOW - The cycle continues until the user achieves the specified target.
totalPeriodsNumberThe total number of periods over which the tracking is evaluated.
frequencyTypeEnumThe frequency of each cycle in which the user has to achieve the target value. Supported values: Monthly, Quarterly, Half-yearly, Yearly, Weekly, Daily, CUSTOM.
frequencyNumberThe frequency count, relevant to the frequencyType.
targetCycleStartDateISOString

Defines the target’s start date in ISO 8601 format with the region offset.

For example:
The start date is at 14:30:45 on December 16, 2025, in India

Format for the request parameter:
2025-12-16T14:30:45+05:30

targetCycleEndDateISOString

Defines the target’s end date in ISO 8601 format with the region offset.

For example:
The start date is at 14:30:45 on December 16, 2025, in India

Format for the request parameter:
2025-12-16T14:30:45+05:30

periodsObjectAn array of period objects, each containing details about the individual periods within the tracking.
activeBooleanIndicates if the period is active.
descriptionStringA brief description of the period.
endDateDate TimeThe end date and time of the period.
periodStatusEnumIndicates if the cycle of the Milestone is running or upcoming. Supported values: RUNNING, UPCOMING, NOT_STARTED.
refCodeStringA reference code for the period.
startDateDate TimeThe start date and time of the period.
targetsObjectAn array of target objects.
activeBooleanIndicates if the target is active.
descriptionStringA brief description of the target.
expressionStringA string representing the condition to meet the target aka rule.
expressionJsonStringA JSON expression that specifies the conditions required to achieve the target.
defaultValuesObjectAn array of objects providing default values related to the target.
defaultValueStringThe default value for the target
filtersObjectIn this object, you can define the entity to which the specified expressions related to the target will be applied.
enrolmentMethodEnumThe method of enrolment for the target. Supported values: TRANSACTION, IMPORT
entityTypeEnumThe entity to which the specified expressions related to the target will be applied. For example: The user has to make a purchase of shoes from ABC store. Here, purchase of shoes is the expression and the entity is ABC store. Supported values: STORE, ZONE, CONCEPT.
entityIdsArrayThe IDs of the entities to which the is filter applied on.
nameStringThe name identifier for the target.
targetEntityEnumThe KPI on which the target is tracked. Supported values: TRANSACTION, LINEITEM, EVENT, REWARDS. To track the transactional KPIs, use TRANSACTION and LINEITEM . To track the Behavioural events & EMF events, use EVENT. To track the tracking based on rewards such as points, use REWARDS.
eventNameStringThe behavioral name of the event that triggers the target. Only valid in the case of behavioral events & EMF events.
targetType*EnumThe type of target. Supported values: SUM, VISIT, and COUNT (These are only 3 supported for behavioral event type of targets) To use SUM, set the value as EVENT_ATTRIBUTE and then define the details in the extendedFieldInfo object.
extendedFieldInfoObjectIncludes the details of the event attribute that needs to be tracked. This object is applicable only when targetType is SUM.
nameStringEvent on which the sum calculation is performed. For example, the number of adding to cart events.
aggregateFunctionEnumThe aggregate function checks whether the behavioral event is satisfied based on the sum. Supported values: SUM
defaultValuesObjectAn array of objects providing default values related to the target.
defaultValueIntegerA default value used in the target evaluation.

Request body parameters (that are related to target)

ParameterData TypeDescription
activeBooleanIndicates if the target is active.
descriptionStringA brief description of the target.
expressionStringA string representing the condition to meet the target.
expressionJsonJSONA JSON expression that specifies the conditions required to achieve the target.
filtersArrayIn this object, you can define the entity to which the specified expressions related to the target will be applied.
- entityIdsArrayThe IDs of the entities to which the is filter applied on.
- entityTypeEnumThe entity to which the specified expressions related to the target will be applied. For example: The user has to make a purchase of shoes from ABC store. Here, purchase of shoes is the expression and the entity is ABC store. Supported values: STORE, ZONE, CONCEPT.
name*StringName assigned to the target.
targetEntityEnumThe KPI on which the target is tracked. Supported values: TRANSACTION, LINEITEM, EVENT, REWARDS. To track the transactional KPIs, use TRANSACTION and LINEITEM . To track the Behavioural events, use EVENT. To track the tracking based on rewards such as points, use REWARDS.
enrolmentMethodEnumThe method of enrolment for the target. Supported values: TRANSACTION, IMPORT
targetGroupId*IntegerID of the target group.
targetType*StringThe type of target. Supported values: SUM, VISIT, and COUNT. To use SUM, set the value as EVENT_ATTRIBUTE and then define the details in the extendedFieldInfo object.
defaultValuesArrayAn array of objects providing default values related to the target.
- targetNameStringName of the target.
- periodIdIntegerUnique identifier for the period.
- defaultValueIntegerA default value used in the target evaluation.
extendedFieldInfoObjectIncludes the details of the event attribute that needs to be tracked. This object is applicable only when targetType is SUM.
- nameStringEvent on which the sum calculation is performed. For example, the number of adding to cart events.
- aggregateFunctionStringThe aggregate function checks whether the behavioral event is satisfied based on the sum. Supported values: SUM

Response parameters

FieldData TypeDescription
idIntegerUnique ID of the target group
nameStringUnique name of the target group
fromDateStringIndicates the start date of the target.
toDateStringIndicates the end date of the target.
activeBooleanIndicates if target tracking is active
preferredTillIdNumberIdentifier for the preferred POS till
periodsObjectDetails on target creation, updates, and time-frame
-idIntegerThe unique ID of the target period
-attributionObjectDetails on the creation and update details of the target period
--createdOnStringDate the target period was created in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format
--createdOnISOStringIndicates the date and time when the target period was created in ISO 8601 format
--lastUpdatedOnStringDate the target period was last updated in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format
--lastUpdatedOnISOStringIndicates the date and time when the target period was last updated in ISO 8601 format
--lastUpdatedByObjectDetails on updates to the target period
---idIntegerUnique ID of the user who last modified the target period
---codeStringCode of the user who last modified the target period
---descriptionStringDescription of the user who last modified the target period
---nameStringName of the user who last modified the target period
---typeStringType of user who last modified the target period
--createdByObjectDetails on creation of the target period
---idIntegerUnique ID of the user who created the target period
---codeStringCode of the user who created the target period
---descriptionStringDescription of the user who created the target period
---nameStringName of the user who created the target period
---typeStringType of user who created the target period
-startDateStringStart date of the target group, in YYYY-MM-DD format
-endDateStringEnd date of the target group, in YYYY-MM-DD format
-refCodeStringReference code of the target period
-periodStatusStringCurrent status of the target period
-targetGroupIdIntegerUnique ID of the target group
-descriptionStringDescription of the target group
-activeBooleanCurrent active status of the target period
totalPeriodsIntegerTotal number of periods for the target group
targetEvaluationTypeEnumEvaluation strategy for the target
recurringCyclesNumberNumber of cycles for which the tracking recurs
frequencyNumberFrequency count, based on the frequency type
targetCycleStartDateStringIndicates the start date and time of the target cycle
targetCycleEndDateStringIndicates the end date and time of the target cycle
targetCycleStartDateISOStringIndicates the start date and time of the target cycle in ISO 8601 format
targetCycleEndDateISOStringIndicates the end date and time of the target cycle in ISO 8601 format
trackingTypeEnumThe type of tracking the milestone is created for
targetsObjectDetails on creation of the target
-idIntegerUnique ID of the target
-attributionObjectDetails on the creation and update details of the target
--createdOnStringDate the target was created in ISO 8601 format
--createdOnISOStringIndicates the date and time when the target was created in ISO 8601 format
--lastUpdatedOnStringDate the target was last updated in ISO 8601 format
--lastUpdatedOnISOStringIndicates the date and time when the target was last updated in ISO 8601 format
--lastUpdatedByObjectDetails on updates to the target
---idIntegerUnique ID of the user who last modified the target
---codeStringCode of the user who last modified the target
---descriptionStringDescription of the user who last modified the target
---nameStringName of the user who last modified the target
---typeStringType of user who last modified the target
--createdByObjectDetails on creation of the target
---idIntegerUnique ID of the user who created the target
---codeStringCode of the user who created the target
---descriptionStringDescription of the user who created the target
---nameStringName of the user who created the target
---typeStringType of user who created the target
--nameStringUnique name for the target
--emfRuleSetIdIntegerUnique identifier of the ruleset that defines the conditions used to evaluate or process the target.
--targetTypeStringThe type of target. Possible values: COUNT, EVENT_ATTRIBUTE, VISIT
--targetEntityEnumThe KPI on which the target is tracked
--eventNameStringName of the event that triggers the target
--targetGroupIdIntegerUnique ID of the target group associated with the target
--activeBooleanCurrent active status of the target
--expressionBooleanIndicates if the target has an expression for evaluation
--expressionJsonStringA JSON expression that specifies the conditions required to achieve the target
--filtersObjectDetails on the scope filters active on the target
--enrolmentMethodEnumThe method of enrolment for the target
--defaultValuesObjectDetails on the default values for the target
---idIntegerUnique identifier of the default values used for specific target period.
---periodIdIntegerUnique identifier of the period associated with the default value.
---defaultValueFloatA default value used in the target evaluation
--targetPeriodDefaultValuesMapObjectDetails on the default values for the target period
--extendedFieldInfoObjectDetails on extended field information for the event.
---nameStringThe name of the extended field parameter that is tracked for this target. This identifies which custom field or extended attribute from the event data will be monitored.
---aggregateFunctionStringThe aggregation method used to calculate values from the tracked parameter. Possible values:
SUM and COUNT.
leaderboardEnabledBooleanIndicates if the leaderboard feature is enabled
userCreatedBooleanIndicates if the target is user-created
timeZoneNameStringSpecifies the timezone where the target group was created
errorsnull or ObjectContains error details if any occurred during the API request
warningsnull or ObjectContains warning details if any occurred during the API request
{
    "data": {
        "id": 2911,
        "name": "uatTargetGroupBE01",
        "fromDate": "2026-01-01",
        "toDate": "2026-01-01",
        "active": true,
        "preferredTillId": 75155297,
        "periods": [
            {
                "id": 31623,
                "attribution": {
                    "createdOn": "2026-01-13T05:13:18.000+0000",
                    "createdOnISO": "2026-01-13T05:13:18Z",
                    "lastUpdatedOn": "2026-01-13T05:13:18.000+0000",
                    "lastUpdatedOnISO": "2026-01-13T05:13:18Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "startDate": "2025-07-17",
                "endDate": "2025-07-18",
                "refCode": "Cycle_1",
                "periodStatus": "ENDED",
                "targetGroupId": 2911,
                "description": "p1",
                "active": true
            },
            {
                "id": 31624,
                "attribution": {
                    "createdOn": "2026-01-13T05:13:18.000+0000",
                    "createdOnISO": "2026-01-13T05:13:18Z",
                    "lastUpdatedOn": "2026-01-13T05:13:18.000+0000",
                    "lastUpdatedOnISO": "2026-01-13T05:13:18Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "startDate": "2025-07-19",
                "endDate": "2025-07-20",
                "refCode": "Cycle_2",
                "periodStatus": "ENDED",
                "targetGroupId": 2911,
                "description": "p2",
                "active": true
            }
        ],
        "totalPeriods": 2,
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "recurringCycles": 1,
        "frequency": 1,
        "targetCycleStartDate": "2025-07-17T00:00:00.529Z",
        "targetCycleEndDate": "2026-02-01T05:00:00.000Z",
        "targetCycleStartDateISO": "2025-07-17T00:00:00Z",
        "targetCycleEndDateISO": "2026-02-01T05:00:00Z",
        "trackingType": "DEFAULT",
        "targets": [
            {
                "id": 3147,
                "attribution": {
                    "createdOn": "2026-01-13T05:13:17.578+0000",
                    "createdOnISO": "2026-01-13T05:13:17Z",
                    "lastUpdatedOn": "2026-01-13T05:13:17.578+0000",
                    "lastUpdatedOnISO": "2026-01-13T05:13:17Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "name": "uat_target_group_be_01",
                "emfRuleSetId": 126470218,
                "targetType": "COUNT",
                "targetEntity": "EVENT",
                "eventName": "TestingEvent_FE",
                "targetGroupId": 2911,
                "active": true,
                "expression": "true",
                "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
                "filters": [],
                "enrolmentMethod": "TRANSACTION",
                "defaultValues": [
                    {
                        "id": 128501,
                        "periodId": 31623,
                        "defaultValue": 2
                    },
                    {
                        "id": 128502,
                        "periodId": 31624,
                        "defaultValue": 3
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "31623": {
                        "id": 128501,
                        "periodId": 31623,
                        "defaultValue": 2
                    },
                    "31624": {
                        "id": 128502,
                        "periodId": 31624,
                        "defaultValue": 3
                    }
                },
                "extendedFieldInfo": {
                    "name": "price",
                    "aggregateFunction": "SUM"
                }
            }
        ],
        "leaderboardEnabled": false,
        "userCreated": false,
        "timeZoneName": "GMT"
    },
    "errors": null,
    "warnings": null
}
{
    "data": {
        "id": 2913,
        "name": "uatTargetGroupBE02",
        "fromDate": "2026-01-01",
        "toDate": "2026-01-01",
        "active": true,
        "preferredTillId": 75155297,
        "periods": [
            {
                "id": 31627,
                "attribution": {
                    "createdOn": "2026-01-13T05:19:28.000+0000",
                    "createdOnISO": "2026-01-13T05:19:28Z",
                    "lastUpdatedOn": "2026-01-13T05:19:28.000+0000",
                    "lastUpdatedOnISO": "2026-01-13T05:19:28Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "startDate": "2025-07-17",
                "endDate": "2025-07-18",
                "refCode": "Cycle_1",
                "periodStatus": "ENDED",
                "targetGroupId": 2913,
                "description": "p1",
                "active": true
            },
            {
                "id": 31628,
                "attribution": {
                    "createdOn": "2026-01-13T05:19:28.000+0000",
                    "createdOnISO": "2026-01-13T05:19:28Z",
                    "lastUpdatedOn": "2026-01-13T05:19:28.000+0000",
                    "lastUpdatedOnISO": "2026-01-13T05:19:28Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "startDate": "2025-07-19",
                "endDate": "2025-07-20",
                "refCode": "Cycle_2",
                "periodStatus": "ENDED",
                "targetGroupId": 2913,
                "description": "p2",
                "active": true
            }
        ],
        "totalPeriods": 2,
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "recurringCycles": 1,
        "frequency": 1,
        "targetCycleStartDate": "2025-07-17T00:00:00.529Z",
        "targetCycleEndDate": "2026-02-01T05:00:00.000Z",
        "targetCycleStartDateISO": "2025-07-17T00:00:00Z",
        "targetCycleEndDateISO": "2026-02-01T05:00:00Z",
        "trackingType": "DEFAULT",
        "targets": [
            {
                "id": 3148,
                "attribution": {
                    "createdOn": "2026-01-13T05:19:28.442+0000",
                    "createdOnISO": "2026-01-13T05:19:28Z",
                    "lastUpdatedOn": "2026-01-13T05:19:28.442+0000",
                    "lastUpdatedOnISO": "2026-01-13T05:19:28Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "name": "uat_target_group_be_02",
                "emfRuleSetId": 126470219,
                "targetType": "EVENT_ATTRIBUTE",
                "targetEntity": "EVENT",
                "eventName": "TestingEvent_FE",
                "targetGroupId": 2913,
                "active": true,
                "expression": "true",
                "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
                "filters": [],
                "enrolmentMethod": "TRANSACTION",
                "defaultValues": [
                    {
                        "id": 128503,
                        "periodId": 31627,
                        "defaultValue": 2
                    },
                    {
                        "id": 128504,
                        "periodId": 31628,
                        "defaultValue": 3
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "31627": {
                        "id": 128503,
                        "periodId": 31627,
                        "defaultValue": 2
                    },
                    "31628": {
                        "id": 128504,
                        "periodId": 31628,
                        "defaultValue": 3
                    }
                },
                "extendedFieldInfo": {
                    "name": "Customer",
                    "aggregateFunction": "SUM"
                }
            }
        ],
        "leaderboardEnabled": false,
        "userCreated": false,
        "timeZoneName": "GMT"
    },
    "errors": null,
    "warnings": null
}

API error codes

CodeDescription
310069Target group name already exists
300004Invalid input, check all values and ensure they are correct.
310008Length of Target rule name cannot exceed 200
Body Params
string
Defaults to { "active": true, "fromDate": "2024-02-19T00:00:00.529Z", "name": "GoodNightForNightly", "preferredTillId": 50692127, "toDate": "2024-05-31T08:41:00.529Z", "trackingType": "DEFAULT", "totalPeriods": 2, "frequency": 1, "recurringCycles": 1, "targetEvaluationType": "FIXED_CALENDAR_WINDOW", "targetCycleStartDate": "2024-02-19T00:31:00.529Z", "periods": [ { "active": true, "description": "p66912", "endDate": "2024-02-22T23:45:12.063", "periodStatus": "RUNNING", "refCode": "period66921", "startDate": "2024-02-19T00:00:00.529Z" }, { "active": true, "description": "p66222", "endDate": "2024-04-30T23:45:12.063", "periodStatus": "NOT_STARTED", "refCode": "period6628911", "startDate": "2024-04-01T23:45:12.063Z" } ], "targets": [ { "targetEntity": "EVENT", "targetType": "VISIT", "eventName": "goodNight", "defaultValues": [ { "defaultValue": "2" }, { "defaultValue": "3" } ], "targetMilestoneTriggers": [], "expression": "true", "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}", "filters": [], "name": "goodNightTargetRule", "enrolmentMethod": "TRANSACTION" } ] }
Responses

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