Virtual Sizer
An API providing garment size recommendations.
The Virtual Sizer recommends sizes for men’s and women’s garments for brands and multi-brand retailers.
The Virtual Sizer is an API that predicts both garment sizes & over 50 body measurements based on a minimum of 4 inputs, including height, weight, and age. All responses are returned as JSON.
See Common API Topics for global patterns across all endpoints.
API
Virtual Sizer API
GET
https://api.boldmetrics.io/virtualsizer/get?
Please note the client_id
and user_key
requirements, along with the minimum required inputs.
Path Parameters
Name | Type | Description |
---|---|---|
Host* | String | api.boldmetrics.io |
Query Parameters
Name | Type | Description |
---|---|---|
client_id* | String | Your account ID provided by Bold Metrics |
user_key* | String | Your secret key provided by Bold Metrics |
desired_brand* | String | Brand of garments to return |
desired_garment_type* | String | Type/category of garments to return |
weight* | Integer | Weight in pounds |
height* | Integer | Height in inches |
waist_circum_preferred* | Integer | [required for male garments] Waist circumference at preferred in inches |
bra_size* | String | [required for female garments] Bra size of client, such as 30B |
age* | Integer | Age in years |
anon_id* | String | Your identifier for the customer being fitted |
chest_circum | Float | Chest circumference in inches |
jean_inseam | Float | Inseam of trousers in inches |
shoe_size_us | Float | Shoe size (American sizes) |
jacket_size | String | Jacket size; e.g. 38R |
sleeve | Float | Length of sleeve based on sleeve_type in inches |
sleeve_type | String | Type of sleeve measurement for given sleeve input. Choices include |
fm_shoulder | Float | Shoulder width in inches |
hip_circum | Float | Hip circumference in inches |
overarm | Float | Shoulder circumference in inches |
sleeve_inseam | Float | Inseam of sleeve in inches |
thigh | Float | Thigh circumference in inches |
waist_circum_stomach | Float | Thigh circumference in inches |
waist_height_preferred | Float | Waist height in preferred inches |
neck_circum_base | Float | Neck circumference at base of neck, usual collar size in inches |
locale | String | Two-letter country code for user locale, modifies bra_size |
product_id* | String | The parent/style identifier for the garment |
model_id | String | An identifier for a specific model. Used for testing & in specific production instances. This will not be used unless you are notified by Bold Metrics. |
Headers
Name | Type | Description |
---|---|---|
Accept* | String | the response content type depends on Accept header |
Example response
product_id and desired_garment_type
Your size recommendation will be based on the following two fields:
desired_garment_type: The product category
product_id: The product identifier or SKU
Your account manager will work with you to insure your team is using the correct desired_garment_type
's.
Body Measurements
Response Object
The size recommendations returned by the Virtual Sizer gives us a few values in the response:
dimensions: a list of body measurements
size_recommendations: a list of
good_matches
containing garment and fit score objects outlined belowcode: the return status code
message: any details of result that may need attention, e.g. the number of body inputs is low.
outlier_status: whether the input triggered an outlier warning.
outlier_messages: the specific fields causing an outlier warning to trigger.
See Common API Topics for global patterns across all endpoints.
Garment Response Object
The garment object contains the fit and size of the garment. Use these attributes to match to garments carried by your store. Each field is generated from information specific to your customer's inputs.
Fit Score and Description Response Objects
The fit score and fit descriptions provide information on how the garment fits on the customer based on their measurement predictions and the corresponding garment dimensions. Garment dimensions are provided to Bold Metrics either via size charts or tech pack data. Occasionally, additional data goes into determining the fit of the garment. Fit model or body block data help capture the intended fit by design.
The fit description scores are mapped on a dimensionless scale centered at 0 for the best fit. Negative values represent a snug or shorter garment dimension and positive values represent a loose or longer garment dimension. The fit description score is on a relative scale for a particular garment. Categorical responses for fit_description are:
just right
slightly snug
slightly loose
snug
loose
very snug
very loose
Outlier Detection
In addition to Outlier Detection for catching hard to discover errors in inputs, the API will notify for several other edge cases.
If no sizes for a garment are found, the good_matches array will be empty and the message field will indicate that no sizes fit well.
How to Use vSizer for eCommerce Sites
If you're looking to add Virtual Sizer (vSizer) to your eCommerce page, this is the recommended way to integrate the API with your platform. This can be accomplished in three easy steps:
Setup the API
Add the Analytics Script
Add the Purchase Script
Setup the API
Follow the documentation above to implement the API. Please note you'll receive the client_id
, user_key
, desired_brand
and desired_garment_type
from your Bold Metrics Representative.
There's an additional parameter that is required and is important with this integration: anon_id
. This is a user identifier that should not be PII (Personal Identifiable Information, e.g. email, phone, name, etc). The Analytics script in the next section will outline a potential solution regarding anon_id.
Add The Analytics Script
To add analytics to your PDP, please follow the documentation here. This will tag several elements on your page, and collect usage information to help Bold Metrics identify usage and conversion metrics.
Additionally, the analytics script will also add a cookie value and generate a user ID on your behalf. The cookie name is bm
.
Different User ID Patterns
The recommended pattern is to use the user ID cookie value generated by the analytics script for your anon_id
parameter value when calling the API. This simplifies tracking, and avoids issues where you may have multiple user IDs.
If you have other user IDs, it's recommended to collect the Bold Metrics user ID to make potential dataset matches. This allows for joins between the Bold Metrics data and any user profile data you may collect on your end.
Add The Purchase Script
To implement the Purchase Script, please follow the documentation here. Note that the purchase script will collect the user ID from the cookie set by the Analytics script, which allows Bold Metrics to match analytics, recommendations, and purchases. It is recommended to collect the user ID cookie value with your purchase data, but is not a requirement.
Last updated