Recommend products
curl --request POST \
--url https://api.virtual.fit/recommendations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.virtual.fit/recommendations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.virtual.fit/recommendations"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.virtual.fit/recommendations"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"items": [
{
"product_id": "<string>",
"target_type": "product",
"variant_id": "<string>",
"rank": 2,
"available": true,
"recommended_option_values": {},
"score": 123,
"title": "<string>",
"handle": "<string>",
"canonical_url": "<string>",
"image_url": "<string>",
"variant_title": "<string>",
"price": "<string>",
"compare_at_price": "<string>",
"currency": "<string>",
"fit_evidence": {
"review_count": 123,
"analyzed_review_count": 123,
"average_rating": 2.5,
"signals": [
{
"dimension_code": "<string>",
"evidence_count": 123,
"average_score": 123,
"tight_count": 123,
"neutral_count": 123,
"loose_count": 123
}
]
}
}
],
"unknown_context_ids": [
"<string>"
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}API reference
Recommend products
Return compact, render-ready product and selected-variant recommendations.
POST
https://api.virtual.fit
/
recommendations
Recommend products
curl --request POST \
--url https://api.virtual.fit/recommendations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.virtual.fit/recommendations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.virtual.fit/recommendations"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.virtual.fit/recommendations"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"items": [
{
"product_id": "<string>",
"target_type": "product",
"variant_id": "<string>",
"rank": 2,
"available": true,
"recommended_option_values": {},
"score": 123,
"title": "<string>",
"handle": "<string>",
"canonical_url": "<string>",
"image_url": "<string>",
"variant_title": "<string>",
"price": "<string>",
"compare_at_price": "<string>",
"currency": "<string>",
"fit_evidence": {
"review_count": 123,
"analyzed_review_count": 123,
"average_rating": 2.5,
"signals": [
{
"dimension_code": "<string>",
"evidence_count": 123,
"average_score": 123,
"tight_count": 123,
"neutral_count": 123,
"loose_count": 123
}
]
}
}
],
"unknown_context_ids": [
"<string>"
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}The response contains one selected target per product and omits full variant
and media collections. See Recommendation behavior
for target semantics and fallbacks.
Body
application/json