Get Associated Target Groups of a User

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 viewing milestones.

To view milestones, use the Get Details of all Loyalty Promotions API


This API allows you to retrieve the details of all the associated target groups, including the user's milestones and streaks information.

Example request

curl -L 'https://eu.api.capillarytech.com/v3/users/566881933/targetGroups?includeInactive=false&includeInactiveTargets=true' \
-H 'accept: application/json' \
-H 'Authorization: Basic ZlY2I2MmEy' \
-H 'Cookie: _cfuvid=PpS3d6N1f2XHgo9E2Fin5S1dxPYBnakQ8AGtPMQSym0-1763623399034-0.0.1.1-604800000'

Prerequisites

  • Authentication; Basic or OAuth authentication details

  • Access group resource - NA

Resource information

URI/users/USERID/targetGroups
HTTP methodGET
Pagination supported?NO
Rate limitNA
Batch supportNA

Request path parameters

Parameter<br>(Parameters marked with * are mandatory)TypeDescription
userId*LongThe userId represents the unique identifier of a user. It allows you to retrieve the target groups associated with a specific user.

Request query parameters

Parameter (Parameters marked with * are mandatory)TypeDescription
includeInactiveBooleanThe includeInactive parameter determines whether the API response includes information about all cycles within a milestone or only the active cycle. <br> <br> False: The API response for the milestone will include information only about the current active cycle. For example, if there are four cycles (C1, C2, C3, and C4) in a milestone named ABC and the current cycle is C3, then setting includeInactive to false will return information only about cycle C3, where the user has performed an activity. True: The API response for the milestone will include information about all cycles, both active and inactive. In the same example, setting includeInactive to true will return information about all four cycles (C1, C2, C3, and C4) within the milestone ABC.
targetRuleIdLongRule ID of the target. It can be either targetId or targetGroupId Use this to fetch information about a particular target in the API response.
includeInactiveTargetsBooleanThe includeInactiveTargets parameter determines whether the API response includes information about all milestones or only the active ones. <br> <br> False: The API response will include information on all active milestones. For example: If there are four milestones (M1, M2, M3, M4) and milestone M1 is deactivated, then setting includeInactiveTargets to false will return information only about milestones M2, M3, and M4. <br> <br> True: The API response for milestones will include information about ALL the milestones present in the organization.

Response Parameters

ParameterData TypeDescription
userIdLongThe unique identifier of the customer.
customerObjectAn object containing information about customer.
-idIntegerThe unique identifier of the customer.
-profilesArray of objectsAn array containing profiles details of the customer
--firstNameStringThe first name of the customer.
--lastNameStringThe last name of the customer.
--commChannelsArray of objectsAn array containing communication information of the customer.
---typeStringThe type of communication channel from which we connect to customer. (e.g., mobile, email).
---accountIdEnumFor sources that support multiple accounts, For example, FACEBOOK, WEB_ENGAGE, WECHAT, MOBILE_APP.
---valueStringThe value of the communication channel (e.g., phone number, email address).
---primaryBooleanthis indicates that the above channel is primary or not
---verifiedBooleanIndicates if the communication channel has been verified.
---subscribedBooleanPass true if the identifier is subscribed for the org's newsletters (bulk messages).
---attributesObjectAdditional Details of the identifier.
--sourceStringThe source from which the customer profile was created (e.g., instore).
--accountIdStringThe account ID of the customer .
--userIdIntegerThe unique identifier for the customer.
--orgSourceIdIntegerThe organization source ID for the customer.
-loyaltyInfoObjectContaining loyalty information of the customer.
--attributionObjectContaining attribution information for the loyalty information.
---createdOnString

The date and time when the loyalty information was created.

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 in ISO 8601 format, returned in the server's 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.

---lastUpdatedOnString

The date and time when the loyalty information was last updated.

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

