tys.recommendations.create()
handle comes from the browser SDK (await tys.recommendationHandle()), products are your SKUs / style IDs. Key scope: fit_checks:read.
create(params: RecommendationsRequest, options?: RequestOptions): Promise<RecommendationList>Parameters
Section titled “Parameters”paramsRecommendationsRequestRequiredProperties
handlestringRequiredA recommendation handle from the browser SDK (tys.recommendationHandle()).
productsstring[]RequiredProduct SKUs / style IDs (what you pass to the element as product).
optionsRequestOptionsOptionalReturns
Section titled “Returns”Promise<RecommendationList>: { data: ServerRecommendation[] }, one per product, in your size labels. Sizes only, never measurements.
productstringRequiredstatus"ready" | "computing" | "none" | "unavailable"Requiredready: a size. computing: a simulation the shopper started is running (ask again later). none: simulated, no size can be worn. unavailable: no published garment for this product, not simulated on this body yet, or the store's plan has no fit checks left. A page view or this API never starts a simulation.
sizestringRequiredThe recommended size in the store's label (the product's size map), or null.
studio_sizestringRequiredThe same size as entered in TryYourSize Studio, or null.
wearable_sizesstring[]RequiredSizes that can be worn on this body, in the store's labels.
tryon_idstringOptionalThe try-on that produced the size, when there is one. Send it back with orders for attribution.
Example
Section titled “Example”// handle: from the browser SDK, `await tys.recommendationHandle()`, sent to your serverconst { data } = await tys.recommendations.create({ handle, products: ["SKU-123", "SKU-456"],});for (const r of data) { if (r.status === "ready") console.log(r.product, r.size, r.wearable_sizes);}answer = tys.recommendations.create(handle=handle, products=["SKU-123", "SKU-456"])for rec in answer["data"]: if rec["status"] == "ready": print(rec["product"], rec["size"], rec["wearable_sizes"])curl -X POST https://api.tryyoursize.com/v1/recommendations \ -H "Authorization: Bearer $TRYYOURSIZE_SECRET_KEY" \ -H "TYS-Version: 2026-10-25" \ -H "Content-Type: application/json" \ -d '{"handle":"tys_rh_…","products":["SKU-123","SKU-456"]}'See also
Section titled “See also”Was this page helpful?
Thank you. We read every answer.