Create target group

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


A target group is an entity under which individual targets can be created. The targets are defined under the target group.

A target group is essential for creating a target, even when defining a single target. The target group serves as a container in the backend system. When creating a target through the user interface, you may not explicitly create a target group; however, the system automatically assigns the target to a backend group.

You can also use the same API to define targets and periods under the target group.

👍

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 .

Prerequisites

  • Authentication: Basic/OAuth authentication
  • Default access group

Resource information

URIv3/targetGroups
HTTP methodPOST
PaginationNA
Rate limitNA
Batch supportNA

Example request

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 DFhN2Q0MWU3MmM1ZDc1NWE3NQ==' \
-d '{
  "active": true,
  "description": "UAT target group number hundred thirty",
  "name": "uatTargetGroup130",
  "trackingType": "DEFAULT",
  "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
  "totalPeriods": 2,
  "frequencyType": "DAILY",
  "frequency": 1,
  "recurringCycles": 1,
  "timeZoneName": "Asia/Kolkata",
  "preferredTillId": 751552970000,
  "userCreated": false,
  "targetCycleStartDateISO": "2026-01-01T10:30:00+05:30",
  "targetCycleEndDateISO": "2026-02-01T10:30:00+05:30",
  "periods": [
    {
      "active": true,
      "description": "p1",
      "periodStatus": "RUNNING",
      "startDate": "2026-01-01T10:30:00+05:30",
      "endDate": "2026-01-14T10:30:00+05:30",
      "refCode": "Cycle_1"
    },
    {
      "active": true,
      "description": "p2",
      "periodStatus": "NOT_STARTED",
      "startDate": "2026-01-15T10:30:00+05:30",
      "endDate": "2026-01-31T10:30:00+05:30",
      "refCode": "Cycle_2"
    }
  ],
  "targets": [
    {
      "active": true,
      "description": "",
      "expression": true,
      "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
      "filters": [],
      "name": "uat_target_group_130",
      "targetEntity": "EVENT",
      "targetType": "COUNT",
      "extendedFieldInfo": {
        "name": "points",
        "aggregateFunction": "SUM"
      },
      "defaultValues": [
        {
          "defaultValue": "1.00"
        },
        {
          "defaultValue": "1.00"
        }
      ]
    }
  ]
}'
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; _cfuvid=kYnuHywd2SuhkmuOi2_c7.Ie8_QvI8s1bFiaSPpP.8M-1759827226073-0.0.1.1-604800000; _cfuvid=4yQ.rawpbQf4P30QMM55R316xFW18w5eFCc.rEOnRfQ-1764071843446-0.0.1.1-604800000; _cfuvid=foqiMO3v6AsMbWhzzKij2zbO1XsG5.ToOdTLlgYzfUA-1766482011549-0.0.1.1-604800000' \
-H 'Authorization: Basic M5OGM5ZmM2YjZlY2I2MmEy' \
-d '{
    "active": true,
    "fromDate": "2025-10-07T00:00:00.529Z",
    "name": "uatTargetGroup124",
    "preferredTillId": 75155297,
    "toDate": "2025-11-25T00:00:00.529Z",
    "trackingType": "DEFAULT",
    "timeZoneName": "Asia/Kolkata",
    "totalPeriods": 2,
    "frequency": 2,
    "recurringCycles": 2,
    "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
    
    
    "periods": [
        {
            "active": true,
            "description": "p1",
            "periodStatus": "RUNNING",
            "startDate": "2026-01-01T10:30:00.000+05:30",
            "endDate": "2026-01-15T10:30:00.000+05:30",
            "refCode": "Cycle_1"
        },
        {
            "active": true,
            "description": "p2",
            "periodStatus": "NOT_STARTED",
            "startDate": "2026-01-16T10:30:00.000+05:30",
            "endDate": "2026-01-30T10:30:00.000+05:30",
            "refCode": "Cycle_2"
        }
    ],
    "targets": [
        {
            "targetEntity": "ALTERNATE_CURRENCIES",
            "targetType": "ALL",
            "extendedFieldInfo": {
                "alternateCurrencyIdentifier": "DocCoin",
                "programId": 783
            },
            "defaultValues": [
                {
                    "defaultValue": "2"
                },
                {
                    "defaultValue": "3"
                }
            ],
            "targetMilestoneTriggers": [],
            "expression": "true",
            "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
            "filters": [],
            "name": "uat_target_group_124",
            "enrolmentMethod": "IMPORT"
        }
    ]
}'

