Skip to main content
POST
Recommend products
The response contains one selected target per product and omits full variant and media collections. See Recommendation behavior for target semantics and fallbacks.

Authorizations

Authorization
string
header
required

Keep the virtual.fit API key on your server.

Body

application/json
intent
enum<string>
required
Available options:
similar,
complete_the_look,
likely_purchases
site_key
string

Custom JavaScript public site key. Provide this or shop_domain.

shop_domain
string

Canonical .myshopify.com domain. Provide this or site_key.

product_ids
string[]
Maximum array length: 5
Maximum string length: 256
cart_product_ids
string[]
Maximum array length: 500
Maximum string length: 256
candidate_product_ids
string[]
Required array length: 1 - 10000 elements
Maximum string length: 256
exclude_product_ids
string[]
Maximum array length: 500
Maximum string length: 256
shopper_id
string
Maximum string length: 256
limit
integer
default:12
Required range: 1 <= x <= 100
surface
string

Response

Ranked recommendations.

items
object[]
required
Maximum array length: 100
unknown_context_ids
string[]
required