Fit API reference
Complete endpoint docs, parameters, responses, and status codes.
DEVELOPER PLATFORM
A catalog connection, a verified domain, and a script tag. Two browser calls and a key that is safe to ship — built for apparel retailers and platforms.
Last verified: 25 August 2026
POST /b2b/widget/session
X-ShirtMath-Key: pk_live_...
Content-Type: application/json
{ "domain": "yourstore.com" }
→ { "session": "sess_..." }
SAMPLE RESPONSE
{ "status": "VERIFIED_FIT",
"authority": "PHASE4",
"current_product": {
"recommended_size": "M"
},
"explanation": "...",
"candidates": [ ... ] }
Everything you need
Complete endpoint docs, parameters, responses, and status codes.
Publishable and secret API keys, session lifecycle, and rotation.
Sync items and size charts via CSV, JSON, or a custom retailer API.
Map your size charts and units for accurate recommendations.
Where a fit return actually comes from, and what a comparison can address.
Not built yet. Scheduled and manual syncs are the honest answer today — see the FAQ for what is coming soon.
Integrate in three steps
Post your publishable key to open a short-lived signed session, scoped to a verified domain.
The widget captures the shopper's reference measurements client-side — nothing is sent until the match request.
Send the product reference and the measurements it read. The response carries a size, its authority, and alternatives.
REQUEST EXAMPLE
POST /b2b/widget/match
X-ShirtMath-Session: sess_...
{ "product_ref": "shirt_001",
"reference": {
"chest": 20.0, "shoulder": 17.8,
"length": 39.0
} }
RESPONSE EXAMPLE
{ "status": "VERIFIED_FIT",
"current_product": {
"recommended_size": "M"
},
"authority": "PHASE4",
"confidence": 0.93 }
Not built yet
ShirtMath is pre-launch. These are named rather than quietly omitted.
A sandbox workspace receives a clearly-labelled synthetic demonstration carrying authority SANDBOX, so nothing you see while testing is dressed up as a real fit claim. The FAQ answers the rest of the retailer questions, and the ShirtMath for Brands overview is the shortest version of the product itself.
Explore the docs or talk to our team to build the right fit experience for your customers.
Explore the docs Book a demo Scan a shirt