Request body parameters

Parameter NameData TypeDescription
activeBooleanIndicates if target tracking is active.
descriptionStringBrief description of the target group.
name*StringThe name identifier for the target group.

The character limit for the name is 200 characters.
preferredTillIdNumberIdentifier for the preferred POS till.
trackingType*String

The type of tracking the milestone is created for. Supported values:
DEFAULT: Track a single target
UNIFIED :Track multiple targets
STREAK: Track multiple targets as a streak.
CAPPING: Track the number of points a user has got over a period, so that capping can be applied.

Refer to the documentation on

milestones

,

unified targets

,

streaks

and

capping

for more information.

targetEvaluationType*StringThe evaluation strategy for the targets. Supported values:
FIXED_CALENDAR_WINDOW, CYCLIC_WINDOW, PERIOD_AGNOSTIC_WINDOW
timeZoneNameStringIANA time zone name for
the target group. This is a reference label to identify the timezone where the target group is created. There is no validation for this parameter; it is recommended to follow the IANA format.
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

frequencyType*EnumThe frequency of each cycle in which the user has to achieve the target value.
Supported values: MONTHLY, QUARTERLY, HALF_YEARLY, YEARLY, WEEKLY, DAILY, CUSTOM.
frequency*NumberThe frequency count, based on the frequencyType.
recurringCycles*NumberThe number of cycles for which the tracking recurs.
userCreatedBoolean

If set to true, a

user-created

target group is created. A user-created target is a promotion that rewards customers for achieving goals they set themselves.

By default the value is set to false and a regular target group is created.

leaderboardEnabledBoolean

If enabled, a

leaderboard

enabled target group is created.

aggregateWindow *ENUMContains information related to the aggregate window. An aggregate window is a defined time period during which you can track an extended field or behavioral event.
windowType *ENUMThe type of window period (MIN or MAX).
MIN: This function identifies the smallest value within a given time frame. For example, if you're tracking daily steps, the MIN would show you the least number of steps taken in that period.

MAX: This function finds the largest value within that same time frame. Continuing with the step count example, the MAX would reveal the highest number of steps taken during the period.
windowTimeUnit *ENUMThe timeframe for which the window will be active. Currently, DAY is supported.
windowValueStringThe time units for which the window will be active. Currently, one time unit is supported.
periodsObjectDetails on target period creation, updates, and time-frame.
activeBooleanIndicates if the period is active.
descriptionStringA brief description of the period.
endDateDate TimeThe end date and time of the period in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format.
periodStatusStringIndicates 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 in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format.
targetsObjectAn array of target objects, each outlining a target within the tracking.
activeBooleanIndicates if the target is active.
descriptionStringA brief description 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.
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.
entityIdsArrayIDs of the entities to which the is filter applied on.
nameStringThe name identifier for the target.

The character limit for the target group name is 200 characters.
targetEntityEnum

The KPI on which the target is tracked.
For the transactional KPIs, the supported value for this are TRANSACTION and LINEITEM.
For the Behavioural or EMF events, the supported value is EVENT.
For the tracking based on rewards such as points, the supported value is REWARDS.

Refer to creating target groups based on

behavioural event

,

EMF event

and

alternate currencies

for more details.

eventNameStringThe name of the event that triggers the target.
targetTypeEnum

Target type on which the target is set.
Supported values:
QUANTITY, SALES, GROSS_SALES, REGULAR_POINTS, PROMOTIONAL_POINTS, ALL_POINTS
For information based on configuring target based on behavioural event (COUNT, VISIT, and SUM) and EMF event (COUNT and VISIT), refer to

