Wiki

REST Do object

For information how REST API works, see rest main page.

This object allows you to perform operations on an online user by his user_id (Personyze user Id), internal_id (Id that you set) or email.

You need to send POST request to the "do" object. The POST body must be JSON array, where each element is description of an operation to perform on a user. So you can perform several operations (maybe on different users) in one request.

curl --data '[["internal_id", 1, "Product Added to cart", "P1000"], ["email", "john@example.com", "Product Purchased", "P1001"]]' 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/do'

Each operation description is JSON array, where

  1. the first element is a user key name, that can be one of: "user_id", "internal_id" and "email"
  2. the second element is a value that corresponds to the key
  3. the third element is command name
  4. next elements depend on the command name

Command name can be one of:

  1. "User Profile" - set profile field, like ["internal_id", 1, "User Profile", "first_name", "John"]
  2. "Product Viewed" - report product viewed, like ["internal_id", 1, "Product Viewed", "P1000"]
  3. "Product Added to cart" - report product added to cart, like ["internal_id", 1, "Product Added to cart", "P1000"]
  4. "Product Liked"
  5. "Product Purchased"
  6. "Product Removed from cart"
  7. "Product Unliked"
  8. "Article Viewed"
  9. "Article Commented"
  10. "Article Liked"
  11. "Article Goal"
  12. "Article Unliked"
©2008-2023 All rights reserved. Personyze® is a registered trademark. Privacy Policy. Terms of Use.