Ir al contenido

getRecommendation()

Esta página aún no está disponible en tu idioma.

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>
productstringObligatorio

Your product ID or SKU.

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

productstringObligatorio
statusRecommendationStatusObligatorio

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

sizestring | nullObligatorio

The recommended size in your size labels, or null.

studioSizestring | nullObligatorio

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

wearableSizesstring[]Opcional

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);

¿Te ha resultado útil esta página?