All integrations

API

For teams building their own UI. You call the same REST endpoints the SDK uses under the hood.

When to use the API

For teams building their own UI: mobile apps, server-rendered sites, or anything that does not want our JS bundle. You call the same REST endpoints the SDK uses under the hood.

Prefer the storefront SDK when you want the fastest path in a browser.

Setup steps

  1. Credentials & storefront URL

    Open Credentials in Settings. Copy your publishable key (dress_pk_…) and secret key (dress_sk_…). Keep the secret key on your server only - never in client code.

    On the same page, enter and save your storefront URL - the public site or app origin where try-on runs (e.g. https://your-store.com). DressApp uses this to allow your domain for API calls.

  2. Create shopper sessions (server only)

    POST /partner/v1/sessions
    Authorization: Bearer dress_sk_live_…
    
    {
      "external_user_ref": "customer-12345"
    }
    
    // Response: { "access_token": "…" }  (JWT - safe for the client)

    Never send the secret key to the client; only pass the access token.

  3. Sync catalog (server only)

    POST /partner/v1/products
    Authorization: Bearer dress_sk_live_…
    
    {
      "external_id": "SKU-001",
      "title": "Blue dress",
      "url": "https://yoursite.com/p/blue-dress",
      "image_urls": ["https://yoursite.com/img/1.jpg"],
      "gender": "women"
    }
    
    // Store the returned product_id for try-on calls
  4. Check if the shopper has a model

    GET /user-model/current
    Authorization: Bearer <shopper access_token>
    
    // null or empty → they need onboarding first
  5. Model creation

    Send the shopper to DressApp's model studio:

    Embed model studio
    GET https://api.dressapp.me/embed/model-studio?access_token=<token>&partner_return=https://yoursite.com/return

    Or build the URL from GET /partner/v1/embed-config (publishable key) → use public_app_url + /onboarding?access_token=….

  6. Start a try-on

    POST /tryon/{product_id}?async=true
    Authorization: Bearer <shopper access_token>
    
    // Response (HTTP 202): { "job_id": "…" }
  7. Poll for the result

    GET /tryon/jobs/{job_id}
    Authorization: Bearer <shopper access_token>
    
    // When status is "completed", the response includes image URL(s)

    Alternative: register webhooks via POST /partner/v1/webhooks for tryon.job.completed / tryon.job.failed and skip polling.

  8. Optional extras

    • Try-on history:
    • GET /tryon/history
    • Usage / quota:
    • GET /partner/v1/merchants/me/usage
    • (secret key)
    • Bill Gemini on your Google project:
    • PUT /partner/v1/integrations/google-api-key
  9. Verify before launch

    HTTPS everywhere, secret key never in client code, one full test run end to end.