Sew for Seamsdress — Now onboarding tailors!

Developer Docs

Add Fit to Your Store

Everything you need to install the Seamsdress Fit Widget, request an API key, and connect measurements, size matching, and local tailors to your storefront.

01 · Getting Started

Request an API key

Your API key authenticates every widget and API request. Create a free developer account, tell us about your store, and we'll generate a key you can use immediately.

  1. 1. Go to the Developer Portal and create an account.
  2. 2. Complete the short form with your store details.
  3. 3. Copy your publishable key (starts with pk_live_) for the widget, and your secret key (starts with sk_live_) for server-side calls.
Open Developer Portal

02 · Fit Widget

Install the Fit Widget

The widget renders an inline size recommender on your product page. Add a mount point, drop in the script with your API key, and pass your product's size chart as a data attribute.

1

Add the mount point

Place an empty #seamsdress-fit container where you want the recommender to appear, with your size chart encoded as JSON.

<div id="seamsdress-fit"
  data-size-chart='[
     {"label":"S","bust":35,"waist":27,"hip":37},
     {"label":"M","bust":37,"waist":29,"hip":39},
     {"label":"L","bust":39,"waist":31,"hip":41}
  ]'
></div>
2

Load the script

Include the widget script once, referencing your API key and the mount selector.

<!-- Seamsdress Fit Widget -->
<script
  src="https://seamsdress.base44.app/functions/widget"
  data-api-key="pk_live_YOUR_PUBLISHABLE_KEY"
  data-mount="#seamsdress-fit"
  defer
></script>
3

That's it

The widget auto-mounts, derives the right measurement fields from your size chart (bust + waist only works too), and returns a recommended size with a confidence score and per-size breakdown. When a size needs minor tailoring it shows a short informational note. No build step, no dependencies.

4

Bust + waist only

Charts don't need every measurement. A chart with only bust and waist renders just those two inputs and scores against what's available.

<div id="seamsdress-fit"
  data-size-chart='[
    {"label":"S","bust":35,"waist":27},
    {"label":"M","bust":37,"waist":29},
    {"label":"L","bust":39,"waist":31}
  ]'></div>

03 · Shopify

Add to Shopify

Add the mount point and script to your product template. Store your size chart as a product metafield (seamsdress.size_chart) and render it as JSON.

<!-- product.liquid or theme.liquid -->
<div id="seamsdress-fit"
  data-size-chart='{{ product.metafields.seamsdress.size_chart | json }}'>
</div>
<script src="https://seamsdress.base44.app/functions/widget"
  data-api-key="pk_live_YOUR_PUBLISHABLE_KEY"
  data-mount="#seamsdress-fit" defer></script>

04 · Wix

Add to Wix

In the Wix Editor, choose Add Element → Embed Code → Custom, then paste the widget HTML and script into the code box on your product page.

<!-- Wix: Add Element → Embed Code → Custom -->
<div id="seamsdress-fit"
  data-size-chart='[{"label":"S","bust":35,"waist":27,"hip":37},
                   {"label":"M","bust":37,"waist":29,"hip":39}]'>
</div>
<script src="https://seamsdress.base44.app/functions/widget"
  data-api-key="pk_live_YOUR_PUBLISHABLE_KEY"
  data-mount="#seamsdress-fit" defer></script>

05 · REST API

Recommend a size

POST your shopper's measurements and your product size chart to receive a recommendation, per-size scores, and whether a tailor is suggested.

POST/functions/seamsdressApi
curl -X POST https://seamsdress.base44.app/functions/seamsdressApi \
  -H "Content-Type: application/json" \
  -d '{
    "action": "recommend-size",
    "apiKey": "pk_live_YOUR_PUBLISHABLE_KEY",
    "measurements": { "bust": 37, "waist": 29, "hip": 39 },
    "sizeChart": [
      { "label": "S", "bust": 35, "waist": 27, "hip": 37 },
      { "label": "M", "bust": 37, "waist": 29, "hip": 39 },
      { "label": "L", "bust": 39, "waist": 31, "hip": 41 }
    ]
  }'

Response

{
  "action": "recommend-size",
  "result": {
    "size": "M",
    "confidence": 92,
    "fit": "good",
    "notes": ["Bust is snug (2.5\" ease)."],
    "tailorSuggested": false,
    "allSizes": [
      { "size": "S", "score": 0.40 },
      { "size": "M", "score": 0.92 },
      { "size": "L", "score": 0.65 }
    ]
  }
}

06 · Fit Passport

One-click measurements

Create a Fit Passport grant to let a shopper authorize your store to read their saved Seamsdress measurements. Return the grant URL to the browser; after consent, the shopper is redirected back to your redirectUri with a token you exchange for measurements.

Note: create-grant and get-measurements require your secret key (sk_live_) or an authenticated session, not a publishable key.

curl -X POST https://seamsdress.base44.app/functions/seamsdressApi \
  -H "Content-Type: application/json" \
  -d '{
    "action": "create-grant",
    "apiKey": "sk_live_YOUR_SECRET_KEY",
    "clientName": "Acme Apparel",
    "redirectUri": "https://acme.com/fit-confirmed"
  }'
create-grantReturns a consent URL for the shopper to authorize your store.
get-measurementsExchange the returned token for the shopper's saved measurements.
recommend-sizeMatch measurements against a size chart and return a recommendation.

Ready to add fit?

Request your API key and start integrating in minutes.

Request an API key