Skip to content

getRecommendation()

Function@tryyoursize/react-native

The shopper’s recommended size for a product, in your size labels. Never starts a simulation.

async function getRecommendation(product: string): Promise<Recommendation>
productstringRequired

Your product ID or SKU.

Promise<Recommendation>: The shopper’s recommended size.

productstringRequired
statusRecommendationStatusRequired

none: simulated, no size can be worn. Same values as the web SDK.

sizestring | nullRequired

The recommended size in your size labels, or null.

studioSizestring | nullRequired

The same size as entered in TryYourSize Studio, or null.

wearableSizesstring[]Optional

Sizes that can be worn on this body, in your labels (when simulated).

const rec = await getRecommendation("SKU-123");
if (rec.status === "ready") setSize(rec.size);

Was this page helpful?