OpenAPI 3.0 • Core Engine v2.0
UniFit REST API Reference
Base production proxy URL: https://beunifit.in/api/v1 (direct API gateway: https://api.beunifit.in/v1). All endpoints communicate over TLS 1.3 with deterministic JSON payloads, zero raw customer measurement exposure, and machine-readable OpenAPI 3.0 contracts.
Core Public Endpoints
Download OpenAPI 3.0 JSON| Method | Endpoint Path | Auth Requirement | Description |
|---|---|---|---|
| POST | /api/v1/brands/onboard | User JWT / Onboarding | Register a merchant workspace, configure default region/currency, and start a 7-day evaluation trial. |
| POST | /api/v1/products | Server API Key | Create or upsert apparel products with category taxonomy, fit intent, and fabric elasticity tags. |
| POST | /api/v1/products/:id/variants | Server API Key | Sync purchasable SKU sizes, colorways, regional label systems, and inventory status. |
| POST | /api/v1/brands/:brandId/size-charts | Server API Key / Portal | Upload canonical centimetre garment measurement tables across chest, waist, hip, shoulder, and inseam. |
| POST | /api/v1/consents/token | PKCE Authorization Code | Exchange a shopper-approved OAuth 2.0 + PKCE code for a short-lived 15-minute scoped grant. |
| POST | /api/v1/recommendations | Server Key + Grant Token | Return recommended size, alternative size, fit match label, confidence score, and zone ease telemetry. |
| POST | /api/v1/recommendations/:id/feedback | Server Key / Customer Session | Submit post-try-on or post-purchase fit feedback to calibrate garment ease accuracy. |
| GET | /api/openapi.json | Public | Download the machine-readable OpenAPI 3.0 JSON specification for client SDK generation. |
Sample Recommendation Output
{
"id": "rec_98f3a2",
"recommendedSize": "M",
"alternativeSize": "S",
"confidenceScore": 0.94,
"fitMatchLabel": "Regular Fit Match",
"zoneBreakdown": [
{ "zone": "CHEST", "fitStatus": "IDEAL" },
{ "zone": "SHOULDERS", "fitStatus": "IDEAL" },
{ "zone": "WAIST", "fitStatus": "COMFORTABLE" }
],
"poweredBy": "Powered by UniFit AI"
}HTTP Status & Rate Limits
| Status | Meaning | Handling |
|---|---|---|
| 200 / 201 | Success | Proceed with size recommendation payload or synced resource. |
| 400 | Validation Error | Verify missing chest/waist size chart ranges or request body schema. |
| 401 | Unauthorized | Confirm active API key header or unexpired 15-minute PKCE shopper grant. |
| 402 | Quota / Trial Ended | 7-day evaluation quota reached; activate Monthly + Pay-Per-Use tier in Billing. |
| 403 | Scope / Origin Mismatch | Verify storefront CORS origin allowlist or scoped consent permissions. |
| 429 | Rate Limit Exceeded | Respect Retry-After and X-RateLimit-Remaining headers (30–1,200 req/min by tier). |