v1

latestOpenAPI 3.0.12026-07-24501176.6 MB

Enroll/Re-Enroll a Customer to a Milestone or Streak

post/api_gateway/intouch-api-v3/v3.1/targetGroups/{targetGroupId}/targets/{targetId}/enroll

Path parameters

targetGroupIdinteger required

The ID of the target group associaThe ID of the target group associated with the item.ted with the item.

targetIdinteger required

The ID of the target.

Headers

DATA-SCOPE-ORGstring required

List of Organization IDs

DATA-SCOPEstring required

The scope to authorize access (SELF, OTHER)

Request body

customerIdstring required

Unique ID of the customer.

periodNamestring

Name of the period/cycle into which the user has to be enrolled/re-enrolled in the case of Milestones. Also, period names can be found from the UI of the milestone. In the case of Streaks, this field itself is not needed.

initialBalanceinteger

The initial balance amount assigned to the customer. This could be 0 or any other number, and when a user enrols with initial balance, the amount of targets needs to be achieved will be decreased by same value. If this given as NULL in the case or re-enrol, then the user's target value will start from the same value at which the un-enrol happened before. Initial balance field won't work for streaks.

resetStreakStatusboolean

This field is only for streaks. If this is false, user will continue from the streak value that is present before the un-enrol from the streak. If this is marked as true during re-enrol, then the streak value of the user will be reset & it's like starting fresh.

Response

200

datainteger
{"stackTrail":"paths:/api_gateway/intouch-api-v3/v3.1/targetGroups/{targetGroupId}/targets/{targetId}/enroll:post:responses:200:content:application/json:schema:properties:errors","oasType":"schema","type":"unknown"}
{"stackTrail":"paths:/api_gateway/intouch-api-v3/v3.1/targetGroups/{targetGroupId}/targets/{targetId}/enroll:post:responses:200:content:application/json:schema:properties:warnings","oasType":"schema","type":"unknown"}

Example response

{
  "data": 345651201
}