v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Get user rank across target groups

get/api_gateway/intouch-api-v3/v3.1/leaderboards/user/{userID}

Query parameters

userIDinteger required

The unique ID of the customer.

Headers

DATA-SCOPE-ORGstring

List of Organisation IDs

DATA-SCOPEstring

Scopes define what data can be accessed using the API. You can use scopes to control access to data from a parent or child organisation. Defining a scope ensures that the response contains only data from the respective organisation. Supported headers: SELF, OTHER and ALL.

Request body

orgIdinteger

Unique identifier for the organisation.

targetGroupIdinteger required

Unique identifier for target group

targetRuleIdinteger required

Unique identifier for target rule. Maximum of 25 rule IDs supported.

periodIdinteger

Identifier of period for which result will be fetched

Response

200

Example response

{
  "data": {
    "lastSyncTime": "2024-06-24T17:37:00.000IST",
    "customerId": 381329847,
    "userEnrichmentDetails": {
      "mobile": "9988221100",
      "email": "tom.sawyer@capillarytech.com"
    },
    "userRanks": [
      {
        "orgId": 50711,
        "targetGroupId": 232,
        "targetRuleId": 366,
        "periodId": 243,
        "achievedValue": 3000,
        "rank": 1771,
        "lastActivityTime": "2022-11-25T21:45:05.000IST",
        "totalUsersInTargetGroup": 4527
      }
    ]
  }
}