post https://api.taplytics.com/v2/users/
A single User object with all its details, accessed via either ID, email or your custom user ID. If an email or custom ID is provided in the URL parameters, the ID field can be omitted. Note that custom data can only be reliably kept with no more than one level of nesting. If the user currently has a custom data object and one is posted, the two will be merged.
Parameters
One of the following identifiers must be provided:
- id (string,
548223f2c7036020742ff21c
) ... Stringid
of the User to retrieve. - user_id (string,
42
) ... Your custom defined user id. - email (string,
[email protected]
) ... Your custom defined user email
Request Body (application/json; charset=utf-8)
{
"gender": "male",
"first_name": "Jonathan",
"last_name": "Norris",
"user_id": "42",
"custom_data": {
"occupation": "Bug Fixer",
"favourite movie": "You Don't Mess With The Zohan"
},
"email": "[email protected]"
}
Response
200 - User Object
Create or Update User
URL
https://api.taplytics.com/v2/users/{id}{?api_token}{?user_id|email}
Headers
application/json; charset=utf-8
Response
{
"id": "548223f2c7036020742ff21c",
"created_at": "2015-01-06T03:51:57+00:00",
"user_id": "42",
"email": "[email protected]",
"first_name": "Jonathan",
"last_name": "Norris",
"custom_data": {
"occupation": "Bug Fixer",
"favourite_color": "Chartreuse",
"favourite movie": "You Don't Mess With The Zohan"
},
"last_seen_ip": "123.123.123.123",
"location": {
"city_name": "San Francisco",
"continent_code": "NA",
"country_code": "USA",
"country_name": "United States",
"latitude": 37.7749300,
"longitude": -122.4194200,
"postal_code": null,
"region_name": "San Francisco",
"timezone": "Europe/San Francisco"
},
"session_count": 16,
"gender": "male"
}