| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
This API is being phased out and will no longer be available for viewing milestones.To view milestones, use the Get Details of all Loyalty Promotions API
This API fetches target group information. Enter a target group ID to get details of a specific target.
API endpoint example
'https://eu.api.capillarytech.com/v3/targetGroups?includeUserCreatedTargetGroups=true&includeOnlyActive=true
Prerequisites
-
Basic or OAuth authentication
-
Default access group
API Specification
| URI | v3/targetGroups |
| HTTP Method | GET |
| Pagination | No |
| Batch support | No |
| Rate limit information | None |
Request path parameters
| Parameter Name | Data Type | Description |
|---|---|---|
| targetGroupId | Long | Group ID of the target to retrieve |
Request query parameters
| Parameter Name | Data Type | Description |
|---|---|---|
| includePeriods | Boolean | Include the period information associated with the target. <br>The period object contains information on the start date, end date and current status of the target. |
| includeUserCreatedTargetGroups | Boolean | Include the user created target groups in the response. This value is false by default. |
| includeOnlyActive | Boolean | Include only targets that are currently active. |
Response body
{
"data": [
{
"id": 2711,
"attribution": {
"createdOn": "2025-07-23T07:18:01.000+0000",
"createdOnISO": "2025-07-23T07:18:01Z",
"lastUpdatedOn": "2025-07-23T07:18:01.000+0000",
"lastUpdatedOnISO": "2025-07-23T07:18:01Z",
"lastUpdatedBy": {
"id": 75155292,
"code": "1736163452_",
"description": "",
"name": "Tom Sawyer",
"type": "ADMIN_USER"
},
"createdBy": {
"id": 75155292,
"code": "1736163452_",
"description": "",
"name": "Tom Sawyer",
"type": "ADMIN_USER"
}
},
"name": "Test Milestone UAT 23 July",
"emfRuleSetId": 126421625,
"targetType": "SALES",
"targetEntity": "TRANSACTION",
"eventName": "TransactionAdd",
"targetGroupId": 2514,
"description": "Test Milestone UAT 23 July Update 2",
"active": false,
"expression": "true",
"expressionJson": "\n{\n \"arity\":\"literal\",\n \"value\":\"true\",\n \"type\":\"boolean:primitive\"\n}",
"filters": [],
"enrolmentMethod": "TRANSACTION",
"defaultValues": [
{
"id": 125985,
"periodId": 29318,
"defaultValue": 2000.000
},
{
"id": 125986,
"periodId": 29319,
"defaultValue": 2000.000
},
{
"id": 125987,
"periodId": 29320,
"defaultValue": 2000.000
},
{
"id": 125988,
"periodId": 29321,
"defaultValue": 2000.000
},
{
"id": 125989,
"periodId": 29322,
"defaultValue": 2000.000
},
{
"id": 125990,
"periodId": 29323,
"defaultValue": 2000.000
},
{
"id": 125991,
"periodId": 29324,
"defaultValue": 2000.000
},
{
"id": 125992,
"periodId": 29325,
"defaultValue": 2000.000
},
{
"id": 125993,
"periodId": 29326,
"defaultValue": 2000.000
}
],
"targetPeriodDefaultValuesMap": {
"29318": {
"id": 125985,
"periodId": 29318,
"defaultValue": 2000.000
},
"29319": {
"id": 125986,
"periodId": 29319,
"defaultValue": 2000.000
},
"29320": {
"id": 125987,
"periodId": 29320,
"defaultValue": 2000.000
},
"29321": {
"id": 125988,
"periodId": 29321,
"defaultValue": 2000.000
},
"29322": {
"id": 125989,
"periodId": 29322,
"defaultValue": 2000.000
},
"29323": {
"id": 125990,
"periodId": 29323,
"defaultValue": 2000.000
},
"29324": {
"id": 125991,
"periodId": 29324,
"defaultValue": 2000.000
},
"29325": {
"id": 125992,
"periodId": 29325,
"defaultValue": 2000.000
},
"29326": {
"id": 125993,
"periodId": 29326,
"defaultValue": 2000.000
}
},
"targetMilestoneTriggers": [
{
"id": 418,
"triggerName": "Sub target 1",
"isActive": true,
"triggerType": "CUSTOM_TRIGGER",
"triggerValueType": "PERCENTAGE",
"triggerValue": 50.000,
"targetRuleId": 2711
}
]
}
],
"errors": null,
"warnings": null
}{
"data": [
{
"id": 39536,
"attribution": {
"createdOn": "2025-07-23T07:18:01.000+0000",
"createdOnISO": "2025-07-23T07:18:01Z",
"lastUpdatedOn": "2025-07-23T07:18:01.000+0000",
"lastUpdatedOnISO": "2025-07-23T07:18:01Z",
"lastUpdatedBy": {
"id": 50691660,
"code": "adm01",
"description": "",
"name": "adm01",
"type": "TILL"
},
"createdBy": {
"id": 50691660,
"code": "adm01",
"description": "",
"name": "adm01",
"type": "TILL"
}
},
"name": "Fixed Window Milestone Group 1724657937",
"active": true,
"preferredTillId": 50692189,
"activePeriod": {
"id": 55434,
"attribution": {
"createdOn": "2024-08-26T12:50:11.000+0530",
"lastUpdatedOn": "2024-08-26T12:50:11.000+0530",
"lastUpdatedBy": {
"id": 50691660,
"code": "adm01",
"description": "",
"name": "adm01",
"type": "TILL"
},
"createdBy": {
"id": 50691660,
"code": "adm01",
"description": "",
"name": "adm01",
"type": "TILL"
}
},
"startDate": "2024-08-20",
"endDate": "2024-09-19",
"refCode": "TP1",
"periodStatus": "RUNNING",
"targetGroupId": 39536,
"active": true
},
"totalPeriods": 2,
"description": "test via postman",
"targetEvaluationType": "FIXED_CALENDAR_WINDOW",
"recurringCycles": -1,
"frequency": 0,
"targetCycleStartDate": "2024-08-20T08:42:01.000Z",
"targetCycleEndDate": "2024-10-20T08:42:01.000Z",
"frequencyType": "MONTHLY",
"trackingType": "DEFAULT",
"createdOn": 1724657938000,
"targets": [
{
"id": 71087,
"attribution": {
"createdOn": "2024-08-26T12:50:11.000+0530",
"lastUpdatedOn": "2024-08-26T12:50:11.000+0530",
"lastUpdatedBy": {
"id": 50691660,
"code": "adm01",
"description": "",
"name": "adm01",
"type": "TILL"
},
"createdBy": {
"id": 50691660,
"code": "adm01",
"description": "",
"name": "adm01",
"type": "TILL"
}
},
"name": "target-2024-08-26T07:20:09.894Z",
"emfRuleSetId": 1334912,
"targetType": "COUNT",
"targetEntity": "EVENT",
"eventName": "TransactionAdd",
"targetGroupId": 39536,
"description": "targetf",
"active": true,
"expression": "true",
"expressionJson": "{\"arity\":\"literal\",\"value\":\"true\",\"type\":\"boolean:primitive\"}",
"enrolmentMethod": "IMPORT",
"defaultValues": [
{
"id": 96664,
"periodId": 55434,
"defaultValue": 500
},
{
"id": 96665,
"periodId": 55435,
"defaultValue": 500
}
],
"targetPeriodDefaultValuesMap": {
"55434": {
"id": 96664,
"periodId": 55434,
"defaultValue": 500
},
"55435": {
"id": 96665,
"periodId": 55435,
"defaultValue": 500
}
},
"extendedFieldInfo": {
"name": "cartId",
"aggregateFunction": "SUM",
"aggregateWindow": null
},
"targetMilestoneTriggers": []
}
],
"userCreated": true
}
],
"errors": null,
"warnings": null
}Response parameters
| Parameter | Type | Description |
|---|---|---|
| data | Array | List of objects containing the main data payload. |
| data[].id | Integer | Unique identifier for the record. |
| data[].attribution | Object | Metadata about the creation and updates of the record. |
| attribution.createdOn | String | Timestamp when the record was created (ISO 8601 format). Note: This field will be deprecated in the future and is being replaced by |
| attribution.createdOnISO | String | Indicates the creation date and time of the target in ISO 8601 format, returned in the server timezone. EU server example India server example Note: The response timezone always matches the server timezone, regardless of the timezone offset in the request. |
| attribution.lastUpdatedOn | String | Timestamp when the record was last updated. (ISO 8601 format). Note: This field will be deprecated in the future and is being replaced by |
| attribution.lastUpdatedOnISO | String | Indicates the date and time of when the record was last updated in ISO 8601 format, returned in the server timezone. EU server example India server example Note: The response timezone always matches the server timezone, regardless of the timezone offset in the request. |
| attribution.lastUpdatedBy | Object | Details of the user who last updated the record. |
| lastUpdatedBy.id | Integer | Unique identifier of the user. |
| lastUpdatedBy.code | String | Code associated with the user. |
| lastUpdatedBy.description | String | Description of the user (empty in this case). |
| lastUpdatedBy.name | String | Name of the user. |
| lastUpdatedBy.type | String | Type of the user (e.g., "TILL"). |
| attribution.createdBy | Object | Details of the user who created the record (same structure as lastUpdatedBy). |
| data[].name | String | Name of the target group (e.g., "uat_target_group_32"). |
| data[].emfRuleSetId | Integer | Identifier for the EMF rule set. |
| data[].targetType | String | Type of target (e.g., "ALL"). |
| data[].targetEntity | String | Entity targeted (e.g., "TRANSACTION"). |
| data[].eventName | String | Name of the event (e.g., "TransactionAdd"). |
| data[].targetGroupId | Integer | Identifier for the target group. |
| data[].description | String | Description of the target group (empty in this case). |
| data[].active | Boolean | Indicates whether the target group is active. |
| data[].expression | String | Logical expression for the target group (e.g., "true"). |
| data[].expressionJson | String | JSON representation of the expression. |
| data[].filters | Array | List of filters applied (empty in this case). |
| data[].enrolmentMethod | String | Method of enrolment (e.g., "IMPORT"). |
| data[].defaultValues | Array | List of default values for the target group. |
| defaultValues[].id | Integer | Unique identifier for the default value. |
| defaultValues[].periodId | Integer | Identifier for the period associated with the default value. |
| defaultValues[].defaultValue | Float | Default value for the period. |
| data[].targetPeriodDefaultValuesMap | Object | Mapping of period IDs to their default values. |
| targetPeriodDefaultValuesMap.<periodId> | Object | Details of the default value for the specified period. |
| <periodId>.id | Integer | Unique identifier for the default value. |
| <periodId>.periodId | Integer | Identifier for the period. |
| <periodId>.defaultValue | Float | Default value for the period. |
| data[].targetMilestoneTriggers | Array | List of milestone triggers (empty in this case). |
| data[].extendedFieldInfo | Object | Additional information about the extended field. |
| extendedFieldInfo.name | String | Name of the extended field (e.g., "points"). |
| extendedFieldInfo.aggregateFunction | String | Aggregation function for the field (e.g., "SUM"). |
