Integrating body profile into your records
EyeFitU SizeEngine SDK provides an API call which allows to get body profile. This can be useful to integrate profile data into stores system of records, e.g. into orders.
eyefitu('get-profile', gender)
call returns a profile object with both basic and detailed measurements. Because widget could be used on products for both female
and male
genders, gender
parameter should be provided.
eyefitu
function is exposed on a global object, so it could be called from anywhere on you product page.
Example getting profile on Add to Cart button click
document.querySelector('button.add-to-cart')
.addEventListener('click', () => {
const profile = eyefitu('get-profile', 'male');
console.log(profile);
});
get-profile
return type
{
"height": Number,
"weight": Number,
"age": Number,
"detailedMeasurements": {
"HIP_CIRCUMFERENCE": Number,
"BUST_CIRCUMFERENCE": Number,
"NECK_CIRCUMFERENCE": Number,
"THIGH_CIRCUMFERENCE": Number,
"UNDER_BUST_CIRCUMFERENCE": Number,
"WAIST_CIRCUMFERENCE": Number,
"WRIST_CIRCUMFERENCE": Number,
"FOOT_LENGTH": Number,
"ARM_LENGTH": Number,
"HEAD_CIRCUMFERENCE": Number,
"INSEAM_LENGTH": Number
},
"preferences": {
"jacketStyle": "MODERN" | "SLIM" | undefined,
"pantsStyle": "MODERN" | "SLIM" | undefined,
"shirtStyle": "MODERN" | "SLIM" | undefined,
}
}
Notes:
- Style preferences would be
undefined
until user defines them through the widget. - Measurement values are always in centimeters.
age
is not an exact age, but a lower boundary of a selected age range.null
would be returned byget-profile
until user enters height, weight and age.