Live Push User Profile
Request Details
| Item | Value |
| Description | Sends a user’s profile every time it’s updated to a client specified endpoint; includes Tiers v2 data. |
| Method | POST |
| Endpoint | Client provided, must begin with https:// |
| Content-Type | application/json |
Recommended Request Authentication
| Field Name | Sample Value | Required | Format | Notes |
| Basic | Username: test Password: password123 Base64Auth |
No | String | Basic auth is the client provided username & password in Base 64 format. The value of username:password is Base64 encoded. |
| x-api-key | GRscvhg53SsDg1gxxsDgcsf123 | No | String | x-api-key is the client provided API key for access to the defined endpoint |
Third Party ID Synchronization Option
An optional feature for the User Profile Data Push is to capture a third_party_id from the Client provided end point API response. The third_party_id value will be stored for the user in CrowdTwist. Note: third_party_id is a client generated user id value, typically generated by a CRM.
If this option is enabled the third_party_id value is required in the API response. Note that this option is only available in instances where authentication is not used.
For example:
"third_party_id": "123456789",
"third_party_id": "123456789",
If this option is not enabled, the third_party_id will not be captured & stored with the user record at CrowdTwist.
Request Body
| Field Name | Sample Value | Format | Description |
| country | US | String | User’s country code |
| receiveSmsMessages | 0 | Number (binary) | If a user is subscribed to receive SMS updates through CrowdTwist |
| facebookUserId | null | String | User’s Facebook user ID |
| redeemablePoints | 5200 | Number | Redeemable points of the user |
| postalCode | 10001 | String | User’s postal code |
| tierInfo | Object | Object containing all tiers data | |
| resetDate | 2017-03-23T20:00:00Z | String (ISO 8601 Format) | Date a member resets to 0 and enters maintenance. Only fixed timeframe. |
| dateReached | 2017-03-23T19:00:00Z | String (ISO 8601 Format) | Date the member reached their current tier. This only changes when a member drops or jumps a tier. |
| scoreNeededToReach | 1000 | Number | Number of points needed for a member to jump to the next tier |
| nextLevel | Object | Level data of a user’s next tier | |
| minValue | 1000 | Number | Mininum number of points needed for the next tier |
| maxValue | 2499 | Number | Maxinum number of points needed for the next tier |
| title | Tier 2 | String | Name of next tier level |
| tierScore | 0 | Number | The points earned while the member is in a tier |
| timeframeScore | 1200 | Number | Cumulative score the member has earned in the current timeframe since the member last expired. |
| assignedByEvent | drop | String | The event that occurred when a member is assigned a tier. JUMP: This indicates a jump occurred. UPDATE: This indicates that a user’s score has been updated. DROP: Indicates that a user has dropped their tier. MAINTAIN: Indicates that a user has maintained their tier once their tier expires and they’ve done enough to stay in their tier. RESET: This indicates that a user’s counters were reset without their tier level being changed. START: This indicates the user starting their tier. |
| currentLevel | Object | Name of the user’s current tier (this is the same as fan_level) | |
| minValue | null | Number | Mininum number of points needed for the current tier |
| maxValue | 999 | Number | Maxinum number of points needed for the current tier |
| title | Tier 1 | Title | Name of current tier level |
| score | 0 | Number | The points earned while the member is in a tier |
| daysUntilResetDate | 0 | Number | Number of days until a member resets. Only for fixed timeframe. |
| daysUntilExpirationDate | 0 | Number | Number of days until a member’s tier expires if they do not maintain |
| dateAssigned | 2017-03-23T19:00:00Z | String (ISO 8601 Format) | Date the member is assigned current tier. This changes for all event types (start, jump, maintain, drop and reset) |
| expirationDate | 2017-03-23T20:00:00Z | String (ISO 8601 Format) | Date a member’s tier will expire if they do not maintain. This is both fixed and rolling. |
| scoreNeededToMaintain | null | Number | Number of points needed to maintain current tier |
| customData | null | String | Custom Data JSON object (parameters are configurable by client). |
| signUpTypeId | 3 | Number | If the user was signed up through API or Member Care |
| isActive | 1 | Number (binary) | If the user is active |
| emailAddress | george15@crowdtwist.com | String | User’s email address |
| password | String | null | |
| dateMobileVerified | null | Number (binary) | If a user’s mobile number has been verified |
| dateLastLogin | 1490290125 | Timestamp | Date the user last logged in |
| yahooUserId | null | String | User’s Yahoo user ID |
| state | NY | String | User’s state |
| id | 6566 | Number | Internal CrowdTwist member user_id |
| monthlyPoints | 0 | Number | Number of points the user has earned this month |
| signUpCampaign | null | String | Campaign with which the user joined the program |
| signUpChannelId | null | Number | Channel ID from where the user joined the program |
| ipAddress | null | String | The user’s IP address (if available) |
| fanRank | 0 | Number | User’s rank within the program |
| firstName | George | String | User’s first name |
| fsqUserId | null | String | User’s Foursquare user ID |
| activityStreamOptIn | 1 | String | If the user is opted in to see his/her updates in activity stream |
| googleUserId | null | String | User’s Google user ID |
| region | Northeast | String | User’s region |
| instUserId | null | String | User’s Instagram user ID |
| weeklyPoints | 0 | Number | Number of points the user has earned this week |
| lastName | Twist | String | User’s last name |
| clientBrandingId | 0 | String | |
| gender | Male | String | User’s gender |
| city | New York City | String | User’s city |
| dateLastUpdated | 1490302144 | Timestamp | Date the user’s profile was last updated |
| hashAlgorithmId | String | null | |
| numFacebookFriends | 0 | Number | Number of friends the user has on Facebook |
| thirdPartyId | null | String | User’s third party ID |
| dateCreated | 1490293725 | Timestamp | Date the user was created within the CrowdTwist platform |
| mobilePhoneNumber | 12312312321 | String | Users mobile number |
| salt | String | null | |
| numTwitterFollowers | 0 | Number | Number of followers the user has on Twitter |
| streetAddress1 | null | String | User’s street address 1 |
| streetAddress2 | null | String | User’s street address 2 |
| emailIsVerified | 1 | Number (binary) | If a user’s email address has been verified |
| fanLevelName | Tier 1 | String | User’s current tier (this is the same as current_level) |
| dateOfBirth | 142372800 | Timestamp | User’s date of birth |
| receiveEmailUpdates | 1 | Number (binary) | If a user is subscribed to receive email updates through CrowdTwist |
| userName | gtwist12 | String | User’s username |
| twitterUserId | null | String | User’s Twitter user ID |
| langPref | null | String | Language preference of the user |
| totalPoints | 5200 | Number | Total points of the user |
| numPointsPurchased | 0 | ||
| middleName | String | User’s middle name | |
| passwordGenerated | 0 | Number (binary) | If the user’s password was generated by CrowdTwist |
Sample Request
{ "country":"US", "receiveSmsMessages":0, "facebookUserId":null, "redeemablePoints":5200, "postalCode":"10001", "tierInfo":{ "resetDate":"2017-03-23T20:00:00Z", "dateReached":"2017-03-23T19:00:00Z", "scoreNeededToReach":1000, "nextLevel":{ "minValue":1000, "maxValue":2499, "title":"Tier 2" }, "timeframe_score": 0, "tierScore":0, "assignedByEvent":"drop", "currentLevel":{ "minValue":null, "maxValue":999, "title":"Tier 1" }, "score":0, "daysUntilResetDate":0, "daysUntilExpirationDate":0, "dateAssigned":"2017-03-23T19:00:00Z", "expirationDate":"2017-03-23T20:00:00Z", "scoreNeededToMaintain":null }, "customData":null, "signUpTypeId":3, "isActive":1, "emailAddress":"george15@crowdtwist.com", "password":null, "dateMobileVerified":null, "dateLastLogin":"1490290125", "yahooUserId":null, "state":"NY", "id":6566, "monthlyPoints":0, "signUpCampaign":null, "signUpChannelId":null, "ipAddress":null, "fanRank":0, "firstName":"George", "fsqUserId":null, "activityStreamOptIn":1, "googleUserId":null, "region":"Northeast", "instUserId":null, "weeklyPoints":0, "lastName":"Lim", "clientBrandingId":0, "gender":"Male", "city":"New York City", "dateLastUpdated":"1490302144", "hashAlgorithmId":null, "numFacebookFriends":0, "thirdPartyId":null, "dateCreated":"1490293725", "mobilePhoneNumber":"12312312321", "salt":null, "numTwitterFollowers":0, "streetAddress1":null, "streetAddress2":null, "emailIsVerified":0, "fanLevelName":"Tier 1", "dateOfBirth":"142372800", "receiveEmailUpdates":1, "userName":"glim76", "twitterUserId":null, "langPref":null, "totalPoints":5200, "numPointsPurchased":0, "middleName":null, "passwordGenerated":"0" }
{
"country":"US",
"receiveSmsMessages":0,
"facebookUserId":null,
"redeemablePoints":5200,
"postalCode":"10001",
"tierInfo":{
"resetDate":"2017-03-23T20:00:00Z",
"dateReached":"2017-03-23T19:00:00Z",
"scoreNeededToReach":1000,
"nextLevel":{
"minValue":1000,
"maxValue":2499,
"title":"Tier 2"
},
"timeframe_score": 0,
"tierScore":0,
"assignedByEvent":"drop",
"currentLevel":{
"minValue":null,
"maxValue":999,
"title":"Tier 1"
},
"score":0,
"daysUntilResetDate":0,
"daysUntilExpirationDate":0,
"dateAssigned":"2017-03-23T19:00:00Z",
"expirationDate":"2017-03-23T20:00:00Z",
"scoreNeededToMaintain":null
},
"customData":null,
"signUpTypeId":3,
"isActive":1,
"emailAddress":"george15@crowdtwist.com",
"password": null,
"dateMobileVerified":null,
"dateLastLogin":"1490290125",
"yahooUserId":null,
"state":"NY",
"id":6566,
"monthlyPoints":0,
"signUpCampaign":null,
"signUpChannelId":null,
"ipAddress":null,
"fanRank":0,
"firstName":"George",
"fsqUserId":null,
"activityStreamOptIn":1,
"googleUserId":null,
"region":"Northeast",
"instUserId":null,
"weeklyPoints":0,
"lastName":"Lim",
"clientBrandingId":0,
"gender":"Male",
"city":"New York City",
"dateLastUpdated":"1490302144",
"hashAlgorithmId":null,
"numFacebookFriends":0,
"thirdPartyId":null,
"dateCreated":"1490293725",
"mobilePhoneNumber":"12312312321",
"salt":null,
"numTwitterFollowers":0,
"streetAddress1":null,
"streetAddress2":null,
"emailIsVerified":0,
"fanLevelName":"Tier 1",
"dateOfBirth":"142372800",
"receiveEmailUpdates":1,
"userName":"glim76",
"twitterUserId":null,
"langPref":null,
"totalPoints":5200,
"numPointsPurchased":0,
"middleName":null,
"passwordGenerated":"0"
}
Sample Request – Custom Attributes
If custom_data attributes are stored for the user, the object in the data push will include these attributes instead of being null.
"customData":" { "employee_id": "employee1", "register_id": "1", "cashier_id": "2" }
"customData":"
{
"employee_id": "employee1",
"register_id": "1",
"cashier_id": "2"
}