SDK
For any website you control. DressApp ships a browser SDK that wraps sessions, model studio, and try-on calls.
Packages
DressApp ships a browser SDK that wraps sessions, model studio, and try-on calls.
@dressapp/web-sdk- — lightweight JS (
DressApp.enable()- , try-on buttons, model studio redirect).
@dressapp/react-widget- — React components (floating studio dock, inline PDP widget). Built on the web SDK.
Setup steps
Get keys
Get keys
DressApp ops creates a merchant viaPOST /partner/v1/admin/merchants. You receive a secret key (dress_sk_…) and publishable key (dress_pk_…). Store the secret in your secrets manager.Allow your domain
Allow your domain
Add your storefront origin to the merchant'sallowed_origins, or ask DressApp to add it toPARTNER_CORS_ORIGINSon the API.Backend: shopper session
Backend: shopper session
Add one route on your server, for example
GET /api/dressapp-session. It calls DressApp with your secret key and returns theaccess_tokento your frontend.POST /partner/v1/sessionsAuthorization: Bearer dress_sk_live_… { "external_user_ref": "<stable shopper id>" } // Response: { "access_token": "…" }Use your logged-in customer ID, or a persistent anonymous cookie ID for guests.
Backend: product sync
Backend: product sync
When products are created or updated, call
POST /partner/v1/productswith the same secret key. Save the returnedproduct_idnext to that SKU.POST /partner/v1/products{ "external_id": "SKU-001", "title": "Blue dress", "url": "https://yoursite.com/p/blue-dress", "image_urls": ["https://yoursite.com/img/1.jpg"] }Frontend: install the SDK
Frontend: install the SDK
npmnpm install @dressapp/web-sdk # Or for React: npm install @dressapp/react-widgetFrontend: enable DressApp
Frontend: enable DressApp
After you fetch the shopper token from your backend:
Enable SDKimport { DressApp } from "@dressapp/web-sdk"; await DressApp.enable({ publishableKey: "dress_pk_live_…", apiBase: "https://YOUR_DRESSAPP_API", accessToken: shopperJwt, });First visit: create a model
First visit: create a model
Check
await DressApp.hasModel(). If false, show a "Create my model" button:Open model studioDressApp.openModelStudio({ returnUrl: window.location.href })The shopper finishes photos on DressApp, then clicks Continue to store to come back.
Try-on
Try-on
When
hasModel()is true:Request try-onawait DressApp.requestTryOn(productId, { async: true }) // Poll until complete: DressApp.getTryOnJob(jobId)Or register webhooks on your server (optional) instead of polling.
Ship it
Ship it
Test the full path on HTTPS: session → model → return → try-on on a real product.