Fit Advisor Documentation
Documentation for size recommendation endpoints for topwear and pants.
Base URL
https://core.keepbelanja.com
Choose docs
Authentication
Header `Key`
The fit advisor endpoint requires the `Key` header, an `application/x-www-form-urlencoded` body, and HTTPS.
| Header | Key: your_api_key_here |
| Body | application/x-www-form-urlencoded |
| Type | suit, tshirt, shirt, pants, jacket |
| Style | slim, standar, standard, oversize |
Request
Required fields
| Method | POST |
| Body | type, height, weight, age, style |
Fit Advisor
Valid values
Type
suit, tshirt, shirt, pants, jacket
Style
slim, standar, standard, oversize
Examples
Request and response examples
Topwear example
Example for `shirt`, `jacket`, `suit`, or `tshirt`.
curl --location 'https://core.keepbelanja.com/api/fit-advisor' \
--header 'Key: YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'type=shirt' \
--data-urlencode 'height=170' \
--data-urlencode 'weight=70' \
--data-urlencode 'age=29' \
--data-urlencode 'style=slim'
{
"meta": { "message": "Success Get Fit Advisor", "code": 200, "status": "success" },
"data": {
"recommended_size": "M",
"recommended_size_percentage": 53,
"fit_percentages": [
{ "size": "M", "percentage": 53, "is_recommended": true },
{ "size": "L", "percentage": 30 },
{ "size": "S", "percentage": 17 }
]
}
}
{
"meta": { "message": "Input tidak valid", "code": 400, "status": "error" },
"data": {
"fields_error": ["style"]
}
}
Pants example
Example pants number output for the `pants` type.
curl --location 'https://core.keepbelanja.com/api/fit-advisor' \
--header 'Key: YOUR_API_KEY' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'type=pants' \
--data-urlencode 'height=170' \
--data-urlencode 'weight=70' \
--data-urlencode 'age=29' \
--data-urlencode 'style=slim'
{
"meta": { "message": "Success Get Fit Advisor", "code": 200, "status": "success" },
"data": {
"recommended_pants_no": 33,
"recommended_size_percentage": 48,
"fit_percentages": [
{ "pants_no": 33, "percentage": 48, "is_recommended": true },
{ "pants_no": 34, "percentage": 31 },
{ "pants_no": 32, "percentage": 21 }
]
}
}
{
"meta": { "message": "Input tidak valid", "code": 400, "status": "error" },
"data": {
"fields_error": ["weight"]
}
}
Reference
Request body reference
| Endpoint | Method | Body | Notes |
|---|---|---|---|
| https://core.keepbelanja.com/api/fit-advisor | POST | type, height, weight, age, style | Request field reference for the fit advisor endpoint. |