Create unified 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


👍 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.

A unified target is a combination of two or more targets within a target group. You can combine individual targets that involve different customer activities and tracking configurations (KPIs). You can also define an overall target that a user must achieve along with the defined targets.

Example request

curl -L 'https://eu.api.capillarytech.com/v3/targetGroups' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic Y2I2MmEy' \
-H 'Cookie: _cfuvid=HfZc2sXhie.L8BAghcEtMz5uJ2vIuNDKoqY44SU.XeE-1768210257026-0.0.1.1-604800000' \
-d '{
    "name": "uatUnifiedTargetGroup100",
    "active": true,
    "toDate": "2025-07-12T23:59:59.000",
    "targetCycleStartDateISO": "2026-01-01T10:30:00+05:30",
    "targetCycleEndDateISO": "2026-02-01T10:30:00+05:30",
    "periods": [
        {
            "active": true,
            "endDate": "2025-07-12T23:59:59.000",
            "refCode": "period_1",
            "startDate": "2025-07-09T00:00:00.000",
            "description": "Period number 1",
            "periodStatus": "RUNNING"
        }
    ],
    "targets": [
        {
            "name": "uatUnifiedTarget100",
            "active": true,
            "expression": "currentTxn.value>500",
            "targetType": "SALES",
            "description": "uatUnifiedTarget90",
            "targetEntity": "TRANSACTION",
            "defaultValues": [
                {
                    "defaultValue": 2000
                }
            ],
            "expressionJson": "{\"arity\":\"binary_operation\",\"value\":\">\",\"type\":\"boolean:primitive\",\"operands\":[{\"arity\":\"object_dereference\",\"type\":\"real:object:primitive\",\"operands\":[{\"arity\":\"name\",\"value\":\"currentTxn\",\"type\":\"tx:object:primitive\"},{\"arity\":\"name\",\"value\":\"value\",\"type\":\"real:object:primitive\"}]},{\"arity\":\"literal\",\"value\":\"500\",\"type\":\"number:primitive\"}]}",
            "enrolmentMethod": "TRANSACTION"
        },
        {
            "name": "uatUnifiedTarget101",
            "active": true,
            "expression": "currentTxn.value>500",
            "targetType": "SALES",
            "description": "uatUnifiedTarget91",
            "targetEntity": "TRANSACTION",
            "defaultValues": [
                {
                    "defaultValue": 2000
                }
            ],
            "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
            "enrolmentMethod": "TRANSACTION"
        }
    ],
    "fromDate": "2025-07-09T00:00:00.000",
    "frequency": 0,
    "description": "Unified Target Group number 2 for UAT purpose",
    "totalPeriods": 1,
    "trackingType": "UNIFIED",
    "combinationType": "ALL",
    "preferredTillId": 75155297,
    "recurringCycles": 0,
    "unifiedTargetExpression": {
        "aggregation": "SUM",
        "thresholdValue": 5000
    }
}'

Prerequisites

  • Authentication: Basic authentication details
  • Access group resource: WRITE access to target loyalty access group resource

Resource information

FieldValue
URI/v3/targetGroups
HTTP methodPOST
Rate limitNA
Batch supportNA

Request body parameters

Parameter (Parameters marked with * are required)Data TypeDescription
activeBooleanIndicates whether the group is active or not.
descriptionStringA brief description of the group.
fromDateStringThe start date and time of the target.
name*StringThe name of the target group.
The character limit for the name is 200 characters.
preferredTillIdIntegerTILL that needs to be associated with points issued on completing the target.
toDateStringThe end date and time of the target.
trackingType*EnumDefines the type of activity tracking in the target. Supported values: UNIFIED, DEFAULT, STREAKS, CAPPING.
Unified: Unified targets where brands can configure multiple targets in a single milestone.
Default: The milestone contains only one target.
Streaks: A type of gamification tracking that indicates the user to do something continuously until the streak value.
Capping: Used when the milestone created is used to apply capping on benefits to customers.
totalPeriods*IntegerThe total number of periods in the group.
frequency*IntegerThe frequency of the target.
recurringCycles*IntegerThe number of cycles the user configures in the group. It is set in case of CYCLIC_WINDOW or PERIOD_AGNOSTIC_WINDOW.
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

  • active
