Skip to main content
POST/predictions/predict/

Predict

You can return a list of recommended products based on a specified set of "seed" products (e.g., "products related to what's in the cart" or "contacts who viewed X also viewed Y"). This endpoint can also serve as a fallback for general recommendations.

NO AUTHORIZATION REQUIRED

This API endpoint does not require an API authorization key, to allow direct querying from the contact's browser.

Attributes

Optional unless marked required

custom_idsarray
Array of strings representing your unique product identifiers (seed products).
product_idsarray
Array of integers representing User system product IDs (seed products).
limitnumber
Maximum number of products to return (max 25).
segment_idnumber
ID of a product segment to filter recommendations (e.g., "Available Products").
categoriesarray
Array of category names to filter by.
tagsarray
Array of tag names to filter by.
extra_datanumber
Controls behavior when filters result in fewer products than limit. 0 (Strict) returns only matching products. 1 (Default) fills remaining slots with general recommendations.

Request​

curl -X POST "https://<your_app_subdomain>.user.com/predictions/predict/" \
-H "Content-Type: application/json" \
-d '{
"custom_ids": ["SKU123", "SKU456"],
"limit": 5,
"segment_id": 101,
"extra_data": 0
}'

Response​

{
"recommended_products": [
{
"id": 85,
"name": "Classic Sneakers",
"custom_id": "SKU123",
"description": "Lightweight sneakers for everyday wear.",
"product_url": "https://www.example.com/product/classic-sneakers/",
"image_url": "https://www.example.com/images/classic-sneakers.jpg",
"qty": 1,
"created_at": "2026-11-10T14:20:02.361287Z",
"updated_at": "2026-11-10T14:20:02.361297Z",
"attributes": ,2 items
"categories": 1 item
}
]
}

Response fields​

Fields returned in the 200 OK response body.

recommended_productsarray of objects
Recommended products, most relevant first. At most limit products.
recommended_products[].idinteger
A unique identifier for the product which is given by User automatically.
recommended_products[].namestringnullable
A product name.
recommended_products[].custom_idstringnullable
A unique identifier for the product which is provided by the client. Usually related to the product’s SKU.
recommended_products[].descriptionstringnullable
Description of the product, or null.
recommended_products[].product_urlstring (URL)nullable
A URL of a product.
recommended_products[].image_urlstring (URL)nullable
A URL of a product image.
recommended_products[].qtyintegernullable
Quantity of the product, or null if not set.
recommended_products[].created_atstring (date-time)
A creation date of a product.
recommended_products[].updated_atstring (date-time)
A date of last product update.
recommended_products[].attributesarray of objects
Custom product attributes that have a value, each with name, name_std, value, description and value_type.
recommended_products[].attributes[].namestring
Name of the attribute.
recommended_products[].attributes[].name_stdstring
Standardized name of the attribute, used as its key in the API.
recommended_products[].attributes[].valuearray of string | integer | number | string | string (date)
Value of the attribute for this product.
recommended_products[].attributes[].descriptionstring
Description of the attribute.
recommended_products[].attributes[].value_typeinteger
Value type of the attribute: 1 boolean, 2 integer, 3 date, 4 string, 5 datetime, 6 fixed (a list of choices), 7 float or 8 JSON.
recommended_products[].categoriesarray of objects
Categories the product belongs to.
recommended_products[].categories[].idinteger
A unique identifier for the category which is given by User automatically.
recommended_products[].categories[].namestring
A category name.
recommended_products[].categories[].descriptionstring
Description of the category.
recommended_products[].categories[].custom_idstringnullable
A unique identifier for the category which is provided by the client, or null.