---lastUpdatedByObjectThe information about the user who last updated the loyalty information.
----idIntegerThe unique identifier for the user who last updated the loyalty information.
----codeNullThe code associated with the last updated user.
----descriptionStringThe description of the last update.
----nameNullName of the user last updated.
----typeEnumType of the customer identifier.
---createdByObjectContaining information about the user who created the loyalty information.
----idIntegerThe unique identifier for the user who created the loyalty information.
----codeNullThe code associated with the last updated user.
----descriptionStringThe description about the last update.
----nameNullName of the user last updated.
----typeEnumType of the customer identifier.
--loyaltyTypeStringThe type of loyalty program.
--lifetimePurchasesFloatThe total amount of purchases made by the customer in his entire lifetime.
-customFieldsObjectContaining custom fields of the customer.
--genderStringThe gender of the customer.
targetGroupsArray of objectsContaining information about target groups associated with customer.
-idIntegerThe unique identifier for the target group.
-attributionObjectContaining attribution information for the target group.
--createdOnString

The date and time when the target group was created.

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 group in ISO 8601 format, returned in the server's 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.

--lastUpdatedOnString

The date and time when the target group was last updated.

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 group in ISO 8601 format, returned in the server's 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.

---idIntegerThe unique identifier for the user who last updated the target group.
---codeStringThe code associated with the user who last updated the target group.
---descriptionStringThe description associated with the user who last updated the target group.
---nameStringThe name of the user who last updated the target group.
---typeStringThe type of the user who last updated the target group like ADMIN_USER.
--createdByObjectContaining information about the user who created the target group.
---idIntegerThe unique identifier for the user who created the target group.
---codeStringThe code associated with the user who created the target group.
---descriptionStringThe description of the user who created the target group.
---nameStringThe name of the user who created the target group.
---typeStringThe type of the user who created the target group like ADMIN_USER.
-targetsArray of objectsContaining information about targets within the target group.
--targetIdIntegerThe unique identifier for the target.
--periodIdIntegerThe unique identifier for the period.
--programIdIntegerThe unique identifier for the program
--alternateCurrencyIdentifierStringThe unique identifier of the alternate currency that is generated when creating an alternate currency.
--alternateCurrencyNameStringThe unique name of the alternate currency.
--periodRefCodeStingThe reference code for the period of the target.
--periodStartDateStringThe start date of the period for the target.
--periodEndDateStringThe end date of the period for the target.
--targetValueFloatThe target value to be achieved.
--targetAchievedValueFloatThe value achieved towards the target.
--targetAchievedDateTimeString

The date when the customer achieved the target. The value is null if the target is unachieved.

Note: This field will be deprecated in the future and is being replaced by targetAchievedDateTimeISO.

--targetAchievedDateTimeISOString

Indicates the date when the customer achieved the target in ISO 8601 format, returned in the server's 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)

Notes:
  • The response time zone always matches the server time zone, regardless of the time zone offset in the request.
  • This value is null if the target is unachieved.
--targetEntityEnumThe KPI on which the target is tracked. TRANSACTION, LINEITEM, EVENT, REWARDS, ALTERNATE_CURRENCIES. Refer to this API documentation for more information.
--targetRuleIdIntegerThe rule identifier for the target.
--enrolledOnString

The date and time when the user is enrolled in the target.

Note: This field will be deprecated in the future and is being replaced by enrolledOnISO.

--enrolledOnISOString

Indicates the date and time when the user is enrolled in the target, in ISO 8601 format, returned in the server's 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.

--eventNameStringThe name of the event associated with the target.
--periodStartDateWithTimeStampString

The start date and time of the period associated with the target rule.

Note: This field will be deprecated in the future and is being replaced by periodStartDateWithTimeStampISO.

--periodEndDateWithTimeStampString

The end date and time of the period associated with the target rule.

Note: This field will be deprecated in the future and is being replaced by periodEndDateWithTimeStampISO.

--periodStartDateWithTimeStampISOString

Indicates the start date and time of the period associated with the target in ISO 8601 format, returned in the server's 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.

--periodEndDateWithTimeStampISOString