BooleanIndicates whether the specific period is active.
  • description
StringA brief description of the period.
  • endDate
StringThe end date and time of the period, in ISO 8601 format.
  • periodStatus
EnumThe status of the unified target. Supported values: RUNNING,ENDED,NOT_STARTED
  • refCode
StringReference code of the target period.
  • startDate
StringThe start date and time of the period.
targetsArrayAn array of target objects detailing specific targets within the group.
  • active
BooleanIndicates if the specific target is active.
  • description
StringA brief description of the target.
  • expression
StringA representation of the target's condition rule.
  • expressionJson
StringA JSON body that represents the target's rule.
  • filters
ArrayAn array of filter objects applied to the target.
-- entityTypeEnumThe type of entity the filter applied. Supported values: Transaction and Line item.
-- entityIdsArrayAn array of entity IDs to which the filter applies.
  • name
StringThe name of the target.
  • targetEntity*
EnumEntity to define target condition. Supported values:
To track transactions: TRANSACTION, LINEITEM, POINTS.
To track behavioural events: EVENT.
To track alternate currencies: ALTERNATE_CURRENCIES
To track points: REWARDS

You can create multiple targets using any combination of the supported target entities. For example, one target can have TRANSACTION as its targetEntity, while another target could use EVENT as its targetEntity.

Refer to the documentation on creating targets that track customer (EMF) events, behavioural events and alternate currencies for more information on creating these targets.
  • enrolmentMethod
EnumMethod to enroll customers and add target values. Supported values: TRANSACTION (enroll loyalty customers who transact during the target period), IMPORT (to import a list of customers with custom target value).
  • targetType
EnumTarget type on which the target is set. Supported values:
- Transactional activities: QUANTITY, SALES (SUM), COUNT, VISIT
- Behavioral events: EVENT_ATTRIBUTE.

You can create multiple targets using any combination of the supported target types. For example, one target can have QUANTITY as its targetType, while another target could use COUNT as its targetType.
  • defaultValues
ObjectAn array of objects specifying default values.
-- defaultValueDoubleThe actual target value user wants to set for the period.
combinationType*EnumA logical operator between the specified targets. Supported values: ANY (If any 1 target needs to be achieved) and ALL (All the targets in a unified target group need to be achieved).
unifiedTargetExpressionObjectAn object representing a unified expression for target evaluation.
  • aggregation
EnumThe type of aggregation used in the unified target expression. Supported values: SUM and COUNT.
  • thresholdValue
IntegerThe threshold value is used in the unified target expression for evaluation. It accepts up to 12 decimal places. This field is mandatory if you have defined value for aggregation parameter.
timeZoneNameStringSpecifies the timezone where the target group was created.

Example response

