Personyze Personyze developer docs
Open Personyze
Catalog

REST Product Interactions object

Report views, cart additions and purchases from your own systems.

Personyze developer documentation Questions: support@personyze.com

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

This object is the event log of what your visitors did with your products: viewed, added to cart, purchased. Personyze's recommendation engine learns from these records, so importing them from your backend (orders, offline sales, a POS system) directly improves recommendation quality.

If the interaction happens on your website, prefer reporting it from the browser with the client-side product API — it attaches to the visitor's live session automatically. Use this REST object for server-side and offline data.

The endpoint URL is:

app.personyze.com/rest/products_interactions

Columns

Column Description
user_id Personyze user id. Supply this or user_internal_id or user_email.
user_internal_id Your own identifier for the user. If no such user exists yet, one is created. Write-only.
user_email The user's email. If no such user exists yet, one is created. Write-only.
product_internal_id Your identifier for the product, as used in the products catalog. Mandatory.
status What happened. One of viewed, delivered, extra, favorite, goal — see below. Mandatory.
quantity How many units. Defaults to 1.
amount Monetary value of the interaction.
transaction_time Unix timestamp of the transaction. Mandatory.
time Unix timestamp of the record. Defaults to now.
action_id The Personyze action this interaction is attributed to, when it followed a campaign.

Statuses

The five statuses are a fixed ladder from "shown" to "converted":

Status For products For content
viewed Shown Shown
delivered Confirmed view Confirmed view
extra Added to cart Commented
favorite Added to favorites Liked
goal Purchased Reached goal

Sending any other value fails with status must be one of: viewed, delivered, extra, favorite, goal.

Insert example

A purchase of two units, identifying the buyer by your own id:

curl --data '{"user_internal_id": "niceguy-561531", "product_internal_id": "SKU-8891", "status": "goal", "quantity": 2, "amount": 79.98, "transaction_time": 1769904000}' 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/products_interactions'

If the product isn't in your catalog, the request fails with Specified product not found: SKU-8891 — import the product first via the products object.

Unlike products, users are created on demand: posting an interaction for an unknown user_internal_id or user_email creates that user profile.

Select example

Everything a user did:

curl 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/products_interactions/where/user_id=123'

Purchases only, most recent first:

curl 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/products_interactions/where/status=goal/order_by_desc/time/limit/100'

Delete example

curl -X DELETE 'https://api:FD09908F25BECB09D78EBEA1DADFB618651F612D@app.personyze.com/rest/products_interactions/where/user_id=123&product_internal_id=SKU-8891'

PUT is not supported on this object — an interaction is an event, not a mutable record. To correct one, delete it and post it again.

Aggregated counters

Per-product totals derived from these records are available read-only from products_stats.