Indicates the end date and time of the period associated with the target in ISO 8601 format, returned in the server's 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.

--streakAchievedDateTimeString

The achieved date and time of the period associated with the streak rule.

Note: This field will be deprecated in the future and is being replaced by streakAchievedDateTimeISO.

--streakAchievedDateTimeISOString

Indicates the date and time when a streak was achieved by the user in ISO 8601 format, returned in the server's 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.

--currentPeriodBooleanIndicates if the target is for the current period.
--milestonesArray of objectsContaining information about milestones for the target.
---idIntegerThe unique identifier for the milestone.
---triggerNameStringThe name of the trigger of the milestone.
---triggerValueFloatThe value of the trigger of the milestone.
---isAchievedBooleanIndicates if the milestone has been achieved.
---streaksArrayAn array of streaks for the target group.
----userStreakIdIntegerThe user streak ID.
----streakIdIntegerThe streak ID.
----streakNameStringThe name of the streak.
----statusStringThe status of the streak (For Example- ACHIEVED).
----currentCountIntegerThe current count of the streak.
----totalTargetCountOfSequenceIntegerThe total target count of the streak sequence.
----streakAchievedUserTargetIdStringThe ID of the streak achieved by the user.
-targetEvaluationTypeEnumThe type of evaluation for the target group : FIXED_CALENDAR_WINDOW CYCLIC_WINDOW PERIOD_AGNOSTIC_WINDOW Refer to this API documentation for more information.
-trackingTypeEnumThe type of target for tracking the created milestone: - Default - Unified - Streak - Capping -Non continuous streak Refer to this API documentation for more information.
errorsObjectError in the API call if any.
warningsObjectWarning in the API call if any.
{
    "data": {
        "userId": 566881933,
        "customer": {
            "id": 566881933,
            "profiles": [
                {
                    "firstName": "Tom",
                    "lastName": "Sawyer",
                    "commChannels": [
                        {
                            "type": "email",
                            "accountId": null,
                            "value": "[email protected]",
                            "primary": false,
                            "verified": false,
                            "subscribed": null,
                            "attributes": null
                        },
                        {
                            "type": "mobile",
                            "accountId": null,
                            "value": "1234512345",
                            "primary": false,
                            "verified": false,
                            "subscribed": null,
                            "attributes": null
                        }
                    ],
                    "source": "instore",
                    "accountId": "",
                    "userId": 566881933,
                    "orgSourceId": -1
                }
            ],
            "loyaltyInfo": {
                "attribution": {
                    "createdOn": "2025-02-28T06:15:10.000+0000",
                    "createdOnISO": "2025-02-28T06:15:10Z",
                    "lastUpdatedOn": "2025-11-20T04:56:36.000+0000",
                    "lastUpdatedOnISO": "2025-11-20T04:56:36Z",
                    "lastUpdatedBy": {
                        "id": 75197941,
                        "code": null,
                        "description": null,
                        "name": null,
                        "type": null
                    },
                    "createdBy": {
                        "id": 75155282,
                        "code": null,
                        "description": null,
                        "name": null,
                        "type": null
                    }
                },
                "loyaltyType": "loyalty",
                "lifetimePurchases": 212350.000
            },
            "customFields": {}
        },
        "targetGroups": [
            {
                "id": 2750,
                "attribution": {
                    "createdOn": "2025-11-11T10:36:23.000+0000",
                    "createdOnISO": "2025-11-11T10:36:23Z",
                    "lastUpdatedOn": "2025-11-11T10:36:23.000+0000",
                    "lastUpdatedOnISO": "2025-11-11T10:36:23Z",
                    "lastUpdatedBy": {
                        "id": 75160044,
                        "code": "1739864914683_",
                        "description": "",
                        "name": "madhurima ",
                        "type": "ADMIN_USER"
                    },
                    "createdBy": {
                        "id": 75160044,
                        "code": "1739864914683_",
                        "description": "",
                        "name": "john",
                        "type": "ADMIN_USER"
                    }
                },
                "name": "JUSTIN",
                "orgId": 100737,
                "preferredTillId": 75197372,
                "targets": [
                    {
                        "targetId": 97329731,
                        "periodId": 30015,
                        "programId": null,
                        "alternateCurrencyIdentifier": null,
                        "alternateCurrencyName": null,
                        "periodRefCode": "Cycle_1",
                        "periodStartDate": "2025-11-11",
                        "periodEndDate": "2025-12-10",
                        "targetValue": 10000.000,
                        "targetAchievedValue": 3000.000,
                        "targetName": "JUSTIN",
                        "targetType": "SALES",
                        "targetEntity": "TRANSACTION",
                        "targetRuleId": 2996,
                        "enrolledOn": "2025-11-12T09:51:10.000+0000",
                        "eventName": "TransactionAdd",
                        "periodStartDateWithTimeStamp": "2025-11-11T00:00:00.000Z",
                        "periodEndDateWithTimeStamp": "2025-12-10T23:59:59.000Z",
                        "lastUpdatedOn": "2025-11-12T15:33:08.000+0000",
                        "targetAchievedDateTime": null,
                        "enrolledOnISO": "2025-11-12T09:51:10Z",
                        "periodStartDateWithTimeStampISO": "2025-11-11T00:00:00Z",
                        "periodEndDateWithTimeStampISO": "2025-12-10T23:59:59Z",
                        "lastUpdatedOnISO": "2025-11-12T15:33:08Z",
                        "targetAchievedDateTimeISO": null,
                        "targetAchievedEventLogId": null,
                        "currentPeriod": true,
                        "unEnrolled": false,
                        "milestones": null
                    }
                ],
                "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
                "trackingType": "DEFAULT"
            }
        ]
    },
    "errors": null,
    "warnings": null
}
{
  "data": {
    "userId": 64035151,
    "customer": {
      "id": 64035151,
      "profiles": [
        {
          "firstName": "Tom",
          "lastName": "Sawyer",
          "commChannels": [
            {
              "type": "email",
              "accountId": null,
              "value": "[email protected]",
              "primary": false,
              "verified": false,
              "subscribed": null,
              "attributes": null
            },
            {
              "type": "mobile",
              "accountId": null,
              "value": "919988221100",
              "primary": false,
              "verified": false,
              "subscribed": null,
              "attributes": null
            }
          ],
          "source": "instore",
          "accountId": "",
          "userId": 64035151,
          "orgSourceId": -1
        }
      ],
      "loyaltyInfo": {
        "attribution": {
          "createdOn": "2024-01-17T07:00:51.000+0000",
          "createdOnISO": "2024-01-17T07:00:51Z",
          "lastUpdatedOn": "2024-04-19T07:39:11.000+0000",
          "lastUpdatedOnISO": "2024-04-19T07:39:11Z",
          "lastUpdatedBy": {
            "id": 75122513,
            "code": null,
            "description": null,
            "name": null,
            "type": null
          },
          "createdBy": {
            "id": 75109398,
            "code": null,
            "description": null,
            "name": null,
            "type": null
          }
        },
        "loyaltyType": "loyalty",
        "lifetimePurchases": 23508.0
      },
      "customFields": {}
    },
    "targetGroups": [
      {
        "id": 851,
        "attribution": {
          "createdOn": "2024-04-11T12:10:48.000+0000",
          "createdOnISO": "2024-04-11T12:10:48Z",
          "lastUpdatedOn": "2024-04-11T12:10:48.000+0000",
          "lastUpdatedOnISO": "2024-04-11T12:10:48Z",
          "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": "JP&A",
        "preferredTillId": 75077502,
        "targets": [
          {
            "targetId": 2160795,
            "periodId": 1807,
            "periodRefCode": "JP&A1",
            "periodStartDate": "2024-04-11",
            "periodEndDate": "2024-04-17",
            "targetValue": 2.0,
            "targetAchievedValue": 7.0,
            "targetName": "JP&A",
            "targetType": "COUNT",
            "targetEntity": "TRANSACTION",
            "targetRuleId": 427,
            "enrolledOn": "2024-04-11T12:25:09.000+0000",
            "enrolledOnISO": "2024-04-11T12:25:09Z",
            "eventName": "TransactionAdd",
            "periodStartDateWithTimeStamp": "2024-04-11T00:00:00.000Z",
            "periodStartDateWithTimeStampISO": "2024-04-11T00:00:00Z",
            "periodEndDateWithTimeStamp": "2024-04-17T23:59:59.000Z",
            "periodEndDateWithTimeStampISO": "2024-04-17T23:59:59Z",
            "currentPeriod": false,
            "milestones": null
          },
          {
            "targetId": 2179901,
            "periodId": 1808,
            "periodRefCode": "JP&A2",
            "periodStartDate": "2024-04-18",
            "periodEndDate": "2024-04-24",
            "targetValue": 2.0,
            "targetAchievedValue": 8.0,
            "targetName": "JP&A",
            "targetType": "COUNT",
            "targetEntity": "TRANSACTION",
            "targetRuleId": 427,
            "enrolledOn": "2024-04-18T10:59:36.000+0000",
            "enrolledOnISO": "2024-04-18T10:59:36Z",
            "eventName": "TransactionAdd",
            "periodStartDateWithTimeStamp": "2024-04-18T00:00:00.000Z",
            "periodStartDateWithTimeStampISO": "2024-04-18T00:00:00Z",
            "periodEndDateWithTimeStamp": "2024-04-24T23:59:59.000Z",
            "periodEndDateWithTimeStampISO": "2024-04-24T23:59:59Z",
            "currentPeriod": false,
            "milestones": null
          }
        ],
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "trackingType": "STREAKS"
      }
    ]
  },
  "errors": null,
  "warnings": null
}
{
    "data": {
        "userId": 547528790,
        "customer": {
            "id": 547528790,
            "profiles": [
                {
                    "firstName": "Tom",
                    "lastName": "Sawyer",
                    "commChannels": [
                        {
                            "type": "mobile",
                            "accountId": null,
                            "value": "919988221100",
                            "primary": false,
                            "verified": false,
                            "subscribed": null,
                            "attributes": null
                        }
                    ],
                    "source": "instore",
                    "accountId": "",
                    "userId": 547528790,
                    "orgSourceId": -1
                }
            ],
            "loyaltyInfo": {
                "attribution": {
                    "createdOn": "2023-06-21T15:18:56.000+0000",
                    "lastUpdatedOn": "2023-10-25T14:22:47.000+0000",
                    "lastUpdatedBy": {
                        "id": 75074637,
                        "code": null,
                        "description": null,
                        "name": null,
                        "type": null
                    },
                    "createdBy": {
                        "id": 75036445,
                        "code": null,
                        "description": null,
                        "name": null,
                        "type": null
                    }
                },
                "loyaltyType": "loyalty",
                "lifetimePurchases": 1111.000
            },
            "customFields": {
                "gender": ""
            }
        },
        "targetGroups": [
            {
                "id": 995,
                "attribution": {
                    "createdOn": "2024-02-20T05:45:04.000+0000",
                    "lastUpdatedOn": "2024-02-20T05:45:04.000+0000",
                    "lastUpdatedBy": {
                        "id": 75050734,
                        "code": "1630580928_",
                        "description": "",
                        "name": "Tom Sawyer",
                        "type": "ADMIN_USER"
                    },
                    "createdBy": {
                        "id": 75050734,
                        "code": "1630580928_",
                        "description": "",
                        "name": "Tom Sawyer",
                        "type": "ADMIN_USER"
                    }
                },
                "name": "Jotun Painter- buy 10X in 1 month to unlock a voucher",
                "preferredTillId": 75046500,
                "targets": [
                    {
                        "targetId": 9443405,
                        "periodId": 2622,
                        "periodRefCode": "Cycle_3",
                        "periodStartDate": "2024-05-01",
                        "periodEndDate": "2024-05-31",
                        "targetValue": 10.000,
                        "targetAchievedValue": 0,
                        "targetName": "Jotun Painter- buy 10X in 1 month to unlock a voucher",
                        "targetType": "COUNT",
                        "targetEntity": "TRANSACTION",
                        "targetRuleId": 1059,
                        "enrolledOn": "2024-02-20T05:56:35.000+0000",
                        "eventName": "TransactionAdd",
                        "periodStartDateWithTimeStamp": "2024-05-01T00:00:00.000Z",
                        "periodEndDateWithTimeStamp": "2024-05-31T23:59:59.000Z",
                        "currentPeriod": true,
                        "milestones": [
                            {
                                "id": 201,
                                "triggerName": "3",
                                "triggerValue": 3.000000,
                                "isAchieved": false
                            },
                            {
                                "id": 202,
                                "triggerName": "5",
                                "triggerValue": 5.000000,
                                "isAchieved": false
                            }
                        ]
                    },
                    {
                        "targetId": 14174302,
                        "periodId": 2622,
                        "periodRefCode": "Cycle_3",
                        "periodStartDate": "2024-05-01",
                        "periodEndDate": "2024-05-31",
                        "targetValue": 10.000,
                        "targetAchievedValue": 0,
                        "targetName": "Jotun Painter- buy 10X in 1 month to unlock a voucher_ReturnBill",
                        "targetType": "COUNT",
                        "targetEntity": "TRANSACTION",
                        "targetRuleId": 1060,
                        "enrolledOn": "2024-02-20T06:18:59.000+0000",
                        "eventName": "ReturnBill",
                        "periodStartDateWithTimeStamp": "2024-05-01T00:00:00.000Z",
                        "periodEndDateWithTimeStamp": "2024-05-31T23:59:59.000Z",
                        "currentPeriod": true,
                        "milestones": null
                    }
                ],
                "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
                "trackingType": "DEFAULT"
            }
        ]
    },
    "errors": null,
    "warnings": null
}
response:  {
  "data": {
    "userId": 387043873,
    "customer": {
      "id": 387043873,
      "profiles": [
        {
          "firstName": "Tom",
          "lastName": "Sawyer",
          "commChannels": [
            {
              "type": "mobile",
              "accountId": null,
              "value": "918711533321",
              "primary": false,
              "verified": false,
              "subscribed": null,
              "attributes": null
            },
            {
              "type": "email",
              "accountId": null,
              "value": "[email protected]",
              "primary": false,
              "verified": false,
              "subscribed": null,
              "attributes": null
            }
          ],
          "source": "instore",
          "accountId": "",
          "userId": 387043873,
          "orgSourceId": -1
        }
      ],
      "loyaltyInfo": {
        "attribution": {
          "createdOn": "2024-06-20T12:23:15.000+0530",
          "lastUpdatedOn": "2024-06-20T12:23:15.000+0530",
          "lastUpdatedBy": {
            "id": 50699946,
            "code": null,
            "description": null,
            "name": null,
            "type": null
          },
          "createdBy": {
            "id": 50699946,
            "code": null,
            "description": null,
            "name": null,
            "type": null
          }
        },
        "loyaltyType": "loyalty",
        "lifetimePurchases": 0
      },
      "customFields": {}
    },
    "targetGroups": [
      {
        "id": 32960,
        "attribution": {
          "createdOn": "2024-06-20T12:23:11.000+0530",
          "lastUpdatedOn": "2024-06-20T12:23:11.000+0530",
          "lastUpdatedBy": {
            "id": 50699946,
            "code": "default.till.pyapps.sanity",
            "description": "",
            "name": "default.till.pyapps.sanity",
            "type": "TILL"
          },
          "createdBy": {
            "id": 50699946,
            "code": "default.till.pyapps.sanity",
            "description": "",
            "name": "default.till.pyapps.sanity",
            "type": "TILL"
          }
        },
        "name": "TG_2024-06-20T12:23:10.607325Z",
        "preferredTillId": 50699946,
        "targets": [
          {
            "targetId": 534707,
            "periodId": 43130,
            "periodRefCode": "TestPeriod1",
            "periodStartDate": "2024-06-20",
            "periodEndDate": "2024-06-20",
            "targetValue": 1000.0,
            "targetAchievedValue": 900.0,
            "targetName": "testTargetFixedWindow_2024-06-20T12:23:12.210034Z",
            "targetType": "SALES",
            "targetEntity": "TRANSACTION",
            "targetRuleId": 59857,
            "enrolledOn": "2024-06-20T12:23:17.000+0530",
            "eventName": "TransactionAdd",
            "periodStartDateWithTimeStamp": "2024-06-20T00:00:00.000Z",
            "periodEndDateWithTimeStamp": "2024-06-20T23:59:59.000Z",
            "targetAchievedDateTime": null,
            "currentPeriod": true,
            "milestones": null
          }
        ],
        "targetEvaluationType": "FIXED_CALENDAR_WINDOW",
        "trackingType": "DEFAULT"
      }
    ]
  },
  "errors": null,
  "warnings": null
}
{
    "data": {
        "userId": 387035386,
        "customer": {
            "id": 387035386,
            "profiles": [
                {
                    "firstName": "",
                    "lastName": "",
                    "commChannels": [
                        {
                            "type": "email",
                            "accountId": null,
                            "value": "[email protected]",
                            "primary": false,
                            "verified": false,
                            "subscribed": null,
                            "attributes": null
                        },
                        {
                            "type": "mobile",
                            "accountId": null,
                            "value": "919988221100",
                            "primary": false,
                            "verified": false,
                            "subscribed": null,
                            "attributes": null
                        }
                    ],
                    "source": "instore",
                    "accountId": "",
                    "userId": 387035386,
                    "orgSourceId": -1
                }
            ],
            "loyaltyInfo": {
                "attribution": {
                    "createdOn": "2024-06-06T17:20:56.000+0530",
                    "lastUpdatedOn": "2024-06-13T22:55:19.000+0530",
                    "lastUpdatedBy": {
                        "id": 50139862,
                        "code": null,
                        "description": null,
                        "name": null,
                        "type": null
                    },
                    "createdBy": {
                        "id": 50139862,
                        "code": null,
                        "description": null,
                        "name": null,
                        "type": null
                    }
                },
                "loyaltyType": "loyalty",
                "lifetimePurchases": 6000
            },
            "customFields": {}
        },
        "targetGroups": [
            {
                "id": 34044,
                "attribution": {
                    "createdOn": "2024-07-01T20:15:57.000+0530",
                    "lastUpdatedOn": "2024-07-01T20:15:57.000+0530",
                    "lastUpdatedBy": {
                        "id": 50139862,
                        "code": "default.till.pyapps01",
                        "description": "",
                        "name": "default.till.pyapps01",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 50139862,
                        "code": "default.till.pyapps01",
                        "description": "",
                        "name": "default.till.pyapps01",
                        "type": "TILL"
                    }
                },
                "name": "TG_2024-07-01T20:15:56.231866Z",
                "preferredTillId": 50139862,
                "targets": [
                    {
                        "targetId": null,
                        "periodId": 45523,
                        "periodRefCode": "PERIOD_G_34044_1",
                        "periodStartDate": "2024-07-01",
                        "periodEndDate": "2024-07-01",
                        "targetValue": 1500.000,
                        "targetAchievedValue": 0,
                        "targetName": "testTargetFixedWindow_2024-07-01T20:15:56.847445Z",
                        "targetType": "GROSS_SALES",
                        "targetEntity": "TRANSACTION",
                        "targetRuleId": 61853,
                        "enrolledOn": "2024-07-30T11:32:56.360+0530",
                        "eventName": "TransactionAdd",
                        "periodStartDateWithTimeStamp": "2024-07-01T20:15:57.000Z",
                        "periodEndDateWithTimeStamp": "2024-07-01T20:15:57.000Z",
                        "targetAchievedDateTime": null,
                        "currentPeriod": false,
                        "milestones": [
                            {
                                "id": 10794,
                                "triggerName": "targetAchieved",
                                "triggerValue": 1500.000000,
                                "isAchieved": false
                            }
                        ]
                    }
                ],
                "targetEvaluationType": "CYCLIC_WINDOW",
                "trackingType": "DEFAULT"
            },
            {
                "id": 34045,
                "attribution": {
                    "createdOn": "2024-07-01T20:18:46.000+0530",
                    "lastUpdatedOn": "2024-07-01T20:18:46.000+0530",
                    "lastUpdatedBy": {
                        "id": 50139862,
                        "code": "default.till.pyapps01",
                        "description": "",
                        "name": "default.till.pyapps01",
                        "type": "TILL"
                    },
                    "createdBy": {
                        "id": 50139862,
                        "code": "default.till.pyapps01",
                        "description": "",
                        "name": "default.till.pyapps01",
                        "type": "TILL"
                    }
                },
                "name": "TG_2024-07-01T20:18:45.830768Z",
                "preferredTillId": 50139862,
                "targets": [
                    {
                        "targetId": null,
                        "periodId": 45524,
                        "periodRefCode": "PERIOD_G_34045_1",
                        "periodStartDate": "2024-07-01",
                        "periodEndDate": "2024-07-01",
                        "targetValue": 1.000,
                        "targetAchievedValue": 0,
                        "targetName": "testTargetFixedWindow_2024-07-01T20:18:46.152676Z",
                        "targetType": "QUANTITY",
                        "targetEntity": "TRANSACTION",
                        "targetRuleId": 61855,
                        "enrolledOn": "2024-07-30T11:32:56.360+0530",
                        "eventName": "TransactionAdd",
                        "periodStartDateWithTimeStamp": "2024-07-01T20:18:46.000Z",
                        "periodEndDateWithTimeStamp": "2024-07-01T20:18:46.000Z",
                        "targetAchievedDateTime": null,
                        "currentPeriod": false,
                        "milestones": [
                            {
                                "id": 10795,
                                "triggerName": "targetAchieved",
                                "triggerValue": 1.000000,
                                "isAchieved": false
                            }
                        ]
                    }
                ],
                "targetEvaluationType": "CYCLIC_WINDOW",
                "trackingType": "DEFAULT"
            }
        ]
    },
    "errors": null,
    "warnings": null
}
                "streaks": [
                    {
                        "userStreakId": 380,
                        "streakId": 191,
                        "streakName": "test3_1",
                        "status": "ACHIEVED",
                        "currentCount": 2,
                        "totalTargetCountOfSequence": 2,
                        "streakAchievedUserTargetId": 1248310,
                        "streakAchievedDateTime": "2024-06-10T13:57:58.000+0000"
                    }
                ],
   
                    {
                        "targetId": 1248300,
                        "periodId": 2670,
                        "periodRefCode": "Cycle_2",
                        "periodStartDate": "2024-06-01",
                        "periodEndDate": "2024-06-30",
                        "targetValue": 100.000,
                        "targetAchievedValue": 1000.000,
                        "targetName": "test2",
                        "targetType": "SALES",
                        "targetEntity": "TRANSACTION",
                        "targetRuleId": 2391,
                        "enrolledOn": "2024-06-10T13:56:27.000+0000",
                        "eventName": "TransactionAdd",
                        "periodStartDateWithTimeStamp": "2024-06-01T00:00:00.000Z",
                        "periodEndDateWithTimeStamp": "2024-06-30T23:59:59.000Z",
                        "targetAchievedDateTime": "2024-06-10T13:56:27.000+0000",
                        "currentPeriod": true,
                        "milestones": null
                    }              
Path Params
int64
required
Query Params
excludedEntities
array of int64s
excludedEntities
boolean
Defaults to false
int64
int64
Headers
string
string
string
string
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