{
    "data": {
        "id": 2894,
        "name": "uatUnifiedTargetGroup100",
        "fromDate": "2025-07-09",
        "toDate": "2025-07-12",
        "active": true,
        "preferredTillId": 75155297,
        "periods": [
            {
                "id": 31591,
                "attribution": {
                    "createdOn": "2026-01-12T09:59:02.000+0000",
                    "createdOnISO": "2026-01-12T09:59:02Z",
                    "lastUpdatedOn": "2026-01-12T09:59:02.000+0000",
                    "lastUpdatedOnISO": "2026-01-12T09:59:02Z",
                    "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-09",
                "endDate": "2025-07-12",
                "refCode": "period_1",
                "periodStatus": "ENDED",
                "targetGroupId": 2894,
                "description": "Period number 1",
                "active": true
            }
        ],
        "totalPeriods": 1,
        "description": "Unified Target Group number 2 for UAT purpose",
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "recurringCycles": 0,
        "frequency": 0,
        "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",
        "trackingType": "UNIFIED",
        "targets": [
            {
                "id": 3142,
                "attribution": {
                    "createdOn": "2026-01-12T09:59:02.064+0000",
                    "createdOnISO": "2026-01-12T09:59:02Z",
                    "lastUpdatedOn": "2026-01-12T09:59:02.064+0000",
                    "lastUpdatedOnISO": "2026-01-12T09:59:02Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "name": "uatUnifiedTarget100",
                "emfRuleSetId": 126470009,
                "targetType": "SALES",
                "targetEntity": "TRANSACTION",
                "eventName": "TransactionAdd",
                "targetGroupId": 2894,
                "description": "uatUnifiedTarget90",
                "active": true,
                "expression": "currentTxn.value>500",
                "expressionJson": "{\"arity\":\"binary_operation\",\"value\":\">\",\"type\":\"boolean:primitive\",\"operands\":[{\"arity\":\"object_dereference\",\"type\":\"real:object:primitive\",\"operands\":[{\"arity\":\"name\",\"value\":\"currentTxn\",\"type\":\"tx:object:primitive\"},{\"arity\":\"name\",\"value\":\"value\",\"type\":\"real:object:primitive\"}]},{\"arity\":\"literal\",\"value\":\"500\",\"type\":\"number:primitive\"}]}",
                "enrolmentMethod": "TRANSACTION",
                "defaultValues": [
                    {
                        "id": 128494,
                        "periodId": 31591,
                        "defaultValue": 2000.000
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "31591": {
                        "id": 128494,
                        "periodId": 31591,
                        "defaultValue": 2000.000
                    }
                }
            },
            {
                "id": 3143,
                "attribution": {
                    "createdOn": "2026-01-12T09:59:02.064+0000",
                    "createdOnISO": "2026-01-12T09:59:02Z",
                    "lastUpdatedOn": "2026-01-12T09:59:02.064+0000",
                    "lastUpdatedOnISO": "2026-01-12T09:59:02Z",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman",
                        "type": "TILL"
                    }
                },
                "name": "uatUnifiedTarget101",
                "emfRuleSetId": 126470010,
                "targetType": "SALES",
                "targetEntity": "TRANSACTION",
                "eventName": "TransactionAdd",
                "targetGroupId": 2894,
                "description": "uatUnifiedTarget91",
                "active": true,
                "expression": "currentTxn.value>500",
                "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
                "enrolmentMethod": "TRANSACTION",
                "defaultValues": [
                    {
                        "id": 128495,
                        "periodId": 31591,
                        "defaultValue": 2000.000
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "31591": {
                        "id": 128495,
                        "periodId": 31591,
                        "defaultValue": 2000.000
                    }
                }
            }
        ],
        "combinationType": "ALL",
        "unifiedTargetExpression": {
            "aggregation": "SUM",
            "thresholdValue": 5000,
            "ruleExpression": "(3142 & 3143)"
        },
        "leaderboardEnabled": false,
        "userCreated": false,
        "timeZoneName": "GMT"
    },
    "errors": null,
    "warnings": null
}
{
    "active": true,
    "description": "unified group",
    "fromDate": "2023-09-25T13:45:12.063",
    "name": "demo-unified2",
    "preferredTillId": 50679771,
    "toDate": "2024-10-31T08:41:00.529Z",
    "trackingType": "UNIFIED",
    "totalPeriods": 1,
    "frequency": 0,
    "recurringCycles": 0,
    "periods": [
        {
            "active": true,
            "description": "p1",
            "endDate": "2023-10-31T23:45:12.063",
            "periodStatus": "RUNNING",
            "refCode": "period44",
            "startDate": "2023-09-25T13:45:12.063"
        }
    ],
    "targets": [
        {
            "active": true,
            "description": "uni15",
            "expression": "currentTxn.value>500",
            "expressionJson": "{\"arity\":\"binary_operation\",\"value\":\">\",\"type\":\"boolean:primitive\",\"operands\":[{\"arity\":\"object_dereference\",\"type\":\"real:object:primitive\",\"operands\":[{\"arity\":\"name\",\"value\":\"currentTxn\",\"type\":\"tx:object:primitive\"},{\"arity\":\"name\",\"value\":\"value\",\"type\":\"real:object:primitive\"}]},{\"arity\":\"literal\",\"value\":\"500\",\"type\":\"number:primitive\"}]}",
            "filters": [
                {
                    "entityType": "STORE",
                    "entityIds": [
                        50679757,50679770
                    ]
                }
            ],
            "name": "t123",
            "targetEntity": "TRANSACTION",
            "enrolmentMethod": "TRANSACTION",            
            "targetType": "SALES",
            "defaultValues": [
                {
                    "defaultValue": 2000
                }
            ]
        },
        {
            "active": true,
            "description": "uni25",
            "expression": "true",
            "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
            "filters": [
                {
                    "entityType": "STORE",
                    "entityIds": [
                      50679757,50679770
                    ]
                }
            ],
            "name": "t2656",
            "targetEntity": "TRANSACTION",
            "enrolmentMethod": "TRANSACTION",
            "targetType": "SALES",
            "defaultValues": [
                {
                    "defaultValue": 2000
                }
            ]
        },
        {
            "active": true,
            "description": "uni35",
            "expression": "currentTxn.value<1000",
            "expressionJson": "{\"arity\":\"binary_operation\",\"value\":\"<\",\"type\":\"boolean:primitive\",\"operands\":[{\"arity\":\"object_dereference\",\"type\":\"real:object:primitive\",\"operands\":[{\"arity\":\"name\",\"value\":\"currentTxn\",\"type\":\"tx:object:primitive\"},{\"arity\":\"name\",\"value\":\"value\",\"type\":\"real:object:primitive\"}]},{\"arity\":\"literal\",\"value\":\"1000\",\"type\":\"number:primitive\"}]}",
            "filters": [
                {
                    "entityType": "STORE",
                    "entityIds": [
                      50679757,50679770
                    ]
                }
            ],
            "name": "t344",
            "targetEntity": "TRANSACTION",
            "enrolmentMethod": "TRANSACTION",
            "targetType": "SALES",
            "defaultValues": [
                {
                    "defaultValue": 2000
                }
            ]
        }
    ],
    "combinationType": "ALL"
}
{
    "active": true,
    "description": "unified group",
    "fromDate": "2023-09-25T13:45:12.063",
    "name": "demo-unified3",
    "preferredTillId": 50679771,
    "toDate": "2024-10-31T08:41:00.529Z",
    "trackingType": "UNIFIED",
    "totalPeriods": 1,
    "frequency": 0,
    "recurringCycles": 0,
    "periods": [
        {
            "active": true,
            "description": "p1",
            "endDate": "2023-10-31T23:45:12.063",
            "periodStatus": "RUNNING",
            "refCode": "period44",
            "startDate": "2023-09-25T13:45:12.063"
        }
    ],
    "targets": [
        {
            "active": true,
            "description": "uni15",
            "expression": "currentTxn.value>500",
            "expressionJson": "{\"arity\":\"binary_operation\",\"value\":\">\",\"type\":\"boolean:primitive\",\"operands\":[{\"arity\":\"object_dereference\",\"type\":\"real:object:primitive\",\"operands\":[{\"arity\":\"name\",\"value\":\"currentTxn\",\"type\":\"tx:object:primitive\"},{\"arity\":\"name\",\"value\":\"value\",\"type\":\"real:object:primitive\"}]},{\"arity\":\"literal\",\"value\":\"500\",\"type\":\"number:primitive\"}]}",
            "filters": [
                {
                    "entityType": "STORE",
                    "entityIds": [
                        50679757,50679770
                    ]
                }
            ],
            "name": "T790",
            "targetEntity": "TRANSACTION",
            "enrolmentMethod": "TRANSACTION",            
            "targetType": "SALES",
            "defaultValues": [
                {
                    "defaultValue": 2000
                }
            ]
        },
        {
            "active": true,
            "description": "uni25",
            "expression": "true",
            "expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
            "filters": [
                {
                    "entityType": "STORE",
                    "entityIds": [
                      50679757,50679770
                    ]
                }
            ],
            "name": "T423",
            "targetEntity": "TRANSACTION",
            "enrolmentMethod": "TRANSACTION",
            "targetType": "SALES",
            "defaultValues": [
                {
                    "defaultValue": 2000
                }
            ]
        },
        {
            "active": true,
            "description": "uni35",
            "expression": "currentTxn.value<1000",
            "expressionJson": "{\"arity\":\"binary_operation\",\"value\":\"<\",\"type\":\"boolean:primitive\",\"operands\":[{\"arity\":\"object_dereference\",\"type\":\"real:object:primitive\",\"operands\":[{\"arity\":\"name\",\"value\":\"currentTxn\",\"type\":\"tx:object:primitive\"},{\"arity\":\"name\",\"value\":\"value\",\"type\":\"real:object:primitive\"}]},{\"arity\":\"literal\",\"value\":\"1000\",\"type\":\"number:primitive\"}]}",
            "filters": [
                {
                    "entityType": "STORE",
                    "entityIds": [
                      50679757,50679770
                    ]
                }
            ],
            "name": "T980",
            "targetEntity": "TRANSACTION",
            "enrolmentMethod": "TRANSACTION",
            "targetType": "SALES",
            "defaultValues": [
                {
                    "defaultValue": 2000
                }
            ]
        }
    ],
    "combinationType": "ANY"
}
{
    "data": {
        "id": 1780,
        "name": "UnifiedTarget",
        "active": true,
        "preferredTillId": 50713807,
        "periods": [
            {
                "id": 10341,
                "attribution": {
                    "createdOn": "2025-02-06T08:57:11.000+0000",
                    "lastUpdatedOn": "2025-02-06T08:57:11.000+0000",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman_doc",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman_doc",
                        "type": "TILL"
                    }
                },
                "startDate": "2024-12-25",
                "endDate": "2025-01-24",
                "refCode": "Cycle_1111",
                "periodStatus": "ENDED",
                "targetGroupId": 1780,
                "description": "p1",
                "active": true
            }
        ],
        "totalPeriods": 1,
        "description": "Unified-TG",
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "recurringCycles": 0,
        "frequency": 0,
        "targetCycleStartDate": "2024-12-24T18:30:00.000Z",
        "targetCycleEndDate": "2025-02-25T18:29:59.999Z",
        "frequencyType": "MONTHLY",
        "trackingType": "UNIFIED",
        "targets": [
            {
                "id": 2042,
                "attribution": {
                    "createdOn": "2025-02-06T08:57:11.153+0000",
                    "lastUpdatedOn": "2025-02-06T08:57:11.153+0000",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman_doc",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman_doc",
                        "type": "TILL"
                    }
                },
                "name": "TransactionTarget",
                "emfRuleSetId": 126376826,
                "targetType": "SALES",
                "targetEntity": "TRANSACTION",
                "eventName": "TransactionAdd",
                "targetGroupId": 1780,
                "description": "uni35",
                "active": true,
                "expression": "currentTxn.value<1001",
                "expressionJson": "{\"arity\":\"binary_operation\",\"value\":\"<\",\"type\":\"boolean:primitive\",\"operands\":[{\"arity\":\"object_dereference\",\"type\":\"real:object:primitive\",\"operands\":[{\"arity\":\"name\",\"value\":\"currentTxn\",\"type\":\"tx:object:primitive\"},{\"arity\":\"name\",\"value\":\"value\",\"type\":\"real:object:primitive\"}]},{\"arity\":\"literal\",\"value\":\"1001\",\"type\":\"number:primitive\"}]}",
                "enrolmentMethod": "TRANSACTION",
                "defaultValues": [
                    {
                        "id": 13479,
                        "periodId": 10341,
                        "defaultValue": 2000.000
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "10341": {
                        "id": 13479,
                        "periodId": 10341,
                        "defaultValue": 2000.000
                    }
                }
            },
            {
                "id": 2043,
                "attribution": {
                    "createdOn": "2025-02-06T08:57:11.153+0000",
                    "lastUpdatedOn": "2025-02-06T08:57:11.153+0000",
                    "lastUpdatedBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman_doc",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 75152721,
                        "code": "naman_doc",
                        "description": "",
                        "name": "naman_doc",
                        "type": "TILL"
                    }
                },
                "name": "BehavioralTarget",
                "emfRuleSetId": 126376827,
                "targetType": "COUNT",
                "targetEntity": "EVENT",
                "eventName": "CustomerUpdate",
                "targetGroupId": 1780,
                "description": "unified-TG-custUpdateCount2",
                "active": true,
                "expression": "true",
                "expressionJson": "\n{\n  \"arity\":\"literal\",\n  \"value\":\"true\",\n  \"type\":\"boolean:primitive\"\n}",
                "filters": [],
                "enrolmentMethod": "TRANSACTION",
                "defaultValues": [
                    {
                        "id": 13480,
                        "periodId": 10341,
                        "defaultValue": 2.000
                    }
                ],
                "targetPeriodDefaultValuesMap": {
                    "10341": {
                        "id": 13480,
                        "periodId": 10341,
                        "defaultValue": 2.000
                    }
                }
            }
        ],
        "combinationType": "ALL",
        "unifiedTargetExpression": {
            "aggregation": "SUM",
            "thresholdValue": 2002,
            "ruleExpression": "(2042 & 2043)"
        },
        "leaderboardEnabled": false,
        "userCreated": false
    },
    "errors": null,
    "warnings": null
}
{
   "name": "UnifiedTarget",
   "description": "",
   "active": true,
   "trackingType": "UNIFIED",
   "preferredTillId": 50713807,
   "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
   "targetCycleStartDate": "2024-12-24T18:30:00.000Z",
   "targetCycleEndDate": "2025-02-25T18:29:59.999Z",
   "leaderboardEnabled": false,
   "totalPeriods": 1,
   "frequencyType": "MONTHLY",
   "frequency": 0,
   "recurringCycles": 0,
   "periods": [
     {
       "refCode": "Cycle_1111",
       "startDate": "2024-12-25",
       "endDate": "2025-01-24",
       "active": true,
       "description": "p1",
       "periodStatus": "RUNNING"
     }
   ],
 "targets": [
       {
   "expression": "true",
   "expressionJson": "\n{\n  \"arity\":\"literal\",\n  \"value\":\"true\",\n  \"type\":\"boolean:primitive\"\n}",
   "filters": [],
   "eventName": "event2",
   "name": "visit_target",
   "targetType": "VISIT",
   "targetEntity": "EVENT",
   "defaultValues": [
       {
       "defaultValue": "2"
       }
   ],
   "enrolmentMethod": "TRANSACTION",
   "description": "unified-TG-BE-VISIT1"
   },
   {
     "eventName": "event",
     "name": "sum_target",
     "targetType": "EVENT_ATTRIBUTE",
     "targetEntity": "EVENT",
     "expression": "true",
     "expressionJson": "\n{\n  \"arity\":\"literal\",\n  \"value\":\"true\",\n  \"type\":\"boolean:primitive\"\n}",
     "filters": [],
     "defaultValues": [
       {
         "defaultValue": "4"
       }
     ],
     "extendedFieldInfo": {
                "name": "steps",
                "aggregateFunction": "SUM"
    },
     "enrolmentMethod": "TRANSACTION",
     "description": "unified-TG-BE-SUM22"
   }
 ],
   "combinationType": "ALL",
   "unifiedTargetExpression":{
       "aggregation":"SUM",
       "thresholdValue":6
   }
}
{
    "data": {
        "id": 6104,
        "name": "demo-unified1",
        "fromDate": "2023-09-25",
        "toDate": "2024-10-31",
        "active": true,
        "preferredTillId": 50679771,
        "periods": [
            {
                "id": 6883,
                "attribution": {
                    "createdOn": "2023-09-25T17:26:26.320+0530",
                    "lastUpdatedOn": "2023-09-25T17:26:26.320+0530",
                    "lastUpdatedBy": {
                        "id": 50679771,
                        "code": "walmart_1",
                        "description": "",
                        "name": "walmart_1",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 50679771,
                        "code": "walmart_1",
                        "description": "",
                        "name": "walmart_1",
                        "type": "TILL"
                    }
                },
                "startDate": "2023-09-25",
                "endDate": "2023-10-31",
                "refCode": "period44",
                "periodStatus": "RUNNING",
                "targetGroupId": 6104,
                "description": "p1",
                "active": true
            }
        ],
        "totalPeriods": 1,
        "description": "unified group",
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "recurringCycles": 0,
        "frequency": 0,
        "targetCycleStartDate": "2023-09-25T00:00:00.000Z",
        "targetCycleEndDate": "2023-10-31T23:59:59.000Z",
        "trackingType": "UNIFIED",
        "targets": [
            {
                "id": 9107,
                "attribution": {
                    "createdOn": "2023-09-25T17:26:26.340+0530",
                    "lastUpdatedOn": "2023-09-25T17:26:26.340+0530",
                    "lastUpdatedBy": {
                        "id": 50679771,
                        "code": "walmart_1",
                        "description": "",
                        "name": "walmart_1",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 50679771,
                        "code": "walmart_1",
                        "description": "",
                        "name": "walmart_1",
                        "type": "TILL"
                    }
                },
                "name": "t4",
                "emfRuleSetId": 1246740,
                "targetType": "SALES",
                "targetEntity": "TRANSACTION",
                "targetGroupId": 6104,
                "description": "uni15",
                "active": true,
                "expression": "currentTxn.value>500",
                "expressionJson": "{\"arity\":\"binary_operation\",\"value\":\">\",\"type\":\"boolean:primitive\",\"operands\":[{\"arity\":\"object_dereference\",\"type\":\"real:object:primitive\",\"operands\":[{\"arity\":\"name\",\"value\":\"currentTxn\",\"type\":\"tx:object:primitive\"},{\"arity\":\"name\",\"value\":\"value\",\"type\":\"real:object:primitive\"}]},{\"arity\":\"literal\",\"value\":\"500\",\"type\":\"number:primitive\"}]}",
                "filters": [
                    {
                        "entityType": "STORE",
                        "entityIds": [
                            50679757,
                            50679770
                        ]
                    }
                ],
                "enrolmentMethod": "TRANSACTION",
                "defaultValues": [
                    {
                        "id": 10123,
                        "periodId": 6883,
                        "defaultValue": 2000
                    }
                ]
            }
        ],
        "combinationType": "ALL",
        "unifiedTargetExpression": {
            "aggregation": "SUM",
            "thresholdValue": 5000,
            "ruleExpression": "(9107 & 9108 & 9109)"
        }
    },
    "errors": null,
    "warnings": null
}

Response parameters

ParameterData TypeDescription
dataObjectThe main object containing all the details.
.idIntegerThe unique identifier for the target.
.nameStringThe name of the target.
.fromDateStringThe start date for the target.
.toDateStringThe end date for the target.
.activeBooleanIndicates whether the target is active.
.preferredTillIdIntegerA unique identifier of the till.
.periodsArrayAn array of period objects detailing specific periods within the target.
..idIntegerThe unique identifier for each target.
..attributionObjectAn object containing attribution details for the target.
...createdOnStringThe creation timestamp of the target.
Note: This field will be deprecated in the future and is being replaced by createdOnISO.
...createdOnISOString

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

...lastUpdatedOnStringThe last update timestamp of the target.
Note: This field will be deprecated in the future and is being replaced by lastUpdatedOnISO.
...lastUpdatedOnISOString

Indicates the last updated date and time of the target period 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.

...createdByObjectAn object containing details about who created the target.
..startDateStringThe start date of the target.
..endDateStringThe end date of the target.
..refCodeStringA reference code for the period.
..periodStatusStringThe status of the target (e.g., "RUNNING").
..targetGroupIdIntegerThe ID of the target group associated with the target.
..descriptionStringA brief description of the target.
..activeBooleanIndicates whether the period is active.
totalPeriodsIntegerThe total number of periods within the target.
targetCycleStartDateStringStart date of the target cycle in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format.
Note: This field will be deprecated in the future and is being replaced by targetCycleStartDateISO.
targetCycleEndDateStringEnd date of the target cycle in ISO 8601 YYYY-MM-DDTHH:mm:ss.SSS format.
Note: This field will be deprecated in the future and is being replaced by targetCycleEndDateISO.
targetCycleStartDateISOString

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

targetCycleEndDateISOString

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

frequencyIntegerThe frequency of the target.
targetCycleStartDateStringThe start date of the target cycle.
targetCycleEndDateStringThe end date of the target cycle.
trackingTypeStringDefines the type of activity tracking in the target. Possible values: UNIFIED, DEFAULT, STREAKS, CAPPING.
targetsArrayAn array of target objects detailing specific targets.
.idIntegerThe unique identifier for each target.
.attributionObjectAn object containing attribution details for the target.
.nameStringThe name of the target.
.emfRuleSetIdIntegerThe ID of the rule set associated with the target.
.targetTypeStringThe type of target.
.targetEntityStringEntity to define target condition. Possible values: TRANSACTION, LINEITEM, POINTS.
.targetGroupIdIntegerThe ID of the target group associated with the target.
.descriptionStringA brief description of the target.
.activeBooleanIndicates whether the target is active.
.expressionStringA textual representation of the target's condition or rule.
.expressionJsonStringA JSON string representing the logical structure of the target's condition or rule.
.filtersArrayAn array of filter objects applied to the target.
.enrolmentMethodStringMethod to enroll customers and add target values. Possible values: TRANSACTION (enroll loyalty customers who transact during the target period), IMPORT (to import a list of customers with custom target value).
.defaultValuesArrayAn array of objects specifying default values, likely for some calculations or thresholds.
..idIntegerThe unique identifier for each default value.
..periodIdIntegerThe ID of the period associated with the default value.
..defaultValueDoubleA default value used within the target's context.
combinationTypeStringA logical operator between the specified targets. Possible values: ANY (If any 1 target needs to be achieved) and ALL (All the targets in a unified target group need to be achieved).
unifiedTargetExpressionObjectAn object representing a unified expression for target evaluation.
.aggregationStringThe type of aggregation used in the unified target expression (e.g., "SUM").
.thresholdValueIntegerThe threshold value used in the unified target expression for evaluation.
.ruleExpressionStringA string representing the rule expression in the unified target expression.
leaderboardEnabledBooleanIndicates if the leaderboard feature is enabled.
userCreatedBooleanIndicates if the target is a user-created target.
timezoneNameStringIANA time zone name for
the target group; defaults
to system time zone when
omitted.
errorsnull or ObjectContains error details if any occurred during the API request.
warningsnull or ObjectContains warning details if any occurred during the API request.

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
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