For information about how REST API works, see rest main page.
Personyze tracks visitors on your site. When visitor's session ends (after 1.5 hours) all the collected information about this visitor is added to users database. Actually there can be additional delay of several hours.
You can see and manage users here.
REST "Users" object allows you to import users to Personyze from Your databases, and periodically update their information as desired.
Note on
internal_id(current behaviour). On the users object,internal_idis stored and returned, but it does not work as a lookup key:where/internal_id=...matches nothing, aPOSTcarrying aninternal_iddoes not merge into an existing profile (it creates a second one), and requestinginternal_idin an explicitcolumnslist returnsnull. Useuser_id) as your key. This affectsusers, zapier_users and user_list_users only — on products and articles,internal_idbehaves normally.
The URL is:
app.personyze.com/rest/users
User records don't have fixed number of columns. It's possible to store any key-value pairs. You can store column names expressed in snake-case format (like first_name), or camel-case (like firstName).
Some columns have special meaning in Personyze, like "email", "first_name", etc. You can read them specifying /column/first_name or /column/firstName, but if you read all columns (without specifying /columns), they will appear in snake-case. Keep in mind, that in future Personyze can change which columns are special, and which are not.
Users carry several identifiers: user_id (assigned by Personyze), internal_id (an id from your own database), email, and fb_id. Inserting a user whose email or fb_id matches an existing profile merges the two records rather than creating a duplicate.
Insert example
curl --data '{"first_name": "Johnny", "internal_id": "niceguy-561531", "email": "johnny@gmail.com"}' 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users'
Matching happens on email here. Inserting a second record with the same email merges into the same profile:
curl --data '{"first_name": "Big John", "email": "johnny@gmail.com", "phone": "202-555-0152"}' 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users'
Select example
Get last modified record. Special column "data_last_modified" is automatically updated whenever some other column changes it's value.
curl 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users/order_by_desc/data_last_modified/limit/1'
The same, but only select user Id, first name and email columns, using camel-case names:
curl 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users/order_by_desc/data_last_modified/limit/1/columns/userId,firstName,email'
Update example
Update big-john@gmail.com so he has phone 202-555-0152.
curl -X PUT --data '{"phone": "202-555-0152"}' 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users/where/email=big-john@gmail.com'
Delete example
Delete this user forever. There is really no way back. Address the delete by email — a delete keyed on internal_id matches nothing and reports 0 affected rows.
curl -X DELETE 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/users/where/email=johnny@gmail.com'