v1
latestOpenAPI 3.0.12026-07-24501176.6 MBGet Associated Target Groups of a User
get/api_gateway/intouch-api-v3/v3.1/users/{userId}/targetGroups
Path parameters
userIdinteger required
The userId represents the unique identifier of a user. It allows you to retrieve the target groups associated with a specific user.
Query parameters
includeInactiveboolean
.Set true for fetching user target for all periods, both active and inactive.
targetRuleIdinteger
The ID of the target rule set for the target group.
includeInactiveTargetsboolean
Set true to fetch all inactive targets of the user.
Headers
Authorizationstring
X-CAP-API-AUTH-KEYstring
X-CAP-API-AUTH-ORG-IDstring
X-CAP-API-OAUTH-TOKENstring
DATA-SCOPE-ORGstring
List of Organization IDs
DATA-SCOPEstring required
The scope to authorize access (SELF, OTHER, ALL)
Response
200
Example response
{
"data": {
"userId": 347286146,
"customer": {
"id": 347286146,
"profiles": [
{
"firstName": "919111122111",
"lastName": "919111122111",
"commChannels": [
{
"type": "email",
"value": "tom.sawyer@capillarytech.com"
}
],
"source": "instore",
"userId": 347286146,
"orgSourceId": -1
}
],
"loyaltyInfo": {
"attribution": {
"createdOn": "2024-08-27T09:35:24.000+0000",
"lastUpdatedOn": "2024-08-27T09:43:41.000+0000",
"lastUpdatedBy": {
"id": 50150886
},
"createdBy": {
"id": 50150886
}
},
"loyaltyType": "loyalty",
"lifetimePurchases": 2400
}
},
"targetGroups": [
{
"id": 33008,
"attribution": {
"createdOn": "2024-04-30T13:15:44.000+0000",
"lastUpdatedOn": "2024-04-30T13:15:44.000+0000",
"lastUpdatedBy": {
"id": 4,
"code": "First",
"name": "First User",
"type": "ADMIN_USER"
},
"createdBy": {
"id": 4,
"code": "First",
"name": "First User",
"type": "ADMIN_USER"
}
},
"name": "Ac test",
"orgId": 50363,
"preferredTillId": 50150886,
"targets": [
{
"periodId": 38375,
"periodRefCode": "Cycle_1",
"periodStartDate": "2024-04-30",
"periodEndDate": "2024-05-29",
"targetValue": 1000,
"targetName": "Ac test",
"targetType": "GROSS_SALES",
"targetEntity": "TRANSACTION",
"targetRuleId": 72389,
"enrolledOn": "2024-08-30T09:21:43.741+0000",
"eventName": "TransactionAdd",
"periodStartDateWithTimeStamp": "2024-04-30T00:00:00.000Z",
"periodEndDateWithTimeStamp": "2024-05-29T23:59:59.000Z"
}
],
"targetEvaluationType": "FIXED_CALENDAR_WINDOW",
"trackingType": "DEFAULT"
}
]
}
}