# WEARFITS API Summary

Last updated: 2026-11-06.

Base URL: https://api.wearfits.com

Protected operations use X-API-Key. Check each operation and its `security` overrides at https://api.wearfits.com/doc. For storefronts, the hosted iframe handles API access. This is
a core commerce endpoint summary; /doc is the complete public contract.

Keep merchant and service keys on your backend. Send protected requests with X-API-Key; consult each operation's security overrides in /doc.

For a merchant key or a bare service key, jobs and batches belong to that exact key. Another key gets 404 for jobs, but existing batches return 403 ACCESS_DENIED on ownership mismatch; keep the submitting key available while work is in flight. Service requests with X-Wearfits-Account instead use account ownership, so renewed account tokens retain access for the same account. Storefront tokens (wfs1.) have separate account-scoped ownership: they permit only POST /api/v1/virtual-fitting and GET /api/v1/jobs/{jobId}. They cannot create twins separately, call size-fitting, generate 3D assets, or cancel jobs. Renew an expired token server-side for the same account; do not switch authentication modes while polling.

For server-to-server callbacks submitted with a private merchant/bare service key, verify X-Webhook-Signature (sha256= followed by lowercase hex) with HMAC-SHA256. The HMAC key is the UTF-8 lowercase SHA-256 hex digest of that private key. Account-attributed service requests instead use SHA-256 of "account:" + the account ID; storefront requests use SHA-256 of "storefront:" + that ID. Those identifier-derived values are not private webhook secrets: prefer authenticated polling for those modes, rather than treating their signatures as proof of origin. Job callbacks sign compact JSON with object keys sorted recursively (array order retained); batch callbacks sign the exact request body bytes. Compare signatures in constant time, validate X-Webhook-Timestamp against the payload timestamp and your replay window, and deduplicate callbacks. Job delivery makes up to 3 attempts; batch delivery has no retry recovery. Retain polling as a fallback and fetch the final job for full 3D result details.

API requests also share the per-IP allowance described in https://api.wearfits.com/llms.txt. On an early 429, respect Retry-After: 60; X-RateLimit-* headers may be absent.

Submissions have limits of their own: 5 active jobs per account across its keys, foot measurements and texture splits included (429 ACCOUNT_CONCURRENCY_LIMIT) and 20 submissions per 5 minutes and 60 per hour per API key (429 KEY_RATE_LIMIT_EXCEEDED); a submission refused by a limit does not count, one that fails for another reason may. When the service is temporarily overloaded a job submission other than a digitization batch returns 429 SERVICE_BUSY. A cache hit holds no active job; a digitization batch holds none and counts as one submission. Wait for the Retry-After seconds on any of them, then retry.

## Core Endpoints

| Endpoint | Purpose |
| --- | --- |
| POST /api/v1/virtual-fitting | Apply garments and shoes to a digital twin. |
| POST /api/v1/tryon/clothing | Photo try-on without generating a new twin. |
| POST /api/v1/tryon/shoes | Shoe photo try-on without generating a new twin. |
| POST /api/v1/digital-twin | Create a reusable customer digital twin. |
| GET /api/v1/digital-twin/{id} | Check if a digital twin is still valid. |
| POST /api/v1/size-fitting | Estimate clothing sizes from an eligible twin and body-range charts. |
| POST /api/v1/shoe-3d | Generate or enhance 3D product assets. |
| POST /api/v1/digitization/batches | Queue many products for batch 3D generation. |
| GET /api/v1/digitization/batches/{batchId} | Read batch progress and per-item results. |
| POST /api/v1/digitization/batches/{batchId}/pause | Stop new batch enqueueing; running work can finish. |
| POST /api/v1/digitization/batches/{batchId}/resume | Resume a paused batch. |
| GET /api/v1/jobs/{jobId} | Poll job status and results. |
| DELETE /api/v1/jobs/{jobId} | Cancel only queued or validating jobs; storefront tokens cannot cancel. |
| POST /api/v1/storefront/tokens | Mint a restricted browser token server-side. |

## Public Discovery Files

- https://api.wearfits.com/robots.txt
- https://api.wearfits.com/sitemap.xml
- https://api.wearfits.com/llms.txt
- https://api.wearfits.com/llms-full.txt

## Human Reference

Swagger UI is available at https://api.wearfits.com/reference.