target based on behavioural event

and

target based on EMF event

documentation.

defaultValuesObjectDetails of the default values for the target.
defaultValueIntegerDefault value for the target.
extendedFieldInfoObjectDetails on extended field information for the target group.
nameString

Specific custom data field you want to perform the aggregation on. To create a new custom field, refer to the documentation on

creating a new custom field

.

aggregateFunctionString

The specific type of calculation that will be performed. This allows you to create a single, summary metric from a set of individual data points, which the system can then use to evaluate progress towards a goal.

Supported values:
COUNT : Counts the number of times the field specified in name appears in the data.
SUM: Calculate the arithmetic sum of all the numeric values for the field specified in name

Example response

{
    "data": {
        "id": 2886,
        "name": "uatTargetGroup130",
        "active": true,
        "preferredTillId": 751552970000,
        "periods": [
            {
                "id": 31577,
                "attribution": {
                    "createdOn": "2026-01-12T09:30:57.000+0000",
                    "createdOnISO": "2026-01-12T09:30:57Z",
                    "lastUpdatedOn": "2026-01-12T09:30:57.000+0000",
                    "lastUpdatedOnISO": "2026-01-12T09:30:57Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "startDate": "2026-01-01",
                "endDate": "2026-01-14",
                "refCode": "Cycle_1",
                "periodStatus": "RUNNING",
                "targetGroupId": 2886,
                "description": "p1",
                "active": true
            },
            {
                "id": 31578,
                "attribution": {
                    "createdOn": "2026-01-12T09:30:57.000+0000",
                    "createdOnISO": "2026-01-12T09:30:57Z",
                    "lastUpdatedOn": "2026-01-12T09:30:57.000+0000",
                    "lastUpdatedOnISO": "2026-01-12T09:30:57Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "startDate": "2026-01-15",
                "endDate": "2026-01-31",
                "refCode": "Cycle_2",
                "periodStatus": "NOT_STARTED",
                "targetGroupId": 2886,
                "description": "p2",
                "active": true
            }
        ],
        "totalPeriods": 2,
        "description": "UAT target group number hundred thirty",
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "recurringCycles": 1,
        "frequency": 1,
        "targetCycleStartDate": "2026-01-01T05:00:00.000Z",
        "targetCycleEndDate": "2026-02-01T05:00:00.000Z",
        "targetCycleStartDateISO": "2026-01-01T05:00:00Z",
        "targetCycleEndDateISO": "2026-02-01T05:00:00Z",
        "frequencyType": "DAILY",
        "trackingType": "DEFAULT",
        "targets": [
            {
                "id": 3140,
                "attribution": {
                    "createdOn": "2026-01-12T09:30:56.717+0000",
                    "createdOnISO": "2026-01-12T09:30:56Z",
                    "lastUpdatedOn": "2026-01-12T09:30:56.717+0000",
                    "lastUpdatedOnISO": "2026-01-12T09:30:56Z",
                    "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_130",
                "emfRuleSetId": 126469995,
                "targetType": "COUNT",
                "targetEntity": "EVENT",
                "eventName": "TransactionAdd",
                "targetGroupId": 2886,
                "description": "",
                "active": true,
                "expression": "true",
                "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
                "filters": [],
                "enrolmentMethod": "IMPORT",
                "defaultValues": [
                    {
                        "id": 128490,
                        "periodId": 31577,
                        "defaultValue": 1
                    },
                    {
                        "id": 128491,
                        "periodId": 31578,
                        "defaultValue": 1
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "31577": {
                        "id": 128490,
                        "periodId": 31577,
                        "defaultValue": 1
                    },
                    "31578": {
                        "id": 128491,
                        "periodId": 31578,
                        "defaultValue": 1
                    }
                },
                "extendedFieldInfo": {
                    "name": "points",
                    "aggregateFunction": "SUM"
                }
            }
        ],
        "leaderboardEnabled": false,
        "userCreated": false,
        "timeZoneName": "Asia/Kolkata"
    },
    "errors": null,
    "warnings": null
}
{
  "active": true,
  "description": "Opp",
  
  
  "name": "UCCtesttarget2",
  "preferredTillId": 75050875,
  "trackingType": "DEFAULT",
  "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
  "totalPeriods": 4,
  "frequencyType": "DAILY",
  "frequency": 0,
  "recurringCycles": 0,
  "userCreated": true,
  "periods": [
    {
      "active": true,
      "description": "",
      "endDate": "2024-10-08T23:59:59.999Z",
      "periodStatus": "RUNNING",
      "refCode": "Cycle_1",
      "startDate": "2024-10-08T00:00:00.000Z"
    },
    {
      "active": true,
      "description": "",
      "endDate": "2024-10-09T23:59:59.999Z",
      "periodStatus": "NOT_STARTED",
      "refCode": "Cycle_2",
      "startDate": "2024-10-09T00:00:00.000Z"
    },
    {
      "active": true,
      "description": "",
      "endDate": "2024-10-10T23:59:59.999Z",
      "periodStatus": "NOT_STARTED",
      "refCode": "Cycle_3",
      "startDate": "2024-10-10T00:00:00.000Z"
    },
    {
      "active": true,
      "description": "",
      "endDate": "2024-10-11T23:59:59.999Z",
      "periodStatus": "NOT_STARTED",
      "refCode": "Cycle_4",
      "startDate": "2024-10-11T00:00:00.000Z"
    }
  ],
  "targets": [
    {
      "active": true,
      "description": "",
      "expression": true,
      "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
      "filters": [],
      "name": "UCCtesttarget2",
      "targetEntity": "EVENT",
      "eventName": "spinTheWheel",
      
      "targetType": "EVENT_ATTRIBUTE",
      "extendedFieldInfo": {
        "name": "points",
        "aggregateFunction": "SUM"
      },
      "defaultValues": [
        {
          "defaultValue": "1.00"
        },
        {
          "defaultValue": "1.00"
        },
        {
          "defaultValue": "1.00"
        },
        {
          "defaultValue": "1.00"
        }
       
      ]
    }
  ]
}
{
    "description": "test via postman",
    "name": "Fixed Window Milestone Group 1725974277",
    "fromDate": "2024-08-20T08:41:00.529Z",
    "toDate": "2024-10-20T08:41:00.529Z",
    "targetCycleStartDate": "2024-08-20T08:42:00.529Z",
    "targetCycleEndDate": "2024-10-20T08:42:00.529Z",
    "totalPeriods": 2,
    "periods": [
        {
            "refCode": "TP1",
            "startDate": "2024-08-20",
            "endDate": "2024-09-19"
        },
        {
            "refCode": "TP2",
            "startDate": "2024-09-20",
            "endDate": "2024-10-19"
        }
    ],
    "targets": [
        {
            "active": true,
            "description": "target created via postman",
            "expression": "true",
            "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
            "name": "target-2024-09-10T13:17:57.210Z",
            "targetEntity": "EVENT",
            "eventName": "TransactionAdd",
            "targetType": "COUNT",
            "extendedFieldInfo": {
                "name": "cartId",
                "aggregateFunction": "SUM"
            },
            "defaultValues": [
                {
                    "defaultValue": 500
                },
                {
                    "defaultValue": 500
                }
            ]
        }
    ],
    "preferredTillId": 50692189,
    "active": true,
    "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
    "frequencyType": "MONTHLY",
    "trackingType": "DEFAULT"
    ,"userCreated": false
    ,"leaderboardEnabled": true
}

Response parameters

FieldData TypeDescription
idIntegerUnique ID of the target group
nameStringUnique name of the target group.
activeBooleanIndicates if target tracking is active.
preferredTillIdNumberIdentifier for the preferred POS till.
trackingTypeEnumThe type of tracking the milestone is created for. Supported values:
DEFAULT: Track a single target
UNIFIED :Track multiple targets
STREAK: Track multiple targets as a streak.
CAPPING: Track the number of points a user has got over a period, so that capping can be applied.
frequencyNumberFrequency count, based on the frequencyType.
recurringCyclesNumberNumber of cycles for which the tracking recurs.
targetCycleStartDateStringIndicates the start date and time of the target cycle in ISO 8601 format
Note: This field will be deprecated in the future and is being replaced by targetCycleStartDateISO.
targetCycleStartDateISOString

Indicates the start date and time of the target cycle 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)

targetCycleEndDateStringIndicates the end date and time of the target cycle in ISO 8601 format
Note: This field will be deprecated in the future and is being replaced by targetCycleEndDateISO.
targetCycleEndDateISOString

Indicates the end date and time of the target cycle 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.

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.Note: This field will be deprecated in the future and is being replaced by createdOnISO.
-- createdOnISOString

Indicates the end date and time when the target period was created 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.

--lastUpdatedOnStringDate the target period was last updated in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format.
Note: This field will be deprecated in the future and is being replaced by lastUpdatedOnISO.
--lastUpdatedOnISOString

Indicates the end date and time when the target period was last updated on 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.

--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.
-startDateStringStart date of the target group, in YYYY-MM-DD format.
-endDateStringEnd date of the target group, in YYYY-MM-DD format.
-refCodeIntegerReference code of the target period.
-periodStatusStringCurrent status of the target period. Supported values NOT_STARTED, LIVE and ENDED.
-targetGroupIdIntegerUnique ID of the target group.
-descriptionStringDescription of the target group.
-activeBooleanCurrent active status of the target period. If true, the target is currently active, else the target is inactive.
totalPeriodsIntegerTotal number of periods for the target group.
descriptionStringDescription of the target period.
targetEvaluationTypeENUMEvaluation strategy for the target.
recurringCyclesIntegerNumber of cycles for which the tracking recurs.
trackingTypeEnumThe type of tracking the milestone is created for.
targetsObjectDetails on creation of the target.
-idBooleanUnique ID of the target.
-attributionObjectDetails on the creation and update details of the target.
-- createdOnStringDate the target was created in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format.
Note: This field will be deprecated in the future and is being replaced by createdOnISO.
-- createdOnISOString

Indicates the end date and time when the target was created 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.

-- lastUpdatedOnStringDate the target was last updated in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format.
Note: This field will be deprecated in the future and is being replaced by lastUpdatedOnISO.
-- lastUpdatedOnISOString

Indicates the end date and time when the target was last updated on 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.

-- lastUpdatedByObjectDetails on updates to the target.
--- idIntegerUnique ID of the user who last modified the target.
--- codeIntegerCode 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 .
--- codeIntegerCode 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.
--targetTypeStringThe type of target

Supported values:
ALL: Tracks points that a customer earns across a loyalty program and from a loyalty promotion.
REGULAR: Track the points that a customer earns across a loyalty program. Points earned from promotions are excluded.
PROMOTION: Tracks the points that a customer earns from a loyalty promotion.
--targetEntityEnumThe KPI on which the target is tracked.
For the transactional KPIs, the supported value for this are TRANSACTION and LINEITEM.
For the Behavioural or EMF events, the supported value is EVENT.
For the tracking based on rewards such as points, the supported value is REWARDS.
--eventNameStringName of the event that triggers the target.
--targetGroupIdIntegerUnique ID of the target group associated with the target.
--descriptionStringDescription of the target.
--activeBooleanCurrent active status of the target. If true, the target is currently active, else the target is inactive.
-- 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. Supported values: TRANSACTION, IMPORT.
-- defaultValuesObjectDetails on the default values for the target.
--- defaultValueFloatA default value used in the target evaluation.
-- targetPeriodDefaultValuesMapObjectDetails on the default values for the target period.
-- extendedFieldInfoObjectDetails on extended field information for the target group.
leaderboardEnabledBooleanIndicates if the leaderboard feature is enabled.
userCreatedBooleanIndicates if the target is a user-created target.
timeZoneNameStringIANA time zone name for
the target group. This is a reference label to identify the timezone where the target group is 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": 2762,
        "name": "uatTargetGroup80",
        "active": true,
        "preferredTillId": 751552970000,
        "periods": [
            {
                "id": 30147,
                "attribution": {
                    "createdOn": "2025-11-18T12:08:56.000+0000",
                    "createdOnISO": "2025-11-18T12:08:56Z",
                    "lastUpdatedOn": "2025-11-18T12:08:56.000+0000",
                    "lastUpdatedOnISO": "2025-11-18T12:08:56Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "startDate": "2025-06-11",
                "endDate": "2025-06-11",
                "refCode": "Cycle_1",
                "periodStatus": "ENDED",
                "targetGroupId": 2762,
                "description": "",
                "active": true
            },
            {
                "id": 30148,
                "attribution": {
                    "createdOn": "2025-11-18T12:08:56.000+0000",
                    "createdOnISO": "2025-11-18T12:08:56Z",
                    "lastUpdatedOn": "2025-11-18T12:08:56.000+0000",
                    "lastUpdatedOnISO": "2025-11-18T12:08:56Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "startDate": "2025-05-11",
                "endDate": "2025-05-11",
                "refCode": "Cycle_2",
                "periodStatus": "ENDED",
                "targetGroupId": 2762,
                "description": "",
                "active": true
            }
        ],
        "totalPeriods": 1,
        "description": "UAT target group number eighty",
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "recurringCycles": 1,
        "frequency": 1,
        "targetCycleStartDate": "2025-05-11T00:00:00.000Z",
        "targetCycleEndDate": "2025-06-11T23:59:59.000Z",
        "targetCycleStartDateISO": "2025-05-11T00:00:00Z",
        "targetCycleEndDateISO": "2025-06-11T23:59:59Z",
        "frequencyType": "DAILY",
        "trackingType": "DEFAULT",
        "targets": [
            {
                "id": 3006,
                "attribution": {
                    "createdOn": "2025-11-18T12:08:56.055+0000",
                    "createdOnISO": "2025-11-18T12:08:56Z",
                    "lastUpdatedOn": "2025-11-18T12:08:56.055+0000",
                    "lastUpdatedOnISO": "2025-11-18T12:08:56Z",
                    "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_80",
                "emfRuleSetId": 126454877,
                "targetType": "COUNT",
                "targetEntity": "EVENT",
                "eventName": "TransactionAdd",
                "targetGroupId": 2762,
                "description": "",
                "active": true,
                "expression": "true",
                "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
                "filters": [],
                "enrolmentMethod": "IMPORT",
                "defaultValues": [
                    {
                        "id": 127052,
                        "periodId": 30147,
                        "defaultValue": 1
                    },
                    {
                        "id": 127053,
                        "periodId": 30148,
                        "defaultValue": 1
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "30147": {
                        "id": 127052,
                        "periodId": 30147,
                        "defaultValue": 1
                    },
                    "30148": {
                        "id": 127053,
                        "periodId": 30148,
                        "defaultValue": 1
                    }
                },
                "extendedFieldInfo": {
                    "name": "points",
                    "aggregateFunction": "SUM"
                }
            }
        ],
        "leaderboardEnabled": false,
        "userCreated": false,
        "timeZoneName": "Asia/Kolkata"
    },
    "errors": null,
    "warnings": null
}
{
    "data": {
        "id": 1901,
        "name": "UCCtesttarget2",
        "active": true,
        "preferredTillId": 75050875,
        "periods": [
            {
                "id": 5751,
                "attribution": {
                    "createdOn": "2024-10-09T11:58:28.000+0000",
                    "lastUpdatedOn": "2024-10-09T11:58:28.000+0000",
                    "lastUpdatedBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    }
                },
                "startDate": "2024-10-08",
                "endDate": "2024-10-08",
                "refCode": "Cycle_1",
                "periodStatus": "ENDED",
                "targetGroupId": 1901,
                "description": "",
                "active": true
            },
            {
                "id": 5752,
                "attribution": {
                    "createdOn": "2024-10-09T11:58:28.000+0000",
                    "lastUpdatedOn": "2024-10-09T11:58:28.000+0000",
                    "lastUpdatedBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    }
                },
                "startDate": "2024-10-09",
                "endDate": "2024-10-09",
                "refCode": "Cycle_2",
                "periodStatus": "RUNNING",
                "targetGroupId": 1901,
                "description": "",
                "active": true
            },
            {
                "id": 5753,
                "attribution": {
                    "createdOn": "2024-10-09T11:58:28.000+0000",
                    "lastUpdatedOn": "2024-10-09T11:58:28.000+0000",
                    "lastUpdatedBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    }
                },
                "startDate": "2024-10-10",
                "endDate": "2024-10-10",
                "refCode": "Cycle_3",
                "periodStatus": "NOT_STARTED",
                "targetGroupId": 1901,
                "description": "",
                "active": true
            },
            {
                "id": 5754,
                "attribution": {
                    "createdOn": "2024-10-09T11:58:28.000+0000",
                    "lastUpdatedOn": "2024-10-09T11:58:28.000+0000",
                    "lastUpdatedBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    }
                },
                "startDate": "2024-10-11",
                "endDate": "2024-10-11",
                "refCode": "Cycle_4",
                "periodStatus": "NOT_STARTED",
                "targetGroupId": 1901,
                "description": "",
                "active": true
            }
        ],
        "totalPeriods": 4,
        "description": "Opp",
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "recurringCycles": 0,
        "frequency": 0,
        "targetCycleStartDate": "2024-10-08T00:00:00.000Z",
        "targetCycleEndDate": "2024-10-11T23:59:59.000Z",
        "frequencyType": "DAILY",
        "trackingType": "DEFAULT",
        "targets": [
            {
                "id": 1293,
                "attribution": {
                    "createdOn": "2024-10-09T11:58:28.218+0000",
                    "lastUpdatedOn": "2024-10-09T11:58:28.218+0000",
                    "lastUpdatedBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75122513,
                        "code": "till.marketsuper",
                        "description": "",
                        "name": "till.marketsuper",
                        "type": "TILL"
                    }
                },
                "name": "UCCtesttarget2",
                "emfRuleSetId": 126337565,
                "targetType": "EVENT_ATTRIBUTE",
                "targetEntity": "EVENT",
                "eventName": "spinTheWheel",
                "targetGroupId": 1901,
                "description": "",
                "active": true,
                "expression": "true",
                "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
                "filters": [],
                "enrolmentMethod": "IMPORT",
                "defaultValues": [
                    {
                        "id": 7180,
                        "periodId": 5751,
                        "defaultValue": 1.000
                    },
                    {
                        "id": 7181,
                        "periodId": 5752,
                        "defaultValue": 1.000
                    },
                    {
                        "id": 7182,
                        "periodId": 5753,
                        "defaultValue": 1.000
                    },
                    {
                        "id": 7183,
                        "periodId": 5754,
                        "defaultValue": 1.000
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "5751": {
                        "id": 7180,
                        "periodId": 5751,
                        "defaultValue": 1.000
                    },
                    "5752": {
                        "id": 7181,
                        "periodId": 5752,
                        "defaultValue": 1.000
                    },
                    "5753": {
                        "id": 7182,
                        "periodId": 5753,
                        "defaultValue": 1.000
                    },
                    "5754": {
                        "id": 7183,
                        "periodId": 5754,
                        "defaultValue": 1.000
                    }
                },
                "extendedFieldInfo": {
                    "name": "points",
                    "aggregateFunction": "SUM",
                    "aggregateWindow": null
                }
            }
        ],
        "leaderboardEnabled": false,
        "userCreated": true
    },
    "errors": null,
    "warnings": null
}
{
    "data": {
        "id": 2084,
        "name": "Fixed Window Milestone Group 1725974313",
        "fromDate": "2024-08-20",
        "toDate": "2024-10-20",
        "active": true,
        "preferredTillId": 50692189,
        "periods": [
            {
                "id": 3720,
                "attribution": {
                    "createdOn": "2024-09-10T13:18:36.000+0000",
                    "lastUpdatedOn": "2024-09-10T13:18:36.000+0000",
                    "lastUpdatedBy": {
                        "id": 50677655,
                        "code": "nirvana01",
                        "description": "",
                        "name": "nirvana01",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 50677655,
                        "code": "nirvana01",
                        "description": "",
                        "name": "nirvana01",
                        "type": "TILL"
                    }
                },
                "startDate": "2024-08-20",
                "endDate": "2024-09-19",
                "refCode": "TP1",
                "periodStatus": "RUNNING",
                "targetGroupId": 2084,
                "active": true
            },
            {
                "id": 3721,
                "attribution": {
                    "createdOn": "2024-09-10T13:18:36.000+0000",
                    "lastUpdatedOn": "2024-09-10T13:18:36.000+0000",
                    "lastUpdatedBy": {
                        "id": 50677655,
                        "code": "nirvana01",
                        "description": "",
                        "name": "nirvana01",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 50677655,
                        "code": "nirvana01",
                        "description": "",
                        "name": "nirvana01",
                        "type": "TILL"
                    }
                },
                "startDate": "2024-09-20",
                "endDate": "2024-10-19",
                "refCode": "TP2",
                "periodStatus": "NOT_STARTED",
                "targetGroupId": 2084,
                "active": true
            }
        ],
        "totalPeriods": 2,
        "description": "test via postman",
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "targetCycleStartDate": "2024-08-20T08:42:00.529Z",
        "targetCycleEndDate": "2024-10-20T08:42:00.529Z",
        "frequencyType": "MONTHLY",
        "trackingType": "DEFAULT",
        "targets": [
            {
                "id": 2746,
                "attribution": {
                    "createdOn": "2024-09-10T13:18:35.999+0000",
                    "lastUpdatedOn": "2024-09-10T13:18:35.999+0000",
                    "lastUpdatedBy": {
                        "id": 50677655,
                        "code": "nirvana01",
                        "description": "",
                        "name": "nirvana01",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 50677655,
                        "code": "nirvana01",
                        "description": "",
                        "name": "nirvana01",
                        "type": "TILL"
                    }
                },
                "name": "target-2024-09-10T13:18:32.999Z",
                "emfRuleSetId": 2030748,
                "targetType": "COUNT",
                "targetEntity": "EVENT",
                "eventName": "TransactionAdd",
                "targetGroupId": 2084,
                "description": "target created via postman",
                "active": true,
                "expression": "true",
                "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
                "enrolmentMethod": "IMPORT",
                "defaultValues": [
                    {
                        "id": 4472,
                        "periodId": 3720,
                        "defaultValue": 500.000
                    },
                    {
                        "id": 4473,
                        "periodId": 3721,
                        "defaultValue": 500.000
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "3720": {
                        "id": 4472,
                        "periodId": 3720,
                        "defaultValue": 500.000
                    },
                    "3721": {
                        "id": 4473,
                        "periodId": 3721,
                        "defaultValue": 500.000
                    }
                },
                "extendedFieldInfo": {
                    "name": "cartId",
                    "aggregateFunction": "SUM",
                    "aggregateWindow": null
                }
            }
        ],
        "leaderboardEnabled": true,
        "userCreated": false
    },
    "errors": null,
    "warnings": null
}

API error codes

CodeDescription
310069Target group name already exists
300004Invalid input, check all values and ensure they are correct.
310133Leaderboard is not enabled for the org
310132Target evaluation type not supported for leaderboard, currently only FIXED_CALENDER_WINDOW is supported
310008Length of the Target rule name cannot exceed 200


Body Params
boolean
string
string
required
int32
string
enum
required
Allowed:
string
enum
required
Allowed:
int32
required
string
enum
required
Allowed:
int32
required
int32
required
string
required
string
enum
Allowed:
string
required
string
required
boolean
string
string
enum
required
Defaults to ALTERNATE_CURRENCIES
Allowed:
string
enum
Allowed:
string
enum
required
Allowed:
float
string
required
int32
required
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