Body2Fit Playground
Experience the full Body2Fit size recommendation flow live — product check, scanning, estimation, and size recommendation in one place.
See Body2Fit in action
Body2Fit maps a shopper's body measurements to a garment size. Under the hood, it runs a guided two-photo scan (or takes body stats directly), estimates measurements using Bodygram's computer vision engine, and returns the size label the shopper should pick. You own every pixel of the experience — the SDK handles the scanner iframe, the estimation calls, and the recommendation API.
This page lets you run the complete integration flow against Bodygram's demo garments. Use it to understand what each step does before wiring it into your own product page.
For the full integration guide, see Body2Fit Integration.
Integration pattern
Every Body2Fit integration follows four sequential steps. The playground below runs all four live:
- Check support — call
sdk.getBody2FitIsProductSupported()on page load. Only show the size-finding UI if it returnstrue. - Collect measurements — guide the shopper through a two-photo scan, or let them enter height, weight, age, and gender directly.
- Estimate — call
getBody2FitPhotoEstimationorgetBody2FitStatsEstimationto get an estimation token representing the shopper's body. - Recommend — pass the token and garment SKU to
getBody2FitSizeRecommendation. Show the result.
Interactive Demo
Garments
Before showing a "Find my size" button, confirm Bodygram has garment data for this product. Only render the size-finding experience when supported === true.
Collect the shopper's stats first. Gender is used both by the estimation call and to pick the correct scanner silhouette in the next step.
Camera scanning gives more accurate measurements. Stats-only works without a camera and is quicker for returning users.
API reference
Full signatures, parameters, response shapes, and error codes for every method used in the playground above live in the Headless SDK API reference.
Methods
getBody2FitIsProductSupported(params)— check whether a garment SKU has Body2Fit data on file. Call before showing any size-finding UI.getBody2FitPhotoEstimation(params)— estimate body measurements from front and side photos plus user stats.getBody2FitStatsEstimation(params)— estimate body measurements from age, gender, height, and weight alone.getBody2FitTokenEstimation(params)— re-fetch a previous estimation using itsestimationToken.getBody2FitSizeRecommendation(params)— turn an estimation token into a size label (e.g."M") for one or more garments.getBody2FitSizeFitting(params)— get a per-size fitting analysis (tightness at each fitting point, recommendation rank, etc.).
Types
Avatar— shape of the optional 3D avatar returned by photo estimation.Measurements— full list ofestimationTypekeys returned by Body2Fit estimation methods.Fitting Points— fitting-point keys used ingetBody2FitSizeFittingresponses, with their